81.4.2 problem 5-3

Internal problem ID [21516]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 5. Integrating factors. Page 72.
Problem number : 5-3
Date solved : Thursday, October 02, 2025 at 07:46:34 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }+\tan \left (\theta \right ) y&=\cos \left (\theta \right ) \end{align*}
Maple. Time used: 0.000 (sec). Leaf size: 10
ode:=diff(y(theta),theta)+tan(theta)*y(theta) = cos(theta); 
dsolve(ode,y(theta), singsol=all);
 
\[ y = \left (\theta +c_1 \right ) \cos \left (\theta \right ) \]
Mathematica. Time used: 0.033 (sec). Leaf size: 12
ode=D[y[\[Theta]],\[Theta]]+Tan[\[Theta]]*y[\[Theta]]==Cos[\[Theta]]; 
ic={}; 
DSolve[{ode,ic},y[\[Theta]],\[Theta],IncludeSingularSolutions->True]
 
\begin{align*} y(\theta )&\to (\theta +c_1) \cos (\theta ) \end{align*}
Sympy. Time used: 0.257 (sec). Leaf size: 8
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(y(t)*tan(t) - cos(t) + Derivative(y(t), t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (C_{1} + t\right ) \cos {\left (t \right )} \]