38.4.17 problem 18

Internal problem ID [6503]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 25. Second order differential equations. Further problems 25. page 1094
Problem number : 18
Date solved : Monday, January 27, 2025 at 02:09:21 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

With initial conditions

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

Solution by Maple

Time used: 0.012 (sec). Leaf size: 13

dsolve([diff(y(x),x$2)=3*sin(x)-4*y(x),y(0) = 0, D(y)(1/2*Pi) = 1],y(x), singsol=all)
 
\[ y = -\frac {\sin \left (2 x \right )}{2}+\sin \left (x \right ) \]

Solution by Mathematica

Time used: 0.019 (sec). Leaf size: 13

DSolve[{D[y[x],{x,2}]==3*Sin[x]-4*y[x],{y[0]==0,Derivative[1][y][Pi/2]==1}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to -(\sin (x) (\cos (x)-1)) \]