\[(\tan^2 x + 2\tan x + 5)\frac{dy}{dx} = 2(1+\tan x)\sec^2x\]
Solution
We have,
\[\left( \tan^2 x + 2 \tan x + 5 \right)\frac{dy}{dx} = 2\left( 1 + \tan x \right) \sec^2 x\]
\[ \Rightarrow dy = \frac{2\left( 1 + \tan x \right) \sec^2 x}{\left( \tan^2 x + 2 \tan x + 5 \right)} dx\]
Integrating both sides, we get
\[\int dy = \int\frac{2\left( 1 + \tan x \right) \sec^2 x}{\left( \tan^2 x + 2 \tan x + 5 \right)} dx . . . . . . . . \left( 1 \right)\]
\[\text{Putting }\tan^2 x + 2 \tan x + 5 = t\]
\[ \therefore \left( 2 \tan x se c^2 x + 2se c^2 x \right) dx = dt\]
\[ \Rightarrow 2\left( 1 + \tan x \right) \sec^2 x dx = dt\]
Therefore (1) becomes,
\[\int dy = \int\frac{1}{t} dt\]
\[ \Rightarrow y = \log \left| t \right| + C\]
\[ \Rightarrow y = \log \left| \tan^2 x + 2 \tan x + 5 \right| + C\]