56.29.1 problem Ex 1

Internal problem ID [14233]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter VII, Linear differential equations with constant coefficients. Article 52. Summary. Page 117
Problem number : Ex 1
Date solved : Thursday, October 02, 2025 at 09:27:00 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} 6 y-5 y^{\prime }+y^{\prime \prime }&=\cos \left (x \right )-{\mathrm e}^{2 x} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 28
ode:=diff(diff(y(x),x),x)-5*diff(y(x),x)+6*y(x) = cos(x)-exp(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (1+x +c_1 \right ) {\mathrm e}^{2 x}+{\mathrm e}^{3 x} c_2 +\frac {\cos \left (x \right )}{10}-\frac {\sin \left (x \right )}{10} \]
Mathematica. Time used: 0.177 (sec). Leaf size: 34
ode=D[y[x],{x,2}]-5*D[y[x],x]+6*y[x]==Cos[x]-Exp[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{10} \left (-\sin (x)+\cos (x)+10 e^{2 x} \left (x+c_2 e^x+1+c_1\right )\right ) \end{align*}
Sympy. Time used: 0.157 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(6*y(x) + exp(2*x) - cos(x) - 5*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} e^{3 x} + \left (C_{1} + x\right ) e^{2 x} - \frac {\sin {\left (x \right )}}{10} + \frac {\cos {\left (x \right )}}{10} \]