76.33.5 problem Ex. 5

Internal problem ID [20183]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter VI. Linear equations with constant coefficients. Examples on chapter VI, page 80
Problem number : Ex. 5
Date solved : Thursday, October 02, 2025 at 05:34:00 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} 6 y-5 y^{\prime }+y^{\prime \prime }&=x +{\mathrm e}^{m x} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 57
ode:=diff(diff(y(x),x),x)-5*diff(y(x),x)+6*y(x) = x+exp(m*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{3 x} c_2 +{\mathrm e}^{2 x} c_1 +\frac {36 \,{\mathrm e}^{m x}+\left (6 x +5\right ) m^{2}+\left (-30 x -25\right ) m +36 x +30}{36 m^{2}-180 m +216} \]
Mathematica. Time used: 0.151 (sec). Leaf size: 58
ode=D[y[x],{x,2}]-5*D[y[x],x]+6*y[x]==x+Exp[m*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\left (m^2-5 m+6\right ) (6 x+5)+36 e^{m x}}{36 (m-3) (m-2)}+c_1 e^{2 x}+c_2 e^{3 x} \end{align*}
Sympy. Time used: 0.142 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
m = symbols("m") 
y = Function("y") 
ode = Eq(-x + 6*y(x) - exp(m*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_{1} e^{2 x} + C_{2} e^{3 x} + \frac {x}{6} + \frac {5}{36} + \frac {e^{m x}}{m^{2} - 5 m + 6} \]