85.66.3 problem 5

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

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