32.5.9 problem Exercise 11.9, page 97

Internal problem ID [5847]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 11, Bernoulli Equations
Problem number : Exercise 11.9, page 97
Date solved : Tuesday, March 04, 2025 at 11:48:14 PM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 15
ode:=tan(theta)*diff(r(theta),theta)-r(theta) = tan(theta)^2; 
dsolve(ode,r(theta), singsol=all);
 
\[ r = \left (\ln \left (\sec \left (\theta \right )+\tan \left (\theta \right )\right )+c_{1} \right ) \sin \left (\theta \right ) \]
Mathematica. Time used: 0.053 (sec). Leaf size: 14
ode=Tan[\[Theta]]*D[ r[\[Theta]], \[Theta] ]-r[\[Theta]]==Tan[\[Theta]]^2; 
ic={}; 
DSolve[{ode,ic},r[\[Theta]],\[Theta],IncludeSingularSolutions->True]
 
\[ r(\theta )\to \sin (\theta ) \left (\coth ^{-1}(\sin (\theta ))+c_1\right ) \]
Sympy. Time used: 0.776 (sec). Leaf size: 24
from sympy import * 
theta = symbols("theta") 
r = Function("r") 
ode = Eq(-r(theta) - tan(theta)**2 + tan(theta)*Derivative(r(theta), theta),0) 
ics = {} 
dsolve(ode,func=r(theta),ics=ics)
 
\[ r{\left (\theta \right )} = \left (C_{1} - \frac {\log {\left (\sin {\left (\theta \right )} - 1 \right )}}{2} + \frac {\log {\left (\sin {\left (\theta \right )} + 1 \right )}}{2}\right ) \sin {\left (\theta \right )} \]