Step 1: Identify the type:
The equation has the form \(\frac{dy}{dx} + Py = Q\), a linear differential equation of first order.
Here \(P = 2\tan x\) and \(Q = \sin x\).
Step 2: Find the integrating factor:
The integrating factor is \(\text{I.F.} = e^{\int P\,dx}\).
\[ \int 2\tan x\,dx = 2\log|\sec x| = \log \sec^2 x \]
So \(\text{I.F.} = e^{\log \sec^2 x} = \sec^2 x\).
Step 3: Write the solution form:
The general solution is \(y \cdot \text{I.F.} = \int Q \cdot \text{I.F.}\,dx + C\). So
\[ y \sec^2 x = \int \sin x \sec^2 x\,dx + C \]
Step 4: Integrate the right side:
Write \(\sin x \sec^2 x = \frac{\sin x}{\cos x} \cdot \frac{1}{\cos x} = \sec x \tan x\).
Since \(\int \sec x \tan x\,dx = \sec x\), we get
\[ y \sec^2 x = \sec x + C \]
Step 5: Solve for y:
Multiply both sides by \(\cos^2 x\):
\[ y = \cos x + C \cos^2 x \]
A quick check: differentiating gives \(y' = -\sin x - 2C\sin x \cos x\), and \(2y\tan x = 2\sin x + 2C \sin x\cos x\). Their sum is \(\sin x\), as required.
Final Answer:
The general solution of the equation is given below, where \(C\) is an arbitrary constant.
\[ \boxed{y = \cos x + C\cos^2 x} \]