© All Rights reserved @ LearnWithDash
Step-by-Step Solution
1. Express the integral in terms of a new variable
To simplify the given integral
$ \int \frac{\tan x}{1 + \tan x + \tan^2 x}\, dx, $
we use the substitution:
Let $t = \tan x.$
Then, $dt = \sec^2 x\,dx,$ and since $1 + \tan^2 x = \sec^2 x,$ we get
$dx = \frac{dt}{1 + t^2}.$
2. Rewrite the integral
Substituting $t = \tan x$ and $dx = \frac{dt}{1 + t^2}$ into the original integral gives:
\[
\int \frac{\tan x}{1 + \tan x + \tan^2 x}\,dx
= \int \frac{t}{(1 + t + t^2)} \cdot \frac{1}{1 + t^2}\,dt
= \int \frac{t}{(1 + t + t^2)\,(1 + t^2)}\,dt.
\]
3. Use partial fraction (or splitting) to simplify
Observe that
\[
\frac{t}{(1 + t + t^2)\,(1 + t^2)}
= \frac{1}{1 + t^2} - \frac{1}{1 + t + t^2}.
\]
This can be verified by bringing both terms over a common denominator.
4. Integrate each term separately
Thus, the integral becomes:
\[
\int \left(\frac{1}{1 + t^2} - \frac{1}{1 + t + t^2}\right)\,dt
= \int \frac{1}{1 + t^2}\,dt
\;-\; \int \frac{1}{t^2 + t + 1}\,dt.
\]
• The first term integrates to
\[
\int \frac{1}{1 + t^2}\,dt = \tan^{-1}(t).
\]
• For the second term, note that
\[
t^2 + t + 1
= \left(t + \frac{1}{2}\right)^2 + \left(\frac{\sqrt{3}}{2}\right)^2.
\]
Hence,
\[
\int \frac{1}{\left(t + \frac{1}{2}\right)^2 + \left(\frac{\sqrt{3}}{2}\right)^2} \, dt
= \frac{2}{\sqrt{3}}\;\tan^{-1}\!\Bigl(\frac{2t + 1}{\sqrt{3}}\Bigr).
\]
Putting a minus sign from our integral, we get
\[
-\; \frac{2}{\sqrt{3}}\;\tan^{-1}\!\Bigl(\frac{2t + 1}{\sqrt{3}}\Bigr).
\]
Therefore, combining both parts:
\[
\int \frac{t}{(1 + t + t^2)\,(1 + t^2)}\,dt
= \tan^{-1}(t) \;-\; \frac{2}{\sqrt{3}}\;\tan^{-1}\!\Bigl(\frac{2t + 1}{\sqrt{3}}\Bigr) + C.
\]
5. Substitute back $t = \tan x$
Returning to the variable $x$, we have
\[
\int \frac{\tan x}{1 + \tan x + \tan^2 x}\, dx
= x \;-\; \frac{2}{\sqrt{3}}\;\tan^{-1}\!\Bigl(\frac{2\,\tan x + 1}{\sqrt{3}}\Bigr) + C.
\]
6. Identify the constants $K$ and $A$
From the given expression in the problem,
\[
\int \frac{\tan x}{1 + \tan x + \tan^2 x}\, dx
= x - \frac{K}{\sqrt{A}}\,\tan^{-1}\!\Bigl(\frac{K\,\tan x + 1}{\sqrt{A}}\Bigr) + C,
\]
we compare and see that
\[
\frac{K}{\sqrt{A}} = \frac{2}{\sqrt{3}},
\quad \text{and} \quad
K = 2, \quad A = 3.
\]
Thus, the ordered pair $(K, A)$ is $(2, 3).$