1.11.20 problem 20

Internal problem ID [341]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 2. Linear Equations of Higher Order. Section 2.5 (Nonhomogeneous equations and undetermined coefficients). Problems at page 161
Problem number : 20
Date solved : Tuesday, September 30, 2025 at 03:57:33 AM
CAS classification : [[_3rd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime \prime }-y&={\mathrm e}^{x}+7 \end{align*}
Maple. Time used: 0.008 (sec). Leaf size: 49
ode:=diff(diff(diff(y(x),x),x),x)-y(x) = exp(x)+7; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -7-\frac {{\mathrm e}^{x} \ln \left ({\mathrm e}^{-x}\right )}{3}-\frac {{\mathrm e}^{x}}{3}+c_1 \,{\mathrm e}^{x}+c_2 \,{\mathrm e}^{-\frac {x}{2}} \cos \left (\frac {\sqrt {3}\, x}{2}\right )+c_3 \,{\mathrm e}^{-\frac {x}{2}} \sin \left (\frac {\sqrt {3}\, x}{2}\right ) \]
Mathematica. Time used: 0.404 (sec). Leaf size: 63
ode=D[y[x],{x,3}]-y[x]==Exp[x]+7; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{3} e^x (x-1+3 c_1)+c_2 e^{-x/2} \cos \left (\frac {\sqrt {3} x}{2}\right )+c_3 e^{-x/2} \sin \left (\frac {\sqrt {3} x}{2}\right )-7 \end{align*}
Sympy. Time used: 0.087 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x) - exp(x) + Derivative(y(x), (x, 3)) - 7,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + \frac {x}{3}\right ) e^{x} + \left (C_{2} \sin {\left (\frac {\sqrt {3} x}{2} \right )} + C_{3} \cos {\left (\frac {\sqrt {3} x}{2} \right )}\right ) e^{- \frac {x}{2}} - 7 \]