84.24.7 problem 14.16

Internal problem ID [22260]
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. Supplementary problems
Problem number : 14.16
Date solved : Thursday, October 02, 2025 at 08:36:46 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }-y&=x \,{\mathrm e}^{2 x}+1 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 18
ode:=diff(y(x),x)-y(x) = x*exp(2*x)+1; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (x -1\right ) {\mathrm e}^{2 x}+{\mathrm e}^{x} c_1 -1 \]
Mathematica. Time used: 0.035 (sec). Leaf size: 22
ode=D[y[x],x]-y[x]==x*Exp[2*x]+1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{2 x} (x-1)+c_1 e^x-1 \end{align*}
Sympy. Time used: 0.092 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*exp(2*x) - y(x) + Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{x} + \left (x - 1\right ) e^{2 x} - 1 \]