42.4.8 problem Problem 3.11

Internal problem ID [8836]
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.11
Date solved : Tuesday, September 30, 2025 at 05:53:27 PM
CAS classification : [_Bernoulli]

\begin{align*} \phi ^{\prime }-\frac {\phi ^{2}}{2}-\phi \cot \left (\theta \right )&=0 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 16
ode:=diff(phi(theta),theta)-1/2*phi(theta)^2-phi(theta)*cot(theta) = 0; 
dsolve(ode,phi(theta), singsol=all);
 
\[ \phi = \frac {2 \sin \left (\theta \right )}{\cos \left (\theta \right )+2 c_1} \]
Mathematica. Time used: 0.17 (sec). Leaf size: 34
ode=D[ \[Phi][\[Theta]] ,  \[Theta] ]-1/2*\[Phi][\[Theta]]^2-\[Phi][\[Theta]]*Cot[\[Theta]]==0; 
ic={}; 
DSolve[{ode,ic},\[Phi][\[Theta]],\[Theta],IncludeSingularSolutions->True]
 
\begin{align*} \phi (\theta )&\to \frac {\sin (\theta )}{-\int _1^{\theta }\frac {1}{2} \sin (K[1])dK[1]+c_1}\\ \phi (\theta )&\to 0 \end{align*}
Sympy. Time used: 0.163 (sec). Leaf size: 12
from sympy import * 
theta = symbols("theta") 
phi = Function("phi") 
ode = Eq(-phi(theta)**2/2 - phi(theta)/tan(theta) + Derivative(phi(theta), theta),0) 
ics = {} 
dsolve(ode,func=phi(theta),ics=ics)
 
\[ \phi {\left (\theta \right )} = \frac {2 \sin {\left (\theta \right )}}{C_{1} + \cos {\left (\theta \right )}} \]