85.64.3 problem 1 (c)

Internal problem ID [22870]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 4. Linear differential equations. A Exercises at page 213
Problem number : 1 (c)
Date solved : Thursday, October 02, 2025 at 09:15:58 PM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

\begin{align*} x^{2} y^{\prime \prime }-2 y&=x \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 18
ode:=x^2*diff(diff(y(x),x),x)-2*y(x) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_2 \,x^{2}+\frac {c_1}{x}-\frac {x}{2} \]
Mathematica. Time used: 0.009 (sec). Leaf size: 23
ode=x^2*D[y[x],{x,2}]-2*y[x]==x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_2 x^2-\frac {x}{2}+\frac {c_1}{x} \end{align*}
Sympy. Time used: 0.120 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) - x - 2*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1}}{x} + C_{2} x^{2} - \frac {x}{2} \]