15.11.30 problem 30

Internal problem ID [3140]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 19, page 86
Problem number : 30
Date solved : Monday, January 27, 2025 at 07:23:17 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

With initial conditions

\begin{align*} y \left (0\right )&=3\\ y^{\prime }\left (0\right )&=2 \end{align*}

Solution by Maple

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

dsolve([diff(y(x),x$2)+y(x)=exp(x)*sin(x),y(0) = 3, D(y)(0) = 2],y(x), singsol=all)
 
\[ y = \frac {\left (-2 \,{\mathrm e}^{x}+17\right ) \cos \left (x \right )}{5}+\frac {\sin \left (x \right ) \left ({\mathrm e}^{x}+11\right )}{5} \]

Solution by Mathematica

Time used: 0.078 (sec). Leaf size: 28

DSolve[{D[y[x],{x,2}]+y[x]==Exp[x]*Sin[x],{y[0]==3,Derivative[1][y][0] ==2}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{5} \left (\left (e^x+11\right ) \sin (x)+\left (17-2 e^x\right ) \cos (x)\right ) \]