76.17.16 problem 25

Internal problem ID [17631]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 4. Second order linear equations. Section 4.7 (Variation of parameters). Problems at page 280
Problem number : 25
Date solved : Monday, March 31, 2025 at 04:23:06 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.027 (sec). Leaf size: 26
ode:=x^2*diff(diff(y(x),x),x)+x*diff(y(x),x)+(x^2-1/4)*y(x) = 3*x^(3/2)*sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {3 \left (\left (x -\frac {2 c_1}{3}\right ) \cos \left (x \right )+\sin \left (x \right ) \left (-\frac {2 c_2}{3}-1\right )\right )}{2 \sqrt {x}} \]
Mathematica. Time used: 0.057 (sec). Leaf size: 54
ode=x^2*D[y[x],{x,2}]+x*D[y[x],x]+(x^2-1/4)*y[x]==3*x^(3/2)*Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {e^{-i x} \left (-6 x-e^{2 i x} (6 x+3 i+4 i c_2)+3 i+8 c_1\right )}{8 \sqrt {x}} \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-3*x**(3/2)*sin(x) + x**2*Derivative(y(x), (x, 2)) + x*Derivative(y(x), x) + (x**2 - 1/4)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -3*sqrt(x)*sin(x) + x*y(x) + x*Derivative(y(x), (x, 2)) + Derivative(y(x), x) - y(x)/(4*x) cannot be solved by the factorable group method