75.18.14 problem 603

Internal problem ID [17102]
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 : 603
Date solved : Tuesday, January 28, 2025 at 09:52:42 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-2 y^{\prime }+2 y&=4 \,{\mathrm e}^{x} \cos \left (x \right ) \end{align*}

With initial conditions

\begin{align*} y \left (\pi \right )&=\pi \,{\mathrm e}^{\pi }\\ y^{\prime }\left (\pi \right )&={\mathrm e}^{\pi } \end{align*}

Solution by Maple

Time used: 0.041 (sec). Leaf size: 25

dsolve([diff(y(x),x$2)-2*diff(y(x),x)+2*y(x)=4*exp(x)*cos(x),y(Pi) = Pi*exp(Pi), D(y)(Pi) = exp(Pi)],y(x), singsol=all)
 
\[ y = {\mathrm e}^{x} \left (2 x -\pi -1\right ) \sin \left (x \right )-\cos \left (x \right ) \pi \,{\mathrm e}^{x} \]

Solution by Mathematica

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

DSolve[{D[y[x],{x,2}]-2*D[y[x],x]+2*y[x]==4*Exp[x]*Cos[x],{y[Pi]==Pi*Exp[Pi],Derivative[1][y][Pi]==Exp[Pi]}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to e^x \left (-\sin (x) \int _1^{\pi }4 \cos ^2(K[1])dK[1]+\sin (x) \int _1^x4 \cos ^2(K[1])dK[1]+\pi \sin (x)-\sin (x)+2 \cos ^3(x)-\pi \cos (x)-2 \cos (x)\right ) \]