58.4.5 problem 5

Internal problem ID [14575]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, section 2.2 (Separable equations). Exercises page 47
Problem number : 5
Date solved : Thursday, October 02, 2025 at 09:42:32 AM
CAS classification : [_separable]

\begin{align*} \tan \left (\theta \right )+2 r \theta ^{\prime }&=0 \end{align*}
Maple. Time used: 0.061 (sec). Leaf size: 21
ode:=tan(theta(r))+2*r*diff(theta(r),r) = 0; 
dsolve(ode,theta(r), singsol=all);
 
\begin{align*} \theta &= \arcsin \left (\frac {1}{\sqrt {c_1 r}}\right ) \\ \theta &= -\arcsin \left (\frac {1}{\sqrt {c_1 r}}\right ) \\ \end{align*}
Mathematica. Time used: 5.221 (sec). Leaf size: 21
ode=Tan[theta[r]]+2*r*D[ theta[r],r]==0; 
ic={}; 
DSolve[{ode,ic},theta[r],r,IncludeSingularSolutions->True]
 
\begin{align*} \theta (r)&\to \arcsin \left (\frac {e^{c_1}}{\sqrt {r}}\right )\\ \theta (r)&\to 0 \end{align*}
Sympy. Time used: 0.214 (sec). Leaf size: 22
from sympy import * 
r = symbols("r") 
theta = Function("theta") 
ode = Eq(2*r*Derivative(theta(r), r) + tan(theta(r)),0) 
ics = {} 
dsolve(ode,func=theta(r),ics=ics)
 
\[ \left [ \theta {\left (r \right )} = \pi - \operatorname {asin}{\left (\frac {C_{1}}{\sqrt {r}} \right )}, \ \theta {\left (r \right )} = \operatorname {asin}{\left (\frac {C_{1}}{\sqrt {r}} \right )}\right ] \]