82.36.3 problem Ex. 3

Internal problem ID [18850]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter VII. Linear equations with variable coefficients. Problems at page 88
Problem number : Ex. 3
Date solved : Thursday, March 13, 2025 at 01:03:22 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.008 (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 \left (x \right ) = c_{2} x^{4}+\frac {c_{1}}{x^{5}}-\frac {x^{2}}{14}-\frac {x}{9}-\frac {1}{20} \]
Mathematica. Time used: 0.02 (sec). Leaf size: 33
ode=x^2*D[y[x],{x,2}]+2*x*D[y[x],x]-20*y[x]==(x+1)^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.254 (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} \]