62.27.8 problem Ex 8

Internal problem ID [12867]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter VII, Linear differential equations with constant coefficients. Article 50. Method of undetermined coefficients. Page 107
Problem number : Ex 8
Date solved : Wednesday, March 05, 2025 at 08:48:55 PM
CAS classification : [[_2nd_order, _missing_y]]

\begin{align*} y^{\prime \prime }-2 y^{\prime }&={\mathrm e}^{2 x}+1 \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 23
ode:=diff(diff(y(x),x),x)-2*diff(y(x),x) = exp(2*x)+1; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (2 x +2 c_{1} -1\right ) {\mathrm e}^{2 x}}{4}-\frac {x}{2}+c_{2} \]
Mathematica. Time used: 1.784 (sec). Leaf size: 64
ode=D[y[x],{x,2}]-2*D[y[x],x]==Exp[2*x]+1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \int _1^x\left (e^{2 K[1]} (c_1+K[1])-\frac {1}{2}\right )dK[1]+c_2 \\ y(x)\to \frac {1}{4} \left (-2 x+e^{2 x} (2 x-1)-e^2+2+4 c_2\right ) \\ \end{align*}
Sympy. Time used: 0.192 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-exp(2*x) - 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} - \frac {x}{2} + \left (C_{2} + \frac {x}{2}\right ) e^{2 x} \]