7.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, March 04, 2025 at 11:11:14 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.002 (sec). Leaf size: 42
ode:=diff(diff(diff(y(x),x),x),x)-y(x) = exp(x)+7; 
dsolve(ode,y(x), singsol=all);
 
\[ y = 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 )-7+\frac {\left (x +3 c_1 -1\right ) {\mathrm e}^{x}}{3} \]
Mathematica. Time used: 0.56 (sec). Leaf size: 63
ode=D[y[x],{x,3}]-y[x]==Exp[x]+7; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ 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 \]
Sympy. Time used: 0.153 (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 \]