64.11.13 problem 13

Internal problem ID [13384]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.3. The method of undetermined coefficients. Exercises page 151
Problem number : 13
Date solved : Wednesday, March 05, 2025 at 09:51:36 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y^{\prime }-6 y&=10 \,{\mathrm e}^{2 x}-18 \,{\mathrm e}^{3 x}-6 x -11 \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 36
ode:=diff(diff(y(x),x),x)+diff(y(x),x)-6*y(x) = 10*exp(2*x)-18*exp(3*x)-6*x-11; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-3 x} \left (\left (2 x +c_{1} -\frac {2}{5}\right ) {\mathrm e}^{5 x}+\left (x +2\right ) {\mathrm e}^{3 x}+c_{2} -3 \,{\mathrm e}^{6 x}\right ) \]
Mathematica. Time used: 0.466 (sec). Leaf size: 106
ode=D[y[x],{x,2}]+D[y[x],x]-6*y[x]==10*Exp[2*x]-18*Exp[3*x]-6*x-11; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-3 x} \left (\int _1^x\frac {1}{5} e^{3 K[1]} \left (6 K[1]-10 e^{2 K[1]}+18 e^{3 K[1]}+11\right )dK[1]+e^{5 x} \int _1^x-\frac {1}{5} e^{-2 K[2]} \left (6 K[2]-10 e^{2 K[2]}+18 e^{3 K[2]}+11\right )dK[2]+c_2 e^{5 x}+c_1\right ) \]
Sympy. Time used: 0.221 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(6*x - 6*y(x) + 18*exp(3*x) - 10*exp(2*x) + Derivative(y(x), x) + Derivative(y(x), (x, 2)) + 11,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} e^{- 3 x} + x + \left (C_{1} + 2 x\right ) e^{2 x} - 3 e^{3 x} + 2 \]