32.5.5 problem Exercise 11.5, page 97

Internal problem ID [5843]
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.5, page 97
Date solved : Tuesday, March 04, 2025 at 11:47:59 PM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 21
ode:=diff(r(theta),theta) = (r(theta)+exp(-theta))*tan(theta); 
dsolve(ode,r(theta), singsol=all);
 
\[ r = \frac {\left (-\tan \left (\theta \right )-1\right ) {\mathrm e}^{-\theta }}{2}+\sec \left (\theta \right ) c_{1} \]
Mathematica. Time used: 0.104 (sec). Leaf size: 24
ode=D[ r[\[Theta]], \[Theta] ]==(r[\[Theta]]+Exp[-\[Theta]])*Tan[\[Theta]]; 
ic={}; 
DSolve[{ode,ic},r[\[Theta]],\[Theta],IncludeSingularSolutions->True]
 
\[ r(\theta )\to -\frac {1}{2} e^{-\theta } (\tan (\theta )+1)+c_1 \sec (\theta ) \]
Sympy. Time used: 4.921 (sec). Leaf size: 26
from sympy import * 
theta = symbols("theta") 
r = Function("r") 
ode = Eq((-r(theta) - exp(-theta))*tan(theta) + Derivative(r(theta), theta),0) 
ics = {} 
dsolve(ode,func=r(theta),ics=ics)
 
\[ - \int r{\left (\theta \right )} \cos {\left (\theta \right )} \tan {\left (\theta \right )}\, d\theta - \int e^{- \theta } \cos {\left (\theta \right )} \tan {\left (\theta \right )}\, d\theta = C_{1} \]