33.2.7 problem Problem 11.50

Internal problem ID [7811]
Book : Schaums Outline Differential Equations, 4th edition. Bronson and Costa. McGraw Hill 2014
Section : Chapter 11. THE METHOD OF UNDETERMINED COEFFICIENTS. Supplementary Problems. page 101
Problem number : Problem 11.50
Date solved : Tuesday, September 30, 2025 at 05:05:48 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.099 (sec). Leaf size: 33
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^x \left (\int _1^x\left (e^{K[1]} K[1]+e^{-K[1]}\right )dK[1]+c_1\right ) \end{align*}
Sympy. Time used: 0.095 (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 \]