36.3.14 problem 15

Internal problem ID [6335]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.4, Exact equations. Exercises. page 64
Problem number : 15
Date solved : Sunday, March 30, 2025 at 10:51:58 AM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 13
ode:=cos(theta)*diff(r(theta),theta)-r(theta)*sin(theta)+exp(theta) = 0; 
dsolve(ode,r(theta), singsol=all);
 
\[ r = \left (-{\mathrm e}^{\theta }+c_1 \right ) \sec \left (\theta \right ) \]
Mathematica. Time used: 0.052 (sec). Leaf size: 16
ode=Cos[\[Theta]]*D[ r[\[Theta]], \[Theta] ]-(r[\[Theta]]*Sin[\[Theta]]-Exp[\[Theta]])==0; 
ic={}; 
DSolve[{ode,ic},r[\[Theta]],\[Theta],IncludeSingularSolutions->True]
 
\[ r(\theta )\to \left (-e^{\theta }+c_1\right ) \sec (\theta ) \]
Sympy. Time used: 0.921 (sec). Leaf size: 10
from sympy import * 
theta = symbols("theta") 
r = Function("r") 
ode = Eq(-r(theta)*sin(theta) + exp(theta) + cos(theta)*Derivative(r(theta), theta),0) 
ics = {} 
dsolve(ode,func=r(theta),ics=ics)
 
\[ r{\left (\theta \right )} = \frac {C_{1} - e^{\theta }}{\cos {\left (\theta \right )}} \]