# Optimizating computational time of gradient on big linear UDEs

**URL:** https://discourse.julialang.org/t/optimizating-computational-time-of-gradient-on-big-linear-udes/108645
**Category:** Modelling & Simulations
**Created:** [January 10, 2024, 9:41pm UTC](https://discourse.julialang.org/t/optimizating-computational-time-of-gradient-on-big-linear-udes/108645 "2024-01-10T21:41:02Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [January 10, 2024, 11:36pm UTC](https://discourse.julialang.org/t/optimizating-computational-time-of-gradient-on-big-linear-udes/108645/4 "2024-01-10T23:36:53Z")

</div>

> [@ChrisRackauckas](#):
>
> you can specialize this to simply use `u(t,p) = u0*exp(A(p)*t)` which then has a very simple derivative.

Beware that differentiating a matrix exponential (with respect to parameters of the matrix) is not as simple as many people expect (but ChainRules.jl and hence Zygote.jl can do it). See also [Differentiating random walk probability w.t.r. rate of jump - #14 by stevengj](https://discourse.julialang.org/t/differentiating-random-walk-probability-w-t-r-rate-of-jump/107116/14)

---

_[View the full topic](https://discourse.julialang.org/t/optimizating-computational-time-of-gradient-on-big-linear-udes/108645)._
