1
$\begingroup$

I have the following set of differential equations:

\begin{align*} \ddot{\theta}(s) & = \Gamma_{\varphi \varphi}^\theta\dot{\varphi}(s)^2 = \frac{\sin\theta \dot{\varphi}(s)^2}{(2+\cos\theta)},\\ \ddot{\varphi}(s) & = 2\Gamma_{\theta \varphi}^\varphi\dot{\varphi}(s)\dot{\theta}(s) = -\frac{2\sin \theta \dot{\varphi}(s)\dot{\theta}(s)}{(2+\cos\theta)}. \end{align*}

where $s \in [0,1]$. How can I plot the solutions to this system?

Thank you in advance!

$\endgroup$

1 Answer 1

2
$\begingroup$

Hint.

First you need initial/boundary conditions. After observing the odes, the last

one can be rearranged as

$$ \frac{\ddot{\varphi}(s)}{\dot{\varphi}(s)}=-\frac{2\sin \theta \dot{\theta}(s)}{(2+\cos\theta)} $$

or

$$ \ln(\dot{\varphi}) = 2\ln(2+\cos(\theta))+C $$

or

$$ \dot{\varphi}= C_0e^{2\ln(2+\cos(\theta))} $$

etc.

sol = NDSolve[{theta''[s] == Sin[theta[s]] psi'[s]^2/(2 + Cos[theta[s]]), 
         psi''[s] == -2 Sin[theta[s]] psi'[s]/(2 + Cos[theta[s]]), 
         theta[0] == psi[0] == psi'[0] == 0, theta'[0] == 1}, {theta, psi}, {s, 0, 1}][[1]];
Plot[Evaluate[{theta[s], psi[s]} /. sol], {s, 0, 1}]

Note that with $\varphi(0)=\varphi'(0)=0$ we have $\varphi(s)=0$ so remains $\theta(s) = c_1 + c_2 s$

$\endgroup$
1
  • $\begingroup$ That was nice, I didn't notice! Unfortunately, substituting that $\dot{\varphi}$ in $\ddot{\theta} = C_0^2\sin\theta (2 + \cos\theta)^3$ doesn't yield something useful? For the initial conditions we can assume that $\theta(0) = \varphi(0) = 0$ and $\dot{\theta} = 1$ and $\dot{\varphi} = 0$. I guess this is possible? $\endgroup$
    – user57
    Commented Feb 5 at 17:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.