82.33.22 problem Ex. 22

Internal problem ID [18836]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter VI. Linear equations with constant coefficients. Examples on chapter VI, page 80
Problem number : Ex. 22
Date solved : Thursday, March 13, 2025 at 01:02:26 PM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.009 (sec). Leaf size: 37
ode:=diff(diff(diff(diff(y(x),x),x),x),x)-2*diff(diff(diff(y(x),x),x),x)-3*diff(diff(y(x),x),x)+4*diff(y(x),x)+4*y(x) = x^2*exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = {\mathrm e}^{-x} \left (c_3 x +c_{1} \right )+\left (c_4 x +c_{2} \right ) {\mathrm e}^{2 x}+\frac {\left (x^{2}+2 x +\frac {7}{2}\right ) {\mathrm e}^{x}}{4} \]
Mathematica. Time used: 0.007 (sec). Leaf size: 49
ode=D[y[x],{x,4}]-2*D[y[x],{x,3}]-3*D[y[x],{x,2}]+4*D[y[x],x]+4*y[x]==x^2*Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{8} e^x \left (2 x^2+4 x+7\right )+e^{-x} (c_2 x+c_1)+e^{2 x} (c_4 x+c_3) \]
Sympy. Time used: 0.353 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*exp(x) + 4*y(x) + 4*Derivative(y(x), x) - 3*Derivative(y(x), (x, 2)) - 2*Derivative(y(x), (x, 3)) + Derivative(y(x), (x, 4)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + C_{2} x\right ) e^{- x} + \left (C_{3} + C_{4} x\right ) e^{2 x} + \frac {\left (2 x^{2} + 4 x + 7\right ) e^{x}}{8} \]