- #1

- 285

- 0

## Homework Statement

Solve the differential equation: [itex]y' + cos(x)y = cos(x)[/itex]

## The Attempt at a Solution

[itex]y' = cos(x)(1 -y)[/itex]

[itex]\frac{dy}{1-y} = cos(x) dx[/itex]

[itex]-ln|1-y| = sin(x) + C[/itex]

[itex]\frac{1}{1-y} = e^{sin(x)} + C[/itex]

[itex]1-y = \frac{1}{e^{sin(x)} + C}[/itex]

[itex]y = \frac{-1}{e^{sin(x)} + C} + 1[/itex]

Have I done this correctly?