4

I have the following set of equations:

$$ x(t) = x_0 \psi, \qquad y(t) = \kappa \ln \psi - x_0 \psi +1,\qquad z(t) =-\kappa\ln \psi,$$

with

$$ t- t_0 = \int ^\psi_{\psi_0} \frac{d\eta}{\eta(1+\kappa\ln \eta + x_0 \eta)}. $$ Here $t$ represents time. I would like to plot these equations in Python for the time range $t\in[0,1000]$. Of course, plotting $x,y$ or $z$ should no problem.

However I am struggling to generate this plot. I am not looking of anyone to actually do this for me, but can I get a pointer on how to approach this? In particular, how should I generate the required $\psi$ for this problem given $\psi_0, x_0$ and $\kappa$?

Wrzlprmft
  • 2,032
  • 12
  • 32
AngusTheMan
  • 143
  • 4

1 Answers1

6

It is always easier to solve a differential equation rather than an integral equation.

You can easily differentiate your last equation w.r.t the time variable $t$, and set the initial condition $\psi(0) = \psi_0$ for the following differential equation: $$\frac{d\psi}{dt}=\psi(1+\kappa \ln{(\psi)}+x_0\psi).$$

Once you have the solution for the above, substitute it in your trajectories of $x, y$ and $z$

Wrzlprmft
  • 2,032
  • 12
  • 32
HBR
  • 1,638
  • 8
  • 7