Let y = π/4 - x then dy = -dx
When x = 0,y = π/4,when x = π/4,y = 0
J = ∫(0,π/4) ln(1+tanx) dx
= ∫(π/4,0) ln[1+tan(π/4-y)] -dy
= ∫(0,π/4) ln[1 + (tan(π/4)-tany)/(1+tan(π/4)tany)] dy
= ∫(0,π/4) ln[1 + (1-tany)/(1+tany)] dy
= ∫(0,π/4) ln[(1+tany+1-tany)/(1+tany)] dy
= ∫(0,π/4) [ln(2) - ln(1+tany)] dy
= ln(2) * ∫(0,π/4) dy - J
2J = ln(2) * (π/4-0)
J = (π*ln2)/8
π/4