82.33.21 problem Ex. 21

Internal problem ID [18843]
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. 21
Date solved : Monday, March 31, 2025 at 06:16:16 PM
CAS classification : [[_3rd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.005 (sec). Leaf size: 24
ode:=diff(diff(diff(y(x),x),x),x)+3*diff(diff(y(x),x),x)+3*diff(y(x),x)+y(x) = exp(-x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-x} \left (\frac {1}{6} x^{3}+c_1 +c_2 x +c_3 \,x^{2}\right ) \]
Mathematica. Time used: 0.01 (sec). Leaf size: 34
ode=D[y[x],{x,3}]+3*D[y[x],{x,2}]+3*D[y[x],x]+y[x]==Exp[-x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{6} e^{-x} \left (x^3+6 c_3 x^2+6 c_2 x+6 c_1\right ) \]
Sympy. Time used: 0.257 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) + 3*Derivative(y(x), x) + 3*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)) - exp(-x),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}{6}\right )\right )\right ) e^{- x} \]