15.7.12 problem 12

Internal problem ID [2993]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 11, page 45
Problem number : 12
Date solved : Sunday, March 30, 2025 at 01:04:01 AM
CAS classification : [_separable]

\begin{align*} r^{\prime }+\left (r-\frac {1}{r}\right ) \theta &=0 \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 33
ode:=diff(r(theta),theta)+(r(theta)-1/r(theta))*theta = 0; 
dsolve(ode,r(theta), singsol=all);
 
\begin{align*} r &= \sqrt {{\mathrm e}^{-\theta ^{2}} c_1 +1} \\ r &= -\sqrt {{\mathrm e}^{-\theta ^{2}} c_1 +1} \\ \end{align*}
Mathematica. Time used: 2.018 (sec). Leaf size: 57
ode=D[ r[\[Theta]], \[Theta] ]+(r[\[Theta]]-1/r[\[Theta]])*\[Theta]==0; 
ic={}; 
DSolve[{ode,ic},r[\[Theta]],\[Theta],IncludeSingularSolutions->True]
 
\begin{align*} r(\theta )\to -\sqrt {1+e^{-\theta ^2+2 c_1}} \\ r(\theta )\to \sqrt {1+e^{-\theta ^2+2 c_1}} \\ r(\theta )\to -1 \\ r(\theta )\to 1 \\ \end{align*}
Sympy. Time used: 0.585 (sec). Leaf size: 29
from sympy import * 
theta = symbols("theta") 
r = Function("r") 
ode = Eq(theta*(r(theta) - 1/r(theta)) + Derivative(r(theta), theta),0) 
ics = {} 
dsolve(ode,func=r(theta),ics=ics)
 
\[ \left [ r{\left (\theta \right )} = - \sqrt {C_{1} e^{- \theta ^{2}} + 1}, \ r{\left (\theta \right )} = \sqrt {C_{1} e^{- \theta ^{2}} + 1}\right ] \]