75.19.15 problem 632

Internal problem ID [17060]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 2 (Higher order ODEs). Section 15.4 Nonhomogeneous linear equations with constant coefficients. The Euler equations. Exercises page 143
Problem number : 632
Date solved : Monday, March 31, 2025 at 03:39:36 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 = \frac {c_1}{x}+c_2 x +\frac {x^{m}}{\left (m -1\right ) \left (m +1\right )} \]
Mathematica. Time used: 0.024 (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.289 (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} \]