49.10.6 problem 1(f)

Internal problem ID [7664]
Book : An introduction to Ordinary Differential Equations. Earl A. Coddington. Dover. NY 1961
Section : Chapter 2. Linear equations with constant coefficients. Page 89
Problem number : 1(f)
Date solved : Monday, January 27, 2025 at 03:09:11 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-2 i y^{\prime }-y&={\mathrm e}^{i x}-2 \,{\mathrm e}^{-i x} \end{align*}

Solution by Maple

Time used: 0.018 (sec). Leaf size: 54

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

Solution by Mathematica

Time used: 0.286 (sec). Leaf size: 39

DSolve[D[y[x],{x,2}]-2*I*D[y[x],x]-y[x]==Exp[I*x]-2*Exp[-I*x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{2} e^{-i x} \left (1+e^{2 i x} \left (x^2+2 c_2 x+2 c_1\right )\right ) \]