Subjects differential equations

Exact Method 67Ec2C

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Use the AI math solver

1. **State the problem:** Solve the first-order linear differential equation $$\frac{dy}{dx} + (\tan x) y = \sin 2x$$ with the initial condition $$y(0) = 1$$. 2. **Identify the standard form:** The equation is in the form $$\frac{dy}{dx} + P(x) y = Q(x)$$ where $$P(x) = \tan x$$ and $$Q(x) = \sin 2x$$. 3. **Find the integrating factor (IF):** $$\mu(x) = e^{\int P(x) dx} = e^{\int \tan x \, dx}$$ Recall that $$\int \tan x \, dx = -\ln|\cos x|$$, so $$\mu(x) = e^{-\ln|\cos x|} = \frac{1}{\cos x} = \sec x$$. 4. **Multiply the entire differential equation by the integrating factor:** $$\sec x \frac{dy}{dx} + \sec x \tan x y = \sec x \sin 2x$$ 5. **Recognize the left side as a derivative:** $$\frac{d}{dx} (y \sec x) = \sec x \sin 2x$$ 6. **Integrate both sides with respect to $$x$$:** $$y \sec x = \int \sec x \sin 2x \, dx + C$$ 7. **Simplify the integral:** Recall $$\sin 2x = 2 \sin x \cos x$$, so $$\sec x \sin 2x = \sec x \cdot 2 \sin x \cos x = 2 \sin x$$. Thus, $$\int \sec x \sin 2x \, dx = \int 2 \sin x \, dx = -2 \cos x + C$$. 8. **Write the general solution:** $$y \sec x = -2 \cos x + C$$ Multiply both sides by $$\cos x$$: $$y = -2 \cos^2 x + C \cos x$$ 9. **Apply the initial condition $$y(0) = 1$$:** $$1 = -2 \cos^2 0 + C \cos 0 = -2 (1)^2 + C (1) = -2 + C$$ So, $$C = 3$$. 10. **Final solution:** $$\boxed{y = -2 \cos^2 x + 3 \cos x}$$