44.8.10 problem 2(b)

Internal problem ID [9212]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 1. What is a differential equation. Problems for Review and Discovery. Page 53
Problem number : 2(b)
Date solved : Tuesday, September 30, 2025 at 06:14:48 PM
CAS classification : [_linear]

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

With initial conditions

\begin{align*} y \left (1\right )&=2 \\ \end{align*}
Maple. Time used: 0.086 (sec). Leaf size: 41
ode:=x^2*diff(y(x),x)-2*y(x) = 3*x^2; 
ic:=[y(1) = 2]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -{\mathrm e}^{\frac {-2+2 x}{x}}+3 x +6 \,{\mathrm e}^{-\frac {2}{x}} \left (-\operatorname {Ei}_{1}\left (-2\right )+\operatorname {Ei}_{1}\left (-\frac {2}{x}\right )\right ) \]
Mathematica. Time used: 0.025 (sec). Leaf size: 36
ode=x^2*D[y[x],x]-2*y[x]==3*x^2; 
ic={y[1]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-2/x} \left (\int _1^x3 e^{\frac {2}{K[1]}}dK[1]+2 e^2\right ) \end{align*}
Sympy. Time used: 0.791 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), x) - 3*x**2 - 2*y(x),0) 
ics = {y(1): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 3 x - 6 e^{- \frac {2}{x}} \operatorname {Ei}{\left (\frac {2}{x} \right )} + \left (- e^{2} + 6 \operatorname {Ei}{\left (2 \right )}\right ) e^{- \frac {2}{x}} \]