82.34.2 problem Ex. 2

Internal problem ID [18845]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter VII. Linear equations with variable coefficients. Problems at page 83
Problem number : Ex. 2
Date solved : Thursday, March 13, 2025 at 01:03:15 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} x^{2} y^{\prime \prime }+y&=3 x^{2} \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 34
ode:=x^2*diff(diff(y(x),x),x)+y(x) = 3*x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \sqrt {x}\, \sin \left (\frac {\sqrt {3}\, \ln \left (x \right )}{2}\right ) c_{2} +\sqrt {x}\, \cos \left (\frac {\sqrt {3}\, \ln \left (x \right )}{2}\right ) c_{1} +x^{2} \]
Mathematica. Time used: 0.131 (sec). Leaf size: 47
ode=x^2*D[y[x],{x,2}]+y[x]==3*x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \sqrt {x} \left (x^{3/2}+c_1 \cos \left (\frac {1}{2} \sqrt {3} \log (x)\right )+c_2 \sin \left (\frac {1}{2} \sqrt {3} \log (x)\right )\right ) \]
Sympy. Time used: 0.249 (sec). Leaf size: 42
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) - 3*x**2 + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \sqrt {x} \sin {\left (\frac {\sqrt {3} \log {\left (x \right )}}{2} \right )} + C_{2} \sqrt {x} \cos {\left (\frac {\sqrt {3} \log {\left (x \right )}}{2} \right )} + x^{2} \]