Question:

Solve the differential equation \[ \frac{dy}{dx} = \cos x - 2y \]

Show Hint

Quick Tip: For solving first-order linear differential equations, use the integrating factor method to simplify the equation. Then, apply integration techniques such as integration by parts for the non-homogeneous part.
Updated On: Jun 23, 2025
Hide Solution
collegedunia
Verified By Collegedunia

Solution and Explanation

This is a first-order linear differential equation. We can rewrite it as: \[ \frac{dy}{dx} + 2y = \cos x \] The integrating factor is \( e^{\int 2 \, dx} = e^{2x} \). Multiply both sides of the equation by \( e^{2x} \): \[ e^{2x} \frac{dy}{dx} + 2e^{2x} y = e^{2x} \cos x \] Now, the left-hand side is the derivative of \( e^{2x} y \). Integrating both sides gives: \[ e^{2x} y = \int e^{2x} \cos x \, dx \] We solve the integral \( \int e^{2x} \cos x \, dx \) using integration by parts or standard integral tables. The integral of \( e^{2x} \cos x \) is: \[ \int e^{2x} \cos x \, dx = \frac{e^{2x}}{5} (\cos x + 2 \sin x) \] Therefore, the solution to the differential equation is: \[ e^{2x} y = \frac{e^{2x}}{5} (\cos x + 2 \sin x) + C \] Solving for \( y \): \[ y = \frac{1}{5} (\cos x + 2 \sin x) + Ce^{-2x} \] Thus, the general solution to the differential equation is: \[ y = \frac{1}{5} (\cos x + 2 \sin x) + Ce^{-2x} \]
Was this answer helpful?
0
0

Top Questions on Differential Equations

View More Questions

Notes on Differential Equations