86.9.4 problem 12

Internal problem ID [23174]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 7. Polar coordinates and vectors. Exercise 7a at page 109
Problem number : 12
Date solved : Thursday, October 02, 2025 at 09:23:51 PM
CAS classification : [_separable]

\begin{align*} \cot \left (\theta \right ) r^{\prime }&=r+b \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 12
ode:=cot(theta)*diff(r(theta),theta) = r(theta)+b; 
dsolve(ode,r(theta), singsol=all);
 
\[ r = -b +c_1 \sec \left (\theta \right ) \]
Mathematica. Time used: 0.024 (sec). Leaf size: 21
ode=Cot[\[Theta]]*D[r[\[Theta]],\[Theta]]==r[\[Theta]]+b; 
ic={}; 
DSolve[{ode,ic},r[\[Theta]],\[Theta],IncludeSingularSolutions->True]
 
\begin{align*} r(\theta )&\to -b+c_1 \sec (\theta )\\ r(\theta )&\to -b \end{align*}
Sympy. Time used: 0.184 (sec). Leaf size: 8
from sympy import * 
t = symbols("t") 
b = symbols("b") 
r = Function("r") 
ode = Eq(-b - r(t) + cot(t)*Derivative(r(t), t),0) 
ics = {} 
dsolve(ode,func=r(t),ics=ics)
 
\[ r{\left (t \right )} = \frac {C_{1}}{\cos {\left (t \right )}} - b \]