6.9.9 problem 9

Internal problem ID [1765]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 5 linear second order equations. Section 5.6 Reduction or order. Page 253
Problem number : 9
Date solved : Tuesday, September 30, 2025 at 05:19:10 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using reduction of order method given that one solution is

\begin{align*} y&=x^{2} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 19
ode:=x^2*diff(diff(y(x),x),x)+x*diff(y(x),x)-4*y(x) = -6*x-4; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_2 \,x^{2}+\frac {c_1}{x^{2}}+2 x +1 \]
Mathematica. Time used: 0.011 (sec). Leaf size: 22
ode=x^2*D[y[x],{x,2}]+x*D[y[x],x]-4*y[x]==-6*x-4; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_2 x^2+\frac {c_1}{x^2}+2 x+1 \end{align*}
Sympy. Time used: 0.195 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + x*Derivative(y(x), x) + 6*x - 4*y(x) + 4,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1}}{x^{2}} + C_{2} x^{2} + 2 x + 1 \]