6.20.3 problem section 9.4, problem 11

Internal problem ID [2224]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 9 Introduction to Linear Higher Order Equations. Section 9.4. Variation of Parameters for Higher Order Equations. Page 503
Problem number : section 9.4, problem 11
Date solved : Tuesday, September 30, 2025 at 05:25:12 AM
CAS classification : [[_3rd_order, _exact, _linear, _nonhomogeneous]]

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