Solve dy/dx + y*tan(x) = sec(x) given y(0) = 1.

Answer: y=sin⁡(x)+cos⁡(x)y = \sin(x) + \cos(x)

Step-by-step solution

Step 1: Identify the form of the differential equation

The given differential equation dydx\frac{dy}{dx} + y tan⁡(x)=sec⁡(x)\tan(x) = \sec(x) is a first-order linear differential equation. We can compare it to the standard form dydx\frac{dy}{dx} + P(x) y=Q(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∫P(x)dxe^{\int P(x) dx}. In this case, P(x) = tan⁡(x)\tan(x), and the integral of tan⁡(x)\tan(x) is log⁡∣sec⁡(x)∣\log|\sec(x)|. Therefore, the integrating factor simplifies to sec⁡(x)\sec(x).

Step 3: Apply the solution formula

The general solution to a first-order linear differential equation is given by y ⋅IF=∫Q(x)⋅IF\cdot \text{IF} = \int Q(x) \cdot \text{IF} \, dx. We substitute Q(x) = sec⁡(x)\sec(x) and the integrating factor sec⁡(x)\sec(x) into this formula. The integral of sec⁡2(x)\sec^2(x) is tan⁡(x)\tan(x), so we get y sec⁡(x)=tan⁡(x)+C\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)\sec(x). We can rewrite tan⁡(x)\tan(x) as sin⁡(x)cos⁡(x)\frac{\sin(x)}{\cos(x)} and sec⁡(x)\sec(x) as 1cos⁡(x)\frac{1}{\cos(x)} After simplification, we obtain y =sin⁡(x)+Ccos⁡(x)= \sin(x) + C\cos(x).

Step 5: Apply the initial condition

We are given the initial condition y(0) = 1. We substitute x=0x = 0 and y=1y = 1 into the general solution y=sin⁡(x)+Ccos⁡(x)y = \sin(x) + C\cos(x). Since sin⁡(0)=0\sin(0) = 0 and cos⁡(0)=1\cos(0) = 1, we find that 1 = 0 + C(1), which means C=1C = 1.

Step 6: Write the particular solution

Now that we have found the value of the constant C=1C = 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)y = \sin(x) + \cos(x).

More from this chapter

All Differential Equations solutions →

Solve your own maths question free →