We'll re-arrange the denominator of the fraction, factorizing by cos x:

y = tan x/[(cos x)^2*(sin x/cos x + 1)]

But sin x/cos x = tan x

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

We also know that 1/(cos x)^2 = [(tan x)^2 + 1]

The fraction will become:

y = (tan x)*[(tan x)^2 + 1]/(tan x + 1)

Now, we'll calculate the indefinite integral:

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

We'll substitute tan x = t

x = arctan t => dx = dt/(1 + t^2)

We'll re-write the integral:

Int ydx = Int (t)*[(t)^2 + 1]dt/(1 + t^2)*(t+ 1)

We'll simplify by (1 + t^2) and we'll get:

Int tdt/(t+ 1) = Int (t+1)dt/(t+1) - Int dt/(t+1)

Int tdt/(t+ 1) = Int dt - Int dt/(t+1)

Int tdt/(t+ 1) = t - ln |t+1| + C

We'll substitute t by tan x and we'll get:

**Int tanx dx/cosx(sinx+cosx) = tan x - ln |tan x + 1| + C**