82.33.23 problem Ex. 23

Internal problem ID [18845]
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. 23
Date solved : Monday, March 31, 2025 at 06:16:18 PM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

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

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