75.18.19 problem 608

Internal problem ID [17107]
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. Initial value problem. Exercises page 140
Problem number : 608
Date solved : Tuesday, January 28, 2025 at 09:52:50 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.088 (sec). Leaf size: 68

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