Step 1: Identify the standard form
The equation is already in the standard form:
\(\begin{aligned} \frac{dy}{dx} + P(x)y = Q(x) \end{aligned}\)
where:
\(\begin{aligned} P(x) = 2, \quad Q(x) = e^x(3\sin x + 2\cos 2x) \end{aligned}\)
Step 2: Find the integrating factor (IF)
The integrating factor is given by:
\(\begin{aligned} \text{IF} = e^{\int P(x) \, dx} = e^{\int 2 \, dx} = e^{2x} \end{aligned}\).
Step 3: Multiply through by the integrating factor
Multiply the entire equation by e2xe^{2x}:
\(\begin{aligned} e^{2x} \frac{dy}{dx} + 2e^{2x}y = e^{2x} \cdot e^x(3\sin x + 2\cos 2x) \end{aligned}\)
Simplify:
\( \begin{aligned} \frac{d}{dx}(e^{2x}y) = e^{3x}(3\sin x + 2\cos 2x) \end{aligned} \)
Step 4: Integrate both sides
Integrate the equation:
\( \begin{aligned} e^{2x}y = \int e^{3x}(3\sin x + 2\cos 2x) \, dx \end{aligned} \)
Step 5: Solve the integral
Split the integral:
\( \begin{aligned} \int e^{3x}(3\sin x + 2\cos 2x) dx = 3 \int e^{3x}\sin x dx + 2 \int e^{3x}\cos 2x \, dx \end{aligned} \)
(a) Solve \( \begin{aligned} \int e^{3x} \sin x dx \end{aligned} \)
Let \( \begin{aligned} \int e^{3x} \sin x dx \end{aligned} \) Use integration by parts:
\( \begin{aligned} \int e^{ax} \sin bx dx = \frac{e^{ax}}{a^2 + b^2}(a \sin bx - b \cos bx) \end{aligned} \)
Here, \( a = 3 \) and \( b = 1 \):
\( \begin{aligned} I_1 = \frac{e^{3x}}{3^2 + 1^2}(3 \sin x - 1 \cos x) = \frac{e^{3x}}{10}(3\sin x - \cos x) \end{aligned} \)
(b) Solve \( \begin{aligned} \int e^{3x} \cos 2x dx \end{aligned} \)
Let \( \begin{aligned} I_2 = \int e^{3x} \cos 2x dx \end{aligned} \) Again, use the formula for \( \begin{aligned} \int e^{ax} \cos bx dx \end{aligned} \):
\( \begin{aligned} \int e^{ax} \cos bx dx = \frac{e^{ax}}{a^2 + b^2}(a \cos bx + b \sin bx) \end{aligned} \)
Here, \( a = 3 \) and \( b = 2 \):
\( \begin{aligned} I_2 = \frac{e^{3x}}{3^2 + 2^2}(3 \cos 2x + 2 \sin 2x) = \frac{e^{3x}}{13}(3\cos 2x + 2\sin 2x) \end{aligned} \)
Step 6: Combine results
Now, substitute \( I_1 \) and \( I_2 \) back into the integral:
\( \begin{aligned} \int e^{3x}(3\sin x + 2\cos 2x) dx = 3 \cdot \frac{e^{3x}}{10}(3\sin x - \cos x) + 2 \cdot \frac{e^{3x}}{13}(3\cos 2x + 2\sin 2x) \end{aligned} \)
Simplify:
\( \begin{aligned} \int e^{3x}(3\sin x + 2\cos 2x) dx = \frac{9e^{3x}}{10}(3\sin x - \cos x) + \frac{2e^{3x}}{13}(3\cos 2x + 2\sin 2x) \end{aligned} \)
Step 7: Solve for \(y\)
Substitute back into:
\( \begin{aligned} e^{2x}y = \int e^{3x}(3\sin x + 2\cos 2x) dx + C \end{aligned} \)
So:
\( \begin{aligned} y = e^{-2x} \left[\frac{e^{3x}}{10}(3\sin x - \cos x) + \frac{2e^{3x}}{13}(3\cos 2x + 2\sin 2x) + C\right] \end{aligned} \)
Simplify:
\( \begin{aligned}y = \frac{e^x}{10}(3\sin x - \cos x) + \frac{2e^x}{13}(3\cos 2x + 2\sin 2x) + Ce^{-2x} \end{aligned} \)