75.17.9 problem 559

Internal problem ID [17058]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 2 (Higher order ODEs). Section 15.3 Nonhomogeneous linear equations with constant coefficients. Superposition principle. Exercises page 137
Problem number : 559
Date solved : Tuesday, January 28, 2025 at 09:48:01 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Solution by Maple

Time used: 0.003 (sec). Leaf size: 23

dsolve(diff(y(x),x$2)-diff(y(x),x)-2*y(x)=4*x-2*exp(x),y(x), singsol=all)
 
\[ y = c_{2} {\mathrm e}^{-x}+{\mathrm e}^{2 x} c_{1} +{\mathrm e}^{x}-2 x +1 \]

Solution by Mathematica

Time used: 0.396 (sec). Leaf size: 78

DSolve[D[y[x],{x,2}]-D[y[x],x]-2*y[x]==4*x-2*Exp[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to e^{-x} \left (\int _1^x\frac {2}{3} e^{K[1]} \left (e^{K[1]}-2 K[1]\right )dK[1]+e^{3 x} \int _1^x-\frac {2}{3} e^{-2 K[2]} \left (e^{K[2]}-2 K[2]\right )dK[2]+c_2 e^{3 x}+c_1\right ) \]