73.15.62 problem 22.12 (g)

Internal problem ID [15414]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 22. Method of undetermined coefficients. Additional exercises page 412
Problem number : 22.12 (g)
Date solved : Thursday, March 13, 2025 at 06:02:05 AM
CAS classification : [[_3rd_order, _with_linear_symmetries]]

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

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