56.3.17 problem 17

Internal problem ID [8875]
Book : Own collection of miscellaneous problems
Section : section 3.0
Problem number : 17
Date solved : Sunday, March 30, 2025 at 01:45:22 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.005 (sec). Leaf size: 18
ode:=x^2*diff(diff(y(x),x),x)+x*diff(y(x),x)-4*y(x) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_2 \,x^{2}+\frac {c_1}{x^{2}}-\frac {x}{3} \]
Mathematica. Time used: 0.016 (sec). Leaf size: 23
ode=x^2*D[y[x],{x,2}]+x*D[y[x],x]-4*y[x] == x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_2 x^2+\frac {c_1}{x^2}-\frac {x}{3} \]
Sympy. Time used: 0.211 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + x*Derivative(y(x), x) - x - 4*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1}}{x^{2}} + C_{2} x^{2} - \frac {x}{3} \]