Step 1: Understanding the Concept:
We rewrite the given equation as a first-order linear differential equation \( \frac{dy}{dx} + P(x)y = Q(x) \) and solve it using an Integrating Factor.
Step 2: Key Formula or Approach:
1. Standard form: \( y' - y \tan x = -\sec x \).
2. Integrating Factor: \( IF = e^{\int P dx} \).
3. Solution: \( y \cdot IF = \int Q \cdot IF dx + c \).
Step 3: Detailed Explanation:
Divide equation by \( \cos x \):
\( \frac{dy}{dx} = y \tan x - \sec x \)
\( \frac{dy}{dx} - (\tan x)y = -\sec x \).
Here \( P(x) = -\tan x \), \( Q(x) = -\sec x \).
IF \( = e^{\int -\tan x dx} = e^{\ln|\cos x|} = \cos x \).
Multiply equation by IF:
\( \frac{d}{dx}(y \cos x) = -\sec x \cdot \cos x = -1 \).
Integrate:
\( y \cos x = \int -1 dx = -x + c \).
Use initial condition \( f(0) = 1 \implies y=1 \) when \( x=0 \).
\( 1 \cdot \cos 0 = -0 + c \implies c = 1 \).
Substitute c:
\( y \cos x = 1 - x \).
\( y = (1-x) \sec x \).
Step 4: Final Answer:
The function is \( f(x) = (1-x) \sec x \).