20.7.7 problem Problem 31

Internal problem ID [3722]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.3, The Method of Undetermined Coefficients. page 525
Problem number : Problem 31
Date solved : Sunday, March 30, 2025 at 02:06:31 AM
CAS classification : [[_3rd_order, _with_linear_symmetries]]

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

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