Find the general solution of y'' - 2y' + 2y = 4e^(x)sin x
Find the general solution of $y'' - 2y' + 2y = 4e^{x}\sin x$.
Explanation of Method
With r=1±i a characteristic root, the exponential shift D→D+1 turns the equation into a nested-resonant auxiliary problem v″+v=4sin x.
Step 1: Homogeneous solution
\[ r^2-2r+2=0 \implies r=\frac{2\pm\sqrt{4-8}}{2}=1\pm i. \]
\[ Y_h = e^{x}(C_1\cos x + C_2\sin x). \]
Step 2: Diagnose resonance and set up the shift
The right-hand side $4e^x\sin x$ has $\alpha=1,\ \beta=1$, so its associated exponents are $r=1\pm i$ — exactly the characteristic roots ($s=1$). The trial must therefore carry an extra factor of $x$: $y^*=xe^x(A\cos x+B\sin x)$. Write $y^*=e^x v$ with $v=x(A\cos x+B\sin x)$, and use the exponential-shift identity $L(D)[e^xv]=e^xL(D+1)[v]$ with $L(D)=D^2-2D+2$:
\[ L(D+1)=(D+1)^2-2(D+1)+2 = D^2+2D+1-2D-2+2 = D^2+1. \] So $v$ must satisfy $v''+v=4\sin x$.
Step 3: A nested resonance
Notice $r=\pm i$ are themselves roots of $D^2+1$, so this reduced equation is again resonant with $\sin x$ — consistent with $v$ already carrying the factor $x$. With $v=x(A\cos x+B\sin x)$:
\[ v' = A\cos x+B\sin x + x(-A\sin x+B\cos x), \]
\[ v'' = -2A\sin x+2B\cos x + x(-A\cos x-B\sin x). \]
The $x$-dependent parts of $v''$ and $v$ cancel exactly (as they must, since $x^s$ was chosen to remove the resonant duplication), leaving: \[v''+v = -2A\sin x+2B\cos x = 4\sin x \implies -2A=4,\ 2B=0 \implies A=-2,\ B=0.\]
Step 4: Assemble and verify
\[ v=-2x\cos x, \qquad y^* = e^x v = -2xe^x\cos x. \]
Check directly: $v'=-2\cos x+2x\sin x$, $v''=2\sin x+2\sin x+2x\cos x=4\sin x+2x\cos x$, so
\[ v''+v = (4\sin x+2x\cos x)+(-2x\cos x) = 4\sin x.\ \checkmark \]
Step 5: General solution
The solution is recorded in the result below.
Result
Final answer:
\[\boxed{\,y = e^{x}(C_1\cos x + C_2\sin x) - 2xe^{x}\cos x\,}\]