Solve dy/dx + y*tan(x) = sec(x) given y(0) = 1.
Get the complete, step-by-step math solution for: "Solve dy/dx + y*tan(x) = sec(x) given y(0) = 1....". Powered by SolveForX AI math tutor.
Step-by-Step Solution
Step 1: Identify the form of the differential equation
The given differential equation $\frac{dy}{dx}$ + y\tan(x) = \sec(x) is a first-order linear differential equation. We can compare it to the standard form $\frac{dy}{dx}$ + P(x)y = Q(x) to identify P(x) and Q(x)$.
Step 2: Calculate the integrating factor
To solve a first-order linear differential equation, we need to find the integrating factor (IF). The integrating factor is given by the formula e^{\int P(x) dx}$. In this case, P(x) = \tan(x)$, and the integral of \tan(x) is \log|\sec(x)|$. Therefore, the integrating factor simplifies to \sec(x)$.
Step 3: Apply the solution formula
The general solution to a first-order linear differential equation is given by y \cdot \text{IF} = \int Q(x) \cdot \text{IF} \, dx$. We substitute Q(x) = \sec(x) and the integrating factor \sec(x) into this formula. The integral of \sec^2(x) is \tan(x)$, so we get y \sec(x) = \tan(x) + C$, where C is the constant of integration.
Step 4: Solve for y
To find the explicit solution for y$, we divide both sides of the equation by \sec(x)$. We can rewrite \tan(x) as \frac{\sin(x)}{\cos(x)} and \sec(x) as \frac{1}{\cos(x)}$. After simplification, we obtain y = \sin(x) + C\cos(x)$.
Step 5: Apply the initial condition
We are given the initial condition y(0) = 1$. We substitute x = 0 and y = 1 into the general solution y = \sin(x) + C\cos(x)$. Since \sin(0) = 0 and \cos(0) = 1$, we find that 1 = 0 + C(1)$, which means C = 1$.
Step 6: Write the particular solution
Now that we have found the value of the constant C = 1$, we substitute it back into the general solution to get the particular solution for the given initial condition. The particular solution is y = \sin(x) + \cos(x)$.