84.23.8 problem 14.8

Internal problem ID [22252]
Book : Schaums outline series. Differential Equations By Richard Bronson. 1973. McGraw-Hill Inc. ISBN 0-07-008009-7
Section : Chapter 14. The method of undetermined coefficients. Solved problems. Page 71
Problem number : 14.8
Date solved : Thursday, October 02, 2025 at 08:36:39 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }-5 y&=3 \,{\mathrm e}^{x}-2 x +1 \end{align*}
Maple. Time used: 0.000 (sec). Leaf size: 19
ode:=diff(y(x),x)-5*y(x) = 3*exp(x)-2*x+1; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {3}{25}-\frac {3 \,{\mathrm e}^{x}}{4}+\frac {2 x}{5}+{\mathrm e}^{5 x} c_1 \]
Mathematica. Time used: 0.09 (sec). Leaf size: 29
ode=D[y[x],x]-5*y[x]==3*Exp[x]-2*x+1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {2 x}{5}-\frac {3 e^x}{4}+c_1 e^{5 x}-\frac {3}{25} \end{align*}
Sympy. Time used: 0.085 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x - 5*y(x) - 3*exp(x) + Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{5 x} + \frac {2 x}{5} - \frac {3 e^{x}}{4} - \frac {3}{25} \]