# Quantifying "damping" rate of ODE

**URL:** <https://discourse.julialang.org/t/quantifying-damping-rate-of-ode/91276>\
**Category:** General Usage\
**Tags:** ode, differentialequation\
**Created:** [December 5, 2022, 8:07pm UTC](https://discourse.julialang.org/t/quantifying-damping-rate-of-ode/91276 "2022-12-05T20:07:24Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![ANasc](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@ANasc](https://discourse.julialang.org/u/ANasc)\
**Post date:** [December 6, 2022, 2:59pm UTC](https://discourse.julialang.org/t/quantifying-damping-rate-of-ode/91276/6 "2022-12-06T14:59:00Z")

</div>

This turned out to be a great solution, thank you!

For those interested, I ended up doing this to get the eigenvalue with largest real part.:

```julia
     using ForwardDiff, NonlinearSolve
     function stability(inits, parameters) #initial conditions and parameters
        NLprob = NonlinearProblem(Alpha_Temp_B, inits, parameters) # find roots of model Alpha_Temp_B(u,p)
        NLsol = solve(NLprob, NewtonRaphson()) # find the steady-state
        J = ForwardDiff.jacobian(u -> Alpha_Temp_B(u, parameters), NLsol.u) # get Jacobian
        max_real = maximum(real.(eigen(J).values)) #get eigenvalue with maximum real part
     end

```

I had previously found convenient code to do this here: [Incorrect bifurcation diagram bifurcationkit.jl - #4 by dawbarton](https://discourse.julialang.org/t/incorrect-bifurcation-diagram-bifurcationkit-jl/87259/4)

---

_[View the full topic](https://discourse.julialang.org/t/quantifying-damping-rate-of-ode/91276)._
