23.2.16 problem 6(e)

Internal problem ID [4133]
Book : Theory and solutions of Ordinary Differential equations, Donald Greenspan, 1960
Section : Chapter 3. Linear differential equations of second order. Exercises at page 31
Problem number : 6(e)
Date solved : Monday, January 27, 2025 at 08:37:10 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Solution by Maple

Time used: 0.005 (sec). Leaf size: 30

dsolve(diff(y(x),x$2)+2*y(x)=x+exp(2*x),y(x), singsol=all)
 
\[ y \left (x \right ) = c_{2} \sin \left (\sqrt {2}\, x \right )+\cos \left (\sqrt {2}\, x \right ) c_{1} +\frac {x}{2}+\frac {{\mathrm e}^{2 x}}{6} \]

Solution by Mathematica

Time used: 0.277 (sec). Leaf size: 42

DSolve[D[y[x],{x,2}]+2*y[x]==x+Exp[2*x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{6} \left (3 x+e^{2 x}+6 c_1 \cos \left (\sqrt {2} x\right )+6 c_2 \sin \left (\sqrt {2} x\right )\right ) \]