# Is it possible to get analytical solution to this system of first order non-linear ODE in Mathematica?

I would greatly appreciate help solving this system in Mathematica.

\begin{aligned}\frac{d\theta_{1}}{dt}&=\frac{G(r_s^{2}-1)}{4(r_s^{2}+1)}\sin2\theta_{1}\sin2\phi_{1},\\\\\frac{d\phi_{1}}{dt}&=\frac{G}{{r_s^{2}+1}}\left(r_{s^{2}}\cos^{2}\phi_{1}+\sin^{2}\phi_{1}\right),\end{aligned}

\begin{aligned}\tan\theta_{1}&=\frac{Cr_{s}}{({r_{s}}^{2}\cos^{2}\phi_{1}+\sin^{2}\phi_{1})^{\frac{1}{2}}},\\\tan\phi_{1}&=r_{s}\tan\left(\frac{2\pi t}{T}+\kappa\right),\end{aligned} Where T:

\begin{aligned}T=\frac{2\pi}{G}\left(r_{s}+r_{s}^{-1}\right)\end{aligned}

Here $$G, r_s$$ are constants and $$C, k$$ are integration constants.

Clear[theta, phi, t, G, rS]

eq1 = D[theta[t],t] == (G (rS^2 - 1))/(4 (rS^2 + 1)) Sin[2 theta[t]] Sin[2 phi[t]];
eq2 = D[phi[t], t] ==  G/(rS^2 + 1) (rS^2 Cos[phi[t]]^2 +Sin[phi[t]]^2);

solutions = DSolve[{eq1, eq2}, {theta[t], phi[t]}, t];

thetaSol = theta[t] /. solutions[[1]];
phiSol = phi[t] /. solutions[[1]];

simplifiedThetaSol = Simplify[thetaSol]
simplifiedPhiSol = Simplify[phiSol]


I attached this simple code I wrote. The equation I am looking is initial condition dependent (Later I want to do some statistical analysis on this dependency, therefore I need analytical expression.). I wanted to see if MMA can handle this type of equations to reduce work. It gave good result for $$\phi$$ as it is straightforward to integrate. But once you plug it back to $$\theta$$ and perform integration it fails. I also tried other symbolic solvers without results.

• What did you try so far, please show some code Aug 9, 2023 at 17:42
• I added some additional Information if it helps. Aug 9, 2023 at 19:59
• Where the "answers" come from? Aug 9, 2023 at 21:02
• it works in V 13.3. The second solution is implicit. May be with assumption it can be fully solved as explicit. screen shot !Mathematica graphics Aug 9, 2023 at 23:02
• @UlrichNeumann the answer that I use comes from link. Aug 10, 2023 at 2:11

modified

You might solve it explicit in two steps as follows:

First we solve eq2which only dependes on phi[t]

solphi = DSolve[ eq2 , phi[t] , t]
(*{{phi[t] -> ArcTan[rS Tan[2 rS ((G t)/(2 (1 + rS^2)) + C[1])]]}}*)
Tan[phi[t]] -> ( Tan[phi[t]] /. solphi)


eq1 is solvable if we transform TrigExpand[eq1] first

soltheta=DSolve[TrigExpand[eq1] /. solphi[[1]], theta, t];
Tan[theta[t]] -> (Tan[theta[t]] /. soltheta)


Hope it helps!