89.1.28 problem 28

Internal problem ID [24263]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 2. Equations of the first order and first degree. Exercises at page 21
Problem number : 28
Date solved : Saturday, October 04, 2025 at 05:36:05 PM
CAS classification : [_separable]

\begin{align*} \left (2 a^{2}-r^{2}\right ) r^{\prime }&=r^{3} \sin \left (\theta \right ) \end{align*}

With initial conditions

\begin{align*} r \left (0\right )&=a \\ \end{align*}
Maple. Time used: 0.842 (sec). Leaf size: 87
ode:=(2*a^2-r(theta)^2)*diff(r(theta),theta) = r(theta)^3*sin(theta); 
ic:=[r(0) = a]; 
dsolve([ode,op(ic)],r(theta), singsol=all);
 
\[ r = {\mathrm e}^{\frac {\operatorname {LambertW}\left (\_Z9 , -2 a^{2} {\mathrm e}^{2 \operatorname {RootOf}\left (-\operatorname {LambertW}\left (\_Z9 , -2 a^{2} {\mathrm e}^{2 \textit {\_Z} -2}\right )+2 \textit {\_Z} -2+2 \ln \left (a \right )-4 i \pi \_Z10 \right )-2 \cos \left (\theta \right )}\right )}{2}-\operatorname {RootOf}\left (-\operatorname {LambertW}\left (\_Z9 , -2 a^{2} {\mathrm e}^{2 \textit {\_Z} -2}\right )+2 \textit {\_Z} -2+2 \ln \left (a \right )-4 i \pi \_Z10 \right )+\cos \left (\theta \right )} \]
Mathematica
ode=(2*a^2-r[\[Theta]]^2)*D[r[\[Theta]],\[Theta]]==r[\[Theta]]^3*Sin[\[Theta]]; 
ic={r[0]==a}; 
DSolve[{ode,ic},r[\[Theta]],\[Theta],IncludeSingularSolutions->True]
 

{}

Sympy
from sympy import * 
t = symbols("t") 
a = symbols("a") 
r = Function("r") 
ode = Eq((2*a**2 - r(t)**2)*Derivative(r(t), t) - r(t)**3*sin(t),0) 
ics = {r(0): a} 
dsolve(ode,func=r(t),ics=ics)