10.10.18 problem 20

Internal problem ID [1350]
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
Date solved : Monday, January 27, 2025 at 04:52:00 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{2} y^{\prime \prime }+x y^{\prime }+\left (x^{2}-\frac {1}{4}\right ) y&=g \left (x \right ) \end{align*}

Solution by Maple

Time used: 0.014 (sec). Leaf size: 44

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 = \frac {c_2 \sin \left (x \right )+\cos \left (x \right ) c_1 +\left (\int \frac {\cos \left (x \right ) g \left (x \right )}{x^{{3}/{2}}}d x \right ) \sin \left (x \right )-\left (\int \frac {\sin \left (x \right ) g \left (x \right )}{x^{{3}/{2}}}d x \right ) \cos \left (x \right )}{\sqrt {x}} \]

Solution by Mathematica

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

DSolve[x^2*D[y[x],{x,2}]+x*D[y[x],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}} \]