Question:medium

Find the particular solution of the differential equation \(\dfrac{dy}{dx} = y\tan x\), given that \(y = 2\) if \(x = 0\).

Show Hint

Separate the variables to get dy/y = tan x dx. Integrate, then use y = 2 at x = 0 to find the constant.
Updated On: Oct 22, 2026
Show Solution

Solution and Explanation

Step 1: Write in linear form.
The equation is $\dfrac{dy}{dx} - (\tan x)\,y = 0$. This is of the form $\dfrac{dy}{dx} + Py = Q$ with $P = -\tan x$ and $Q = 0$.

Step 2: Find the integrating factor.
\[ \text{I.F.} = e^{\int -\tan x\,dx} = e^{\log|\cos x|} = \cos x \]
(Here $\int -\tan x\,dx = \log|\cos x|$.)

Step 3: Write the solution.
Multiply by the I.F. and integrate. Since $Q = 0$, the right side integrates to a constant.
\[ y\cos x = C \]

Step 4: Find C.
Put $x = 0$ and $y = 2$: $2\cos 0 = C$, so $C = 2$.
Then $y\cos x = 2$.

Step 5: Check.
From $y = 2\sec x$ we get $y^{\prime} = 2\sec x\tan x = y\tan x$. This matches the given equation, and $y(0) = 2$.

Final Answer:
The particular solution is $y = 2\sec x$. \[ \boxed{y = 2\sec x} \]
Was this answer helpful?
0