70.1.16 problem 16

Internal problem ID [18602]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 2. First order differential equations. Section 2.1 (Separable equations). Problems at page 44
Problem number : 16
Date solved : Thursday, October 02, 2025 at 03:15:48 PM
CAS classification : [_separable]

\begin{align*} r^{\prime }&=\frac {r^{2}}{\theta } \end{align*}

With initial conditions

\begin{align*} r \left (1\right )&=2 \\ \end{align*}
Maple. Time used: 0.055 (sec). Leaf size: 14
ode:=diff(r(theta),theta) = r(theta)^2/theta; 
ic:=[r(1) = 2]; 
dsolve([ode,op(ic)],r(theta), singsol=all);
 
\[ r = -\frac {2}{2 \ln \left (\theta \right )-1} \]
Mathematica. Time used: 0.088 (sec). Leaf size: 15
ode=D[r[\[Theta]],\[Theta] ]==r[\[Theta]]^2/\[Theta]; 
ic={r[1]==2}; 
DSolve[{ode,ic},r[\[Theta]],\[Theta],IncludeSingularSolutions->True]
 
\begin{align*} r(\theta )&\to \frac {2}{1-2 \log (\theta )} \end{align*}
Sympy. Time used: 0.089 (sec). Leaf size: 12
from sympy import * 
theta = symbols("theta") 
r = Function("r") 
ode = Eq(Derivative(r(theta), theta) - r(theta)**2/theta,0) 
ics = {r(1): 2} 
dsolve(ode,func=r(theta),ics=ics)
 
\[ r{\left (\theta \right )} = - \frac {1}{\log {\left (\theta \right )} - \frac {1}{2}} \]