We'll have to determine the primitive of the given function and we'll do it by integrating f'(x).

The first step is to replace x by pi/4 - t

x = pi/4 - t

Differentiating, we'll have:

dx = -dt

I = Int ln(1+tanx)dx = -Int ln[1+tan (pi/4 - t)]dt

But tan (pi/4 - t) = (tan pi/4 - tan t)/(1 + tan (pi/4)*tan t)

tan (pi/4 - t) = (1 - tan t)/(1+tan t)

We'll add 1 both sides:

1 + tan (pi/4 - t) = 1 + (1 - tan t)/(1+tan t)

1 + tan (pi/4 - t) = 2/(1 + tan t)

We'll take logarithm function both sides:

ln [1 + tan (pi/4 - t)] = ln [2/(1 + tan t)]

ln [2/(1 + tan t)] = ln 2 - ln (1 + tan t)

We'll integrate:

Int [2/(1 + tan t)]dt = -Int ln 2 dt + Int ln (1 + tan t)dt

I = Int ln 2 dt - Int ln (1 + tan t)dt

But Int ln (1 + tan t)dt = I

I = Int ln 2 dt - I

2I =(ln 2)*t

I = [t*(ln 2)]/2 + C

I = (pi/4 - x)*ln 2/2 + c

I = (pi/8)*ln 2 - x*(ln 2)/2 + C

**The function f(x) is: f(x) = (pi/8)*ln 2 - x*(ln 2)/2 + C**