82.39.8 problem Ex. 8

Internal problem ID [18861]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter VII. Linear equations with variable coefficients. End of chapter problems at page 91
Problem number : Ex. 8
Date solved : Thursday, March 13, 2025 at 01:03:38 PM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.002 (sec). Leaf size: 27
ode:=x^2*diff(diff(y(x),x),x)+x*diff(y(x),x)-y(x) = x^m; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {c_{1}}{x}+c_{2} x +\frac {x^{m}}{\left (m -1\right ) \left (m +1\right )} \]
Mathematica. Time used: 0.025 (sec). Leaf size: 27
ode=x^2*D[y[x],{x,2}]+x*D[y[x],x]-y[x]==x^m; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {x^m}{m^2-1}+c_2 x+\frac {c_1}{x} \]
Sympy. Time used: 0.294 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
m = symbols("m") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + x*Derivative(y(x), x) - x**m - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1}}{x} + C_{2} x + \frac {e^{m \log {\left (x \right )}}}{m^{2} - 1} \]