86.10.12 problem 12

Internal problem ID [23192]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 9. The operational method. Exercise 9b at page 134
Problem number : 12
Date solved : Thursday, October 02, 2025 at 09:24:12 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-2 y^{\prime }-y&=2 \cos \left (3 x \right )-3 \sin \left (2 x \right ) \end{align*}
Maple. Time used: 0.009 (sec). Leaf size: 50
ode:=diff(diff(y(x),x),x)-2*diff(y(x),x)-y(x) = 2*cos(3*x)-3*sin(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\left (1+\sqrt {2}\right ) x} c_2 +{\mathrm e}^{-\left (\sqrt {2}-1\right ) x} c_1 -\frac {3 \sin \left (3 x \right )}{34}-\frac {12 \cos \left (2 x \right )}{41}-\frac {5 \cos \left (3 x \right )}{34}+\frac {15 \sin \left (2 x \right )}{41} \]
Mathematica. Time used: 0.589 (sec). Leaf size: 67
ode=D[y[x],{x,2}]-2*D[y[x],x]-y[x]==2*Cos[3*x]-3*Sin[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {15}{41} \sin (2 x)-\frac {3}{34} \sin (3 x)-\frac {12}{41} \cos (2 x)-\frac {5}{34} \cos (3 x)+c_1 e^{x-\sqrt {2} x}+c_2 e^{\left (1+\sqrt {2}\right ) x} \end{align*}
Sympy. Time used: 0.183 (sec). Leaf size: 60
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x) + 3*sin(2*x) - 2*cos(3*x) - 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{x \left (1 - \sqrt {2}\right )} + C_{2} e^{x \left (1 + \sqrt {2}\right )} + \frac {15 \sin {\left (2 x \right )}}{41} - \frac {3 \sin {\left (3 x \right )}}{34} - \frac {12 \cos {\left (2 x \right )}}{41} - \frac {5 \cos {\left (3 x \right )}}{34} \]