67.15.20 problem 22.7 (e)

Internal problem ID [16738]
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.7 (e)
Date solved : Thursday, October 02, 2025 at 01:38:21 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y-2 y^{\prime }+y^{\prime \prime }&=\left (-6 x -8\right ) \cos \left (2 x \right )+\left (8 x -11\right ) \sin \left (2 x \right ) \end{align*}
Maple. Time used: 0.007 (sec). Leaf size: 24
ode:=diff(diff(y(x),x),x)-2*diff(y(x),x)+y(x) = (-6*x-8)*cos(2*x)+(8*x-11)*sin(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = 2 \cos \left (2 x \right ) x +\sin \left (2 x \right )+\left (c_1 x +c_2 \right ) {\mathrm e}^{x} \]
Mathematica. Time used: 0.018 (sec). Leaf size: 28
ode=D[y[x],{x,2}]-2*D[y[x],x]+y[x]==(-6*x-8)*Cos[2*x]+(8*x-11)*Sin[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \sin (2 x)+2 x \cos (2 x)+e^x (c_2 x+c_1) \end{align*}
Sympy. Time used: 0.214 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((6*x + 8)*cos(2*x) - (8*x - 11)*sin(2*x) + y(x) - 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 2 x \cos {\left (2 x \right )} + \left (C_{1} + C_{2} x\right ) e^{x} + \sin {\left (2 x \right )} \]