42.3.17 problem Example 3.46

Internal problem ID [8827]
Book : THEORY OF DIFFERENTIAL EQUATIONS IN ENGINEERING AND MECHANICS. K.T. CHAU, CRC Press. Boca Raton, FL. 2018
Section : Chapter 3. Ordinary Differential Equations. Section 3.5 HIGHER ORDER ODE. Page 181
Problem number : Example 3.46
Date solved : Tuesday, September 30, 2025 at 05:52:59 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-4 y^{\prime }+3 y&=x^{3} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 29
ode:=diff(diff(y(x),x),x)-4*diff(y(x),x)+3*y(x) = x^3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{3 x} c_2 +{\mathrm e}^{x} c_1 +\frac {x^{3}}{3}+\frac {4 x^{2}}{3}+\frac {26 x}{9}+\frac {80}{27} \]
Mathematica. Time used: 0.009 (sec). Leaf size: 39
ode=D[y[x],{x,2}]-4*D[y[x],x]+3*y[x]==x^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{27} \left (9 x^3+36 x^2+78 x+80\right )+c_1 e^x+c_2 e^{3 x} \end{align*}
Sympy. Time used: 0.114 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 + 3*y(x) - 4*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{x} + C_{2} e^{3 x} + \frac {x^{3}}{3} + \frac {4 x^{2}}{3} + \frac {26 x}{9} + \frac {80}{27} \]