83.5.2 problem 2

Internal problem ID [19018]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter II. Equations of first order and first degree. Exercise II (D) at page 16
Problem number : 2
Date solved : Thursday, March 13, 2025 at 01:23:16 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 \left (x \right ) = \tan \left (x \right )-1+{\mathrm e}^{-\tan \left (x \right )} c_{1} \]
Mathematica. Time used: 0.09 (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