10.18 problem 20

Internal problem ID [700]

Book: Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section: Chapter 3, Second order linear equations, section 3.6, Variation of Parameters. page 190
Problem number: 20.
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

Solve \begin {gather*} \boxed {x^{2} y^{\prime \prime }+y^{\prime } x +\left (x^{2}-\frac {1}{4}\right ) y-g \relax (x )=0} \end {gather*}

Solution by Maple

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

dsolve(x^2*diff(y(x),x$2)+x*diff(y(x),x)+(x^2-25/100)*y(x) = g(x),y(x), singsol=all)
 

\[ y \relax (x ) = \frac {\sin \relax (x ) c_{2}}{\sqrt {x}}+\frac {\cos \relax (x ) c_{1}}{\sqrt {x}}+\frac {\left (\int \frac {\cos \relax (x ) g \relax (x )}{x^{\frac {3}{2}}}d x \right ) \sin \relax (x )-\left (\int \frac {\sin \relax (x ) g \relax (x )}{x^{\frac {3}{2}}}d x \right ) \cos \relax (x )}{\sqrt {x}} \]

Solution by Mathematica

Time used: 0.107 (sec). Leaf size: 96

DSolve[x^2*y''[x]+x*y'[x]+(x^2-25/100)*y[x] == g[x],y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to \frac {e^{-i x} \left (2 \left (\int _1^x\frac {i e^{i K[1]} g(K[1])}{2 K[1]^{3/2}}dK[1]+c_1\right )-i e^{2 i x} \left (\int _1^x\frac {e^{-i K[2]} g(K[2])}{K[2]^{3/2}}dK[2]+c_2\right )\right )}{2 \sqrt {x}} \\ \end{align*}