# Calculate Equilibrium points for continuous system DynamicalSystems.jl

**URL:** https://discourse.julialang.org/t/calculate-equilibrium-points-for-continuous-system-dynamicalsystems-jl/85247
**Category:** Modelling & Simulations
**Created:** [August 3, 2022, 4:53pm UTC](https://discourse.julialang.org/t/calculate-equilibrium-points-for-continuous-system-dynamicalsystems-jl/85247 "2022-08-03T16:53:59Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Sergey\_Novak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sergey_novak/32/37716_2.png) [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)
#### Post date: [August 3, 2022, 4:54pm UTC](https://discourse.julialang.org/t/calculate-equilibrium-points-for-continuous-system-dynamicalsystems-jl/85247/1 "2022-08-03T16:54:00Z")

</div>

I need calculate all equilibrium points for dynamical system Hindmarsh Rose (HR). Code for system:

```julia
function HR!(du, u, p, t)
    
    function sigma(x)
            return 1.0 / ( 1.0 + exp( -10.0 * ( x - ( - 0.25 ) ) ) )
    end
    
    a, b, c, d, s, xr, r, I, vs, k1, k2, el_link = p
    x1, y1, z1, x2, y2, z2 = u
    
    du[1] = y1 + b * x1 ^ 2 - a * x1 ^3 - z1 + I - k1 * ( x1 - vs ) * sigma(x2) + el_link * ( x2 - x1 )
    du[2] = c - d * x1 ^2 - y1
    du[3] = r * ( s * ( x1 - xr ) - z1 )
    
    du[4] = y2 + b * x2 ^ 2 - a * x2 ^3 - z2 + I - k2 * ( x2 - vs ) * sigma(x1) + el_link * ( x1 - x2 )
    du[5] = c - d * x2 ^2 - y2
    du[6] = r * ( s * ( x2 - xr ) - z2 )
    
    return SVector(du[1], du[2], du[3],
                    du[4], du[5], du[6])
end

```

That is two coupled HR element. How can i get equilibrium points ? Are there any packages that look for equilibrium points for the system ?  
For such a system it is too problematic to find equilibrium points analytically  
Monodromy matrix i can not use because need find equilibrium points in regular and chaotic modes

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [August 3, 2022, 5:46pm UTC](https://discourse.julialang.org/t/calculate-equilibrium-points-for-continuous-system-dynamicalsystems-jl/85247/2 "2022-08-03T17:46:01Z")

</div>

Typing “equilibrium points” in the search bar of the docs gives this as first result 😉

[https://juliadynamics.github.io/DynamicalSystems.jl/dev/chaos/periodicity/#Fixed-points](https://juliadynamics.github.io/DynamicalSystems.jl/dev/chaos/periodicity/#Fixed-points)

---

<div class="post-metadata">

### Author: ![Sergey\_Novak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sergey_novak/32/37716_2.png) [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)
#### Post date: [August 4, 2022, 7:41am UTC](https://discourse.julialang.org/t/calculate-equilibrium-points-for-continuous-system-dynamicalsystems-jl/85247/3 "2022-08-04T07:41:33Z")

</div>

I’m sorry, i’m too inattentive. Thank you.

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [August 4, 2022, 9:55am UTC](https://discourse.julialang.org/t/calculate-equilibrium-points-for-continuous-system-dynamicalsystems-jl/85247/4 "2022-08-04T09:55:19Z")

</div>

No, this isn’t possible out of the box. You would need to combine the Poincare map integrator with a newton solver or NLSolve.jl. [GitHub - JuliaNLSolvers/NLsolve.jl: Julia solvers for systems of nonlinear equations and mixed complementarity problems](https://github.com/JuliaNLSolvers/NLsolve.jl)

if you do write this code, please consider contributing it back to DynamicalSystems.jl.

---

<div class="post-metadata">

### Author: ![Sergey\_Novak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sergey_novak/32/37716_2.png) [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)
#### Post date: [August 4, 2022, 12:41pm UTC](https://discourse.julialang.org/t/calculate-equilibrium-points-for-continuous-system-dynamicalsystems-jl/85247/5 "2022-08-04T12:41:22Z")

</div>

Okay, I’m sorting out the code for poincaré. I think it will take some time because some lines of code are not clear to me

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [August 4, 2022, 12:51pm UTC](https://discourse.julialang.org/t/calculate-equilibrium-points-for-continuous-system-dynamicalsystems-jl/85247/6 "2022-08-04T12:51:18Z")

</div>

What do you mean ? The source code of the poincare map should be completely irrelevant. You have want to find the zeros of pmal(u) - u using Newton method or whatever nlsolve jl gives you. This is really easy. See also chapter 4 section 2 of our book if this newton’s approach for fjnding fixed points isn’t clear to you.

---

<div class="post-metadata">

### Author: ![Sergey\_Novak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sergey_novak/32/37716_2.png) [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)
#### Post date: [August 4, 2022, 12:54pm UTC](https://discourse.julialang.org/t/calculate-equilibrium-points-for-continuous-system-dynamicalsystems-jl/85247/7 "2022-08-04T12:54:10Z")

</div>

I don’t understand yet how I can get the Poincare mapping itself in the form of equations

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [August 4, 2022, 1:00pm UTC](https://discourse.julialang.org/t/calculate-equilibrium-points-for-continuous-system-dynamicalsystems-jl/85247/8 "2022-08-04T13:00:30Z")

</div>

That’s why you need to use nlsolve.jl, because the poincare map doesn’t doesn’t equations.

---

<div class="post-metadata">

### Author: ![Ananya\_Hazarika](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ananya_hazarika/32/50508_2.png) [@Ananya\_Hazarika](https://discourse.julialang.org/u/Ananya_Hazarika)
#### Post date: [January 4, 2024, 4:48am UTC](https://discourse.julialang.org/t/calculate-equilibrium-points-for-continuous-system-dynamicalsystems-jl/85247/10 "2024-01-04T04:48:51Z")

</div>

how to find equilibrium points of a non linear closed delay differential system of equations?

the equations add up to give zero.(closed)

---

<div class="post-metadata">

### Author: ![Ananya\_Hazarika](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ananya_hazarika/32/50508_2.png) [@Ananya\_Hazarika](https://discourse.julialang.org/u/Ananya_Hazarika)
#### Post date: [January 4, 2024, 4:50am UTC](https://discourse.julialang.org/t/calculate-equilibrium-points-for-continuous-system-dynamicalsystems-jl/85247/11 "2024-01-04T04:50:49Z")

</div>

apart from the trivial 0 vector
