To solve the differential equation cos(x) dy/dx + sin(x) y = 1, we can rearrange it into a standard form. The equation can be expressed as:
dy/dx + (sin(x)/cos(x)) y = 1/cos(x)
This form resembles a first-order linear ordinary differential equation:
dy/dx + P(x) y = Q(x)
where:
- P(x) = sin(x)/cos(x) = tan(x)
- Q(x) = 1/cos(x)
Next, we need to find the integrating factor, which is given by:
μ(x) = e^(∫P(x) dx) = e^(∫tan(x) dx) = e^(-ln(cos(x))) = sec(x)
Multiplying the entire differential equation by the integrating factor:
sec(x) dy/dx + sec(x) tan(x) y = sec(x)/cos(x)
This simplifies to:
d/dx [sec(x) y] = sec(x)
Integrating both sides:
sec(x) y = ∫sec(x) dx
The integral of sec(x) is known to be ln |sec(x) + tan(x)| + C, where C is the constant of integration. Therefore, we have:
sec(x) y = ln |sec(x) + tan(x)| + C
To find y, we multiply both sides by cos(x):
y = cos(x)(ln |sec(x) + tan(x)| + C)
This is the general solution of the given differential equation.