6.10.14 problem 14

Internal problem ID [1818]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 5 linear second order equations. Section 5.7 Variation of Parameters. Page 262
Problem number : 14
Date solved : Tuesday, September 30, 2025 at 05:19:58 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} 2 x y^{\prime \prime }+2 y^{\prime }+2 y&=\sin \left (\sqrt {x}\right ) \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 71
ode:=2*x*diff(diff(y(x),x),x)+2*diff(y(x),x)+2*y(x) = sin(x^(1/2)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \operatorname {BesselJ}\left (0, 2 \sqrt {x}\right ) c_2 +\operatorname {BesselY}\left (0, 2 \sqrt {x}\right ) c_1 +\frac {\pi \int \operatorname {BesselJ}\left (0, 2 \sqrt {x}\right ) \sin \left (\sqrt {x}\right )d x \operatorname {BesselY}\left (0, 2 \sqrt {x}\right )}{2}-\frac {\pi \int \operatorname {BesselY}\left (0, 2 \sqrt {x}\right ) \sin \left (\sqrt {x}\right )d x \operatorname {BesselJ}\left (0, 2 \sqrt {x}\right )}{2} \]
Mathematica. Time used: 6.134 (sec). Leaf size: 110
ode=2*x*D[y[x],{x,2}]+2*D[y[x],x]+2*y[x]==Sin[Sqrt[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \operatorname {BesselJ}\left (0,2 \sqrt {x}\right ) \int _1^x-\frac {1}{2} \pi \operatorname {BesselY}\left (0,2 \sqrt {K[1]}\right ) \sin \left (\sqrt {K[1]}\right )dK[1]+2 \operatorname {BesselY}\left (0,2 \sqrt {x}\right ) \int _1^x\frac {1}{4} \pi \operatorname {BesselJ}\left (0,2 \sqrt {K[2]}\right ) \sin \left (\sqrt {K[2]}\right )dK[2]+c_1 \operatorname {BesselJ}\left (0,2 \sqrt {x}\right )+2 c_2 \operatorname {BesselY}\left (0,2 \sqrt {x}\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*Derivative(y(x), (x, 2)) + 2*y(x) - sin(sqrt(x)) + 2*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE x*Derivative(y(x), (x, 2)) + y(x) - sin(sqrt(x))/2 + Derivative(y(x), x) cannot be solved by the factorable group method