89.16.14 problem 14

Internal problem ID [24664]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 9. Nonhomogeneous Equations: Undetermined coefficients. Exercises at page 140
Problem number : 14
Date solved : Thursday, October 02, 2025 at 10:46:51 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} 5 y+4 y^{\prime }+y^{\prime \prime }&=50 x +13 \,{\mathrm e}^{3 x} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 31
ode:=diff(diff(y(x),x),x)+4*diff(y(x),x)+5*y(x) = 50*x+13*exp(3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-2 x} \sin \left (x \right ) c_2 +{\mathrm e}^{-2 x} \cos \left (x \right ) c_1 +10 x -8+\frac {{\mathrm e}^{3 x}}{2} \]
Mathematica. Time used: 0.147 (sec). Leaf size: 39
ode=D[y[x],{x,2}]+4*D[y[x],x]+5*y[x]== 50*x+13*Exp[3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 10 x+\frac {e^{3 x}}{2}+c_2 e^{-2 x} \cos (x)+c_1 e^{-2 x} \sin (x)-8 \end{align*}
Sympy. Time used: 0.150 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-50*x + 5*y(x) - 13*exp(3*x) + 4*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 10 x + \left (C_{1} \sin {\left (x \right )} + C_{2} \cos {\left (x \right )}\right ) e^{- 2 x} + \frac {e^{3 x}}{2} - 8 \]