15.8.17 problem 17

Internal problem ID [3020]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 12, page 46
Problem number : 17
Date solved : Tuesday, March 04, 2025 at 03:44:33 PM
CAS classification : [_separable]

\begin{align*} r^{\prime }&=r \cot \left (\theta \right ) \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 8
ode:=diff(r(theta),theta) = r(theta)*cot(theta); 
dsolve(ode,r(theta), singsol=all);
 
\[ r = c_{1} \sin \left (\theta \right ) \]
Mathematica. Time used: 0.035 (sec). Leaf size: 15
ode=D[ r[\[Theta]], \[Theta] ]==r[\[Theta]]*Cot[\[Theta]]; 
ic={}; 
DSolve[{ode,ic},r[\[Theta]],\[Theta],IncludeSingularSolutions->True]
 
\begin{align*} r(\theta )\to c_1 \sin (\theta ) \\ r(\theta )\to 0 \\ \end{align*}
Sympy. Time used: 0.211 (sec). Leaf size: 7
from sympy import * 
theta = symbols("theta") 
r = Function("r") 
ode = Eq(-r(theta)/tan(theta) + Derivative(r(theta), theta),0) 
ics = {} 
dsolve(ode,func=r(theta),ics=ics)
 
\[ r{\left (\theta \right )} = C_{1} \sin {\left (\theta \right )} \]