Internal problem ID [5830]
Book: Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold
Scientific. Singapore. 1995
Section: Chapter 2. Linear homogeneous equations. Section 2.3.4 problems. page 104
Problem number: 9.
ODE order: 2.
ODE degree: 1.
CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]
\[ \boxed {x y^{\prime \prime }+2 y^{\prime }+x y=\sec \left (x \right )} \]
✓ Solution by Maple
Time used: 0.016 (sec). Leaf size: 26
dsolve(x*diff(y(x),x$2)+2*diff(y(x),x)+x*y(x)=sec(x),y(x), singsol=all)
\[ y \left (x \right ) = \frac {-\ln \left (\sec \left (x \right )\right ) \cos \left (x \right )+\cos \left (x \right ) c_{1} +\sin \left (x \right ) \left (x +c_{2} \right )}{x} \]
✓ Solution by Mathematica
Time used: 0.077 (sec). Leaf size: 65
DSolve[x*y''[x]+2*y'[x]+x*y[x]==Sec[x],y[x],x,IncludeSingularSolutions -> True]
\[ y(x)\to \frac {e^{-i x} \left (e^{2 i x} \log \left (1+e^{-2 i x}\right )+\log \left (1+e^{2 i x}\right )-i c_2 e^{2 i x}+2 c_1\right )}{2 x} \]