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

\[ \boxed {x^{2} y^{\prime \prime }+y^{\prime } x +\left (x^{2}-\frac {1}{4}\right ) y=g \left (x \right )} \]

Solution by Maple

Time used: 0.032 (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 \left (x \right ) = \frac {\sin \left (x \right ) c_{2}}{\sqrt {x}}+\frac {\cos \left (x \right ) c_{1}}{\sqrt {x}}+\frac {\left (\int \frac {\cos \left (x \right ) g \left (x \right )}{x^{\frac {3}{2}}}d x \right ) \sin \left (x \right )-\left (\int \frac {\sin \left (x \right ) g \left (x \right )}{x^{\frac {3}{2}}}d x \right ) \cos \left (x \right )}{\sqrt {x}} \]

Solution by Mathematica

Time used: 0.203 (sec). Leaf size: 107

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

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