I'm a student coding in Python and trying to solve the folowing delayed differential equation:
<a href="http://www.codecogs.com/eqnedit.php?latex=\left\{\begin{array}{l}\dot{v}(t)=&space;y(t)&space;\\&space;\dot{y}(t)=&space;\frac{a_1\alpha}{\omega_1}.y(t-\tau)).\{1-tanh^2[v(t-\tau)]\}&space;-&space;v(t)-\frac{1}{Q_1}.y(t)&space;\end{array}\right.\\&space;\\&space;(a_1&space;=&space;70,&space;\quad&space;Q_1&space;=&space;50,&space;\quad&space;\omega_1&space;=&space;2260,&space;\quad&space;\alpha&space;=&space;10,&space;\quad&space;\tau&space;\in&space;[0,8e-3])" target="_blank"><img src="http://latex.codecogs.com/gif.latex?\left\{\begin{array}{l}\dot{v}(t)=&space;y(t)&space;\\&space;\dot{y}(t)=&space;\frac{a_1\alpha}{\omega_1}.y(t-\tau)).\{1-tanh^2[v(t-\tau)]\}&space;-&space;v(t)-\frac{1}{Q_1}.y(t)&space;\end{array}\right.\\&space;\\&space;(a_1&space;=&space;70,&space;\quad&space;Q_1&space;=&space;50,&space;\quad&space;\omega_1&space;=&space;2260,&space;\quad&space;\alpha&space;=&space;10,&space;\quad&space;\tau&space;\in&space;[0,8e-3])" title="\left\{\begin{array}{l}\dot{v}(t)= y(t) \\ \dot{y}(t)= \frac{a_1\alpha}{\omega_1}.y(t-\tau)).\{1-tanh^2[v(t-\tau)]\} - v(t)-\frac{1}{Q_1}.y(t) \end{array}\right.\\ \\ (a_1 = 70, \quad Q_1 = 50, \quad \omega_1 = 2260, \quad \alpha = 10, \quad \tau \in [0,8e-3])" /></a>
I wanted to use JiTCDDE, but didn’t succeed to find a way to adapt the system, even after studying the examples in the documentation of the module. The major problem I have is that I don’t understand how to deal with the second equation containing y and v at the same time.
The goal is to plot the bifurcation diagram of the system (v as a function of τ). Am I using the wrong tool? Or is there a way to use JiTCDDE in my situation?
You can implement multidimensional systems by using the first argument of y
to indicate which component you want to use. Also, your definition of the right-hand side of the differential equation must have two components.
For instance, you can implement your example as follows:
from jitcdde import jitcdde, y, t
f = [
y(1),
a*α/ω*y(1,t-τ)*(1-symengine.tanh(y(0,t-τ))**2)-y(0)-y(1)/Q
]
DDE = jitcdde(f)
What is v in your equation is now y(0)
; y has become y(1)
.
There is an example for a second-order differential equation such as yours in the accompanying paper (preprint).