34.4.9 problem 19 (j)

Internal problem ID [7936]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 6. Equations of first order and first degree (Linear equations). Supplemetary problems. Page 39
Problem number : 19 (j)
Date solved : Tuesday, September 30, 2025 at 05:10:29 PM
CAS classification : [_linear]

\begin{align*} r^{\prime }+2 r \cos \left (\theta \right )+\sin \left (2 \theta \right )&=0 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 17
ode:=diff(r(theta),theta)+2*r(theta)*cos(theta)+sin(2*theta) = 0; 
dsolve(ode,r(theta), singsol=all);
 
\[ r = -\sin \left (\theta \right )+\frac {1}{2}+{\mathrm e}^{-2 \sin \left (\theta \right )} c_1 \]
Mathematica. Time used: 0.046 (sec). Leaf size: 54
ode=D[r[t],t]+(2*r[t]*Cos[t]+Sin[2*t])==0; 
ic={}; 
DSolve[{ode,ic},r[t],t,IncludeSingularSolutions->True]
 
\begin{align*} r(t)&\to \exp \left (\int _1^t-2 \cos (K[1])dK[1]\right ) \left (\int _1^t-\exp \left (-\int _1^{K[2]}-2 \cos (K[1])dK[1]\right ) \sin (2 K[2])dK[2]+c_1\right ) \end{align*}
Sympy. Time used: 0.312 (sec). Leaf size: 17
from sympy import * 
theta = symbols("theta") 
r = Function("r") 
ode = Eq(2*r(theta)*cos(theta) + sin(2*theta) + Derivative(r(theta), theta),0) 
ics = {} 
dsolve(ode,func=r(theta),ics=ics)
 
\[ r{\left (\theta \right )} = C_{1} e^{- 2 \sin {\left (\theta \right )}} - \sin {\left (\theta \right )} + \frac {1}{2} \]