82.10.3 problem Ex. 3

Internal problem ID [18687]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter II. Equations of the first order and of the first degree. Exercises at page 27
Problem number : Ex. 3
Date solved : Monday, March 31, 2025 at 05:57:33 PM
CAS classification : [_linear]

\begin{align*} \cos \left (x \right )^{2} y^{\prime }+y&=\tan \left (x \right ) \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 15
ode:=cos(x)^2*diff(y(x),x)+y(x) = tan(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \tan \left (x \right )-1+{\mathrm e}^{-\tan \left (x \right )} c_1 \]
Mathematica. Time used: 0.174 (sec). Leaf size: 18
ode=Cos[x]^2*D[y[x],x]+y[x]==Tan[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \tan (x)+c_1 e^{-\tan (x)}-1 \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) + cos(x)**2*Derivative(y(x), x) - tan(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out