67.15.68 problem 22.13 (f)

Internal problem ID [16786]
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.13 (f)
Date solved : Thursday, October 02, 2025 at 01:38:50 PM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }-y^{\prime \prime }+y^{\prime }-y&=3 x \,{\mathrm e}^{x} \cos \left (x \right ) \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 37
ode:=diff(diff(diff(y(x),x),x),x)-diff(diff(y(x),x),x)+diff(y(x),x)-y(x) = 3*x*exp(x)*cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (\left (-30 x +57\right ) \cos \left (x \right )+\left (15 x +24\right ) \sin \left (x \right )+25 c_2 \right ) {\mathrm e}^{x}}{25}+c_1 \cos \left (x \right )+c_3 \sin \left (x \right ) \]
Mathematica. Time used: 0.008 (sec). Leaf size: 49
ode=D[y[x],{x,3}]-D[y[x],{x,2}]+D[y[x],x]-y[x]==3*x*Exp[x]*Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_3 e^x+\left (e^x \left (\frac {57}{25}-\frac {6 x}{5}\right )+c_1\right ) \cos (x)+\left (\frac {3}{25} e^x (5 x+8)+c_2\right ) \sin (x) \end{align*}
Sympy. Time used: 0.185 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-3*x*exp(x)*cos(x) - y(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} + \frac {3 \left (19 - 10 x\right ) \cos {\left (x \right )}}{25} + \frac {3 \left (5 x + 8\right ) \sin {\left (x \right )}}{25}\right ) e^{x} \]