73.15.23 problem 22.9 (a)

Internal problem ID [15375]
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.9 (a)
Date solved : Thursday, March 13, 2025 at 05:56:54 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.005 (sec). Leaf size: 24
ode:=diff(diff(y(x),x),x)-3*diff(y(x),x)-10*y(x) = -3*exp(-2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (7 \,{\mathrm e}^{7 x} c_{2} +7 c_{1} +3 x \right ) {\mathrm e}^{-2 x}}{7} \]
Mathematica. Time used: 0.041 (sec). Leaf size: 32
ode=D[y[x],{x,2}]-3*D[y[x],x]-10*y[x]==-3*Exp[-2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{49} e^{-2 x} \left (21 x+49 c_2 e^{7 x}+3+49 c_1\right ) \]
Sympy. Time used: 0.268 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-10*y(x) - 3*Derivative(y(x), x) + Derivative(y(x), (x, 2)) + 3*exp(-2*x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} e^{5 x} + \left (C_{1} + \frac {3 x}{7}\right ) e^{- 2 x} \]