83.26.14 problem 14

Internal problem ID [19267]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter VI. Homogeneous linear equations with variable coefficients. Exercise VI (C) at page 93
Problem number : 14
Date solved : Monday, March 31, 2025 at 07:03:50 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} x^{2} y^{\prime \prime }+2 x y^{\prime }-20 y&=\left (x +1\right )^{2} \end{align*}

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