5.9 problem 9

Internal problem ID [5077]

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]]

Solve \begin {gather*} \boxed {x y^{\prime \prime }+2 y^{\prime }+y x -\sec \relax (x )=0} \end {gather*}

Solution by Maple

Time used: 0.016 (sec). Leaf size: 37

dsolve(x*diff(y(x),x$2)+2*diff(y(x),x)+x*y(x)=sec(x),y(x), singsol=all)
 

\[ y \relax (x ) = \frac {\sin \relax (x ) c_{2}}{x}+\frac {\cos \relax (x ) c_{1}}{x}+\frac {-\ln \left (\frac {1}{\cos \relax (x )}\right ) \cos \relax (x )+x \sin \relax (x )}{x} \]

Solution by Mathematica

Time used: 0.055 (sec). Leaf size: 59

DSolve[x*y''[x]+2*y'[x]+x*y[x]==Sec[x],y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to \frac {e^{-i x} \left (\log \left (1+e^{2 i x}\right )+e^{2 i x} \left (\log \left (1+e^{-2 i x}\right )-i c_2\right )+2 c_1\right )}{2 x} \\ \end{align*}