75.17.3 problem 553

Internal problem ID [17052]
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 : 553
Date solved : Tuesday, January 28, 2025 at 09:47:44 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-y&=x +\sin \left (x \right ) \end{align*}

Solution by Maple

Time used: 0.006 (sec). Leaf size: 22

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

Solution by Mathematica

Time used: 0.095 (sec). Leaf size: 72

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