15.7.4 problem 4

Internal problem ID [2985]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 11, page 45
Problem number : 4
Date solved : Sunday, March 30, 2025 at 01:03:32 AM
CAS classification : [`y=_G(x,y')`]

\begin{align*} \sin \left (\theta \right ) \theta ^{\prime }+\cos \left (\theta \right )-t \,{\mathrm e}^{-t}&=0 \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 21
ode:=sin(theta(t))*diff(theta(t),t)+cos(theta(t))-t*exp(-t) = 0; 
dsolve(ode,theta(t), singsol=all);
 
\[ \theta = \arccos \left ({\mathrm e}^{t} c_1 +\frac {\left (2 t +1\right ) {\mathrm e}^{-t}}{4}\right ) \]
Mathematica. Time used: 21.706 (sec). Leaf size: 59
ode=Sin[\[Theta][t]]*D [ \[Theta][t] , t ]+(Cos[\[Theta][t]]-t*Exp[-t] )==0; 
ic={}; 
DSolve[{ode,ic},\[Theta][t],t,IncludeSingularSolutions->True]
 
\begin{align*} \theta (t)\to -\arccos \left (\frac {1}{4} e^{-t} \left (2 t+4 c_1 e^{2 t}+1\right )\right ) \\ \theta (t)\to \arccos \left (\frac {1}{4} e^{-t} \left (2 t+4 c_1 e^{2 t}+1\right )\right ) \\ \end{align*}
Sympy. Time used: 3.045 (sec). Leaf size: 44
from sympy import * 
t = symbols("t") 
theta = Function("theta") 
ode = Eq(-t*exp(-t) + sin(theta(t))*Derivative(theta(t), t) + cos(theta(t)),0) 
ics = {} 
dsolve(ode,func=theta(t),ics=ics)
 
\[ \left [ \theta {\left (t \right )} = - \operatorname {acos}{\left (\frac {\left (C_{1} e^{2 t} + 2 t + 1\right ) e^{- t}}{4} \right )} + 2 \pi , \ \theta {\left (t \right )} = \operatorname {acos}{\left (\left (C_{1} e^{2 t} + \frac {t}{2} + \frac {1}{4}\right ) e^{- t} \right )}\right ] \]