Variation Parameters A2Ea69
1. **State the problem:** Solve the differential equation $$\frac{d^2y}{dx^2} + 3\frac{dy}{dx} + 2y = \sin(e^x)$$ using variation of parameters.
2. **Find the homogeneous solution:** Solve the characteristic equation $$r^2 + 3r + 2 = 0$$ which factors as $$(r+1)(r+2) = 0$$ giving roots $$r = -1, -2$$.
3. The complementary solution is $$y_c = C_1 e^{-x} + C_2 e^{-2x}$$.
4. **Fundamental solutions:** $$y_1 = e^{-x}, \quad y_2 = e^{-2x}$$.
5. **Variation of parameters form:** Assume $$y_p = u_1(x) e^{-x} + u_2(x) e^{-2x}$$ where $$u_1, u_2$$ satisfy:
$$\begin{cases} u_1' e^{-x} + u_2' e^{-2x} = 0 \\ -u_1' e^{-x} - 2 u_2' e^{-2x} = \sin(e^x) \end{cases}$$
6. **Compute Wronskian:**
$$W = \begin{vmatrix} y_1 & y_2 \\ y_1' & y_2' \end{vmatrix} = \begin{vmatrix} e^{-x} & e^{-2x} \\ -e^{-x} & -2 e^{-2x} \end{vmatrix} = -e^{-3x}$$
7. **Solve for $u_1'$ and $u_2'$ using formulas:**
$$u_1' = -\frac{y_2 \cdot g(x)}{W} = -\frac{e^{-2x} \sin(e^x)}{-e^{-3x}} = e^x \sin(e^x)$$
$$u_2' = \frac{y_1 \cdot g(x)}{W} = \frac{e^{-x} \sin(e^x)}{-e^{-3x}} = -e^{2x} \sin(e^x)$$
8. **Integrate $u_1'$:**
Let $$t = e^x, dt = e^x dx$$
$$u_1 = \int e^x \sin(e^x) dx = \int \sin t dt = -\cos t + C = -\cos(e^x) + C$$
9. **Integrate $u_2'$:**
$$u_2 = \int -e^{2x} \sin(e^x) dx = -\int t \sin t dt$$
Using integration by parts:
$$\int t \sin t dt = -t \cos t + \sin t + C$$
So
$$u_2 = -(-t \cos t + \sin t) = t \cos t - \sin t = e^x \cos(e^x) - \sin(e^x) + C$$
10. **Construct particular solution:**
$$y_p = u_1 e^{-x} + u_2 e^{-2x} = -e^{-x} \cos(e^x) + (e^x \cos(e^x) - \sin(e^x)) e^{-2x}$$
Simplify:
$$y_p = -e^{-x} \cos(e^x) + e^{-x} \cos(e^x) - e^{-2x} \sin(e^x) = -e^{-2x} \sin(e^x)$$
11. **General solution:**
$$y = y_c + y_p = C_1 e^{-x} + C_2 e^{-2x} - e^{-2x} \sin(e^x)$$