85.65.1 problem 3

Internal problem ID [22881]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 4. Linear differential equations. B Exercises at page 213
Problem number : 3
Date solved : Thursday, October 02, 2025 at 09:16:10 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} x^{2} y^{\prime \prime }+3 x y^{\prime }-3 y&=x^{2}-4 x +2 \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 27
ode:=x^2*diff(diff(y(x),x),x)+3*x*diff(y(x),x)-3*y(x) = x^2-4*x+2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_2 x +\frac {c_1}{x^{3}}-\ln \left (x \right ) x +\frac {x^{2}}{5}-\frac {2}{3}+\frac {x}{4} \]
Mathematica. Time used: 0.013 (sec). Leaf size: 35
ode=x^2*D[y[x],{x,2}]+3*x*D[y[x],{x,1}]-3*y[x]==x^2-4*x+2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {c_1}{x^3}+\frac {x^2}{5}-x \log (x)+\left (\frac {1}{4}+c_2\right ) x-\frac {2}{3} \end{align*}
Sympy. Time used: 0.203 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) - x**2 + 3*x*Derivative(y(x), x) + 4*x - 3*y(x) - 2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1}}{x^{3}} + C_{2} x + \frac {x^{2}}{5} - x \log {\left (x \right )} - \frac {2}{3} \]