You need to factor out `tan^2 x` within integral, such that:

`int tan^2 x(tan^2 x + 1)dx`

You need to change y for `tan x` such that:

`y = tan x => dy = (tan^2 x + 1)dx`

Substituting the variable yields:

`int y^2dy = y^3/3 + c`

Substituting back` tan x` for y yields:

`int tan^2 x(tan^2 x + 1)dx = (tan^3 x)/3 + c`

**Hence, evaluating the given integral yields**` int tan^2 x(tan^2 x + 1)dx = (tan^3 x)/3 + c.`

The indefinite integral of the given function is written:

Int [(tan x)^4 + (tan x)^2]dx

We'll factorize by (tan x)^2:

Int (tan x)^2*[(tan x)^2 + 1]dx

We'll solve the integral using substitution technique:

tan x = t

We'll differentiate both sides:

dx/(cos x)^2 = dt

We'll write the fundamental formula of trigonometry and we'll get:

(sin x)^2 + (cos x)^2 =1

We'll divide the relation by (cos x)^2:

(tan x)^2 + 1 = 1/(cos x)^2

We'll re-write the integral, substituting (tan x)^2 + 1 by 1/(cos x)^2:

Int (tan x)^2*[(tan x)^2 + 1]dx = Int (tan x)^2*dx/(cos x)^2

Now, we'll re-write the integral replacing the variable x by t:

Int (tan x)^2*dx/(cos x)^2 = Int t^2*dt

Int t^2*dt = t^3/3 + C

We'll substitute t by tan x and we'll get the result of the indefinite integral of the function:

Int [(tan x)^4 + (tan x)^2]dx = (tan x)^3/3 + C