77.37.8 problem 8

Internal problem ID [20737]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter VIII. Linear equations of second order. Excercise VIII (B) at page 128
Problem number : 8
Date solved : Thursday, October 02, 2025 at 06:22:34 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-2 \tan \left (x \right ) y^{\prime }+5 y&={\mathrm e}^{x} \sec \left (x \right ) \end{align*}
Maple. Time used: 0.011 (sec). Leaf size: 29
ode:=diff(diff(y(x),x),x)-2*tan(x)*diff(y(x),x)+5*y(x) = sec(x)*exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\sec \left (x \right ) \left (7 c_1 \cos \left (\sqrt {6}\, x \right )+7 c_2 \sin \left (\sqrt {6}\, x \right )+{\mathrm e}^{x}\right )}{7} \]
Mathematica. Time used: 0.134 (sec). Leaf size: 56
ode=D[y[x],{x,2}]-2*Tan[x]*D[y[x],x]+5*y[x]==Sec[x]*Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{84} \left (12 e^x+84 c_1 e^{-i \sqrt {6} x}-7 i \sqrt {6} c_2 e^{i \sqrt {6} x}\right ) \sec (x) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(5*y(x) - exp(x)/cos(x) - 2*tan(x)*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -((5*y(x) + Derivative(y(x), (x, 2)))*cos(x) - exp(x))/(2*cos(x)*tan(x)) + Derivative(y(x), x) cannot be solved by the factorable group method