33.1.11 problem Problem 11.13

Internal problem ID [7803]
Book : Schaums Outline Differential Equations, 4th edition. Bronson and Costa. McGraw Hill 2014
Section : Chapter 11. THE METHOD OF UNDETERMINED COEFFICIENTS. page 95
Problem number : Problem 11.13
Date solved : Tuesday, September 30, 2025 at 05:05:40 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.001 (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.093 (sec). Leaf size: 40
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 e^{5 x} \left (\int _1^xe^{-5 K[1]} \left (-2 K[1]+3 e^{K[1]}+1\right )dK[1]+c_1\right ) \end{align*}
Sympy. Time used: 0.086 (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} \]