Let x=4tanθ, then dx=4sec²θdθ, tanθ=x/4 and secθ=¼√(x²+16).
x²+16=16tan²θ+16=16sec²θ. The square root is 4secθ.
The integrand becomes (4sec²θdθ)/4secθ=secθdθ.
Multiply the integrand by (secθ+tanθ)/(secθ+tanθ): dθ(sec²θ+secθtanθ)/(secθ+tanθ).
The numerator is the derivative of the denominator so the integration is ln|secθ+tanθ|+C, where C is the constant of integration.
Now we substitute back to get x terms:
ln|¼√(x²+16)+¼x|+C=ln(√(x²+16)+x)+c where c is a different constant of integration incorporating ln(¼). The log argument can’t be negative so we can replace the absolute brackets.