67.15.66 problem 22.13 (d)

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

\begin{align*} y^{\prime \prime \prime }-y^{\prime \prime }+y^{\prime }-y&=30 x \cos \left (2 x \right ) \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 39
ode:=diff(diff(diff(y(x),x),x),x)-diff(diff(y(x),x),x)+diff(y(x),x)-y(x) = 30*x*cos(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (30 x -98\right ) \cos \left (2 x \right )}{15}+\frac {\left (-60 x -64\right ) \sin \left (2 x \right )}{15}+c_1 \cos \left (x \right )+c_2 \,{\mathrm e}^{x}+c_3 \sin \left (x \right ) \]
Mathematica. Time used: 0.005 (sec). Leaf size: 49
ode=D[y[x],{x,3}]-D[y[x],{x,2}]+D[y[x],x]-y[x]==30*x*Cos[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -4 x \sin (2 x)-\frac {64}{15} \sin (2 x)+\left (2 x-\frac {98}{15}\right ) \cos (2 x)+c_3 e^x+c_1 \cos (x)+c_2 \sin (x) \end{align*}
Sympy. Time used: 0.159 (sec). Leaf size: 51
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-30*x*cos(2*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_{1} e^{x} + C_{2} \sin {\left (x \right )} + C_{3} \cos {\left (x \right )} - 4 x \sin {\left (2 x \right )} + 2 x \cos {\left (2 x \right )} - \frac {64 \sin {\left (2 x \right )}}{15} - \frac {98 \cos {\left (2 x \right )}}{15} \]