42.4.10 problem Problem 3.14

Internal problem ID [8838]
Book : THEORY OF DIFFERENTIAL EQUATIONS IN ENGINEERING AND MECHANICS. K.T. CHAU, CRC Press. Boca Raton, FL. 2018
Section : Chapter 3. Ordinary Differential Equations. Section 3.6 Summary and Problems. Page 218
Problem number : Problem 3.14
Date solved : Wednesday, October 01, 2025 at 08:43:10 PM
CAS classification : [[_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]

\begin{align*} \left (\phi ^{\prime }-\frac {\phi ^{2}}{2}\right ) \sin \left (\theta \right )^{2}-\phi \sin \left (\theta \right ) \cos \left (\theta \right )&=\frac {\cos \left (2 \theta \right )}{2}+1 \end{align*}
Maple. Time used: 0.009 (sec). Leaf size: 37
ode:=(diff(phi(theta),theta)-1/2*phi(theta)^2)*sin(theta)^2-phi(theta)*sin(theta)*cos(theta) = 1/2*cos(2*theta)+1; 
dsolve(ode,phi(theta), singsol=all);
 
\[ \phi = \frac {-\sinh \left (\frac {\theta }{2}\right ) c_1 -\cosh \left (\frac {\theta }{2}\right )}{\cosh \left (\frac {\theta }{2}\right ) c_1 +\sinh \left (\frac {\theta }{2}\right )}-\cot \left (\theta \right ) \]
Mathematica. Time used: 0.339 (sec). Leaf size: 36
ode=(D[ \[Phi][\[Theta]] ,  \[Theta] ]-1/2\[Phi][\[Theta]]^2)*Sin[\[Theta]]^2-\[Phi][\[Theta]]*Sin[\[Theta]]*Cos[\[Theta]]==1/2*Cos[2*\[Theta]]+1; 
ic={}; 
DSolve[{ode,ic},\[Phi][\[Theta]],\[Theta],IncludeSingularSolutions->True]
 
\begin{align*} \phi (\theta )&\to -\cot (\theta )-\frac {2 e^{\theta }}{e^{\theta }-2 c_1}+1\\ \phi (\theta )&\to 1-\cot (\theta ) \end{align*}
Sympy
from sympy import * 
theta = symbols("theta") 
phi = Function("phi") 
ode = Eq((-phi(theta)**2/2 + Derivative(phi(theta), theta))*sin(theta)**2 - phi(theta)*sin(theta)*cos(theta) - cos(2*theta)/2 - 1,0) 
ics = {} 
dsolve(ode,func=phi(theta),ics=ics)
 
NotImplementedError : The given ODE -phi(theta)**2/2 - phi(theta)/tan(theta) + Derivative(phi(theta), theta) + 1 - 3/(2*sin(theta)**2) cannot be solved by the factorable group method