Note the plus sign! Try sinh in place of tan

Edit: pardon the wrong reason - the plus doesn't normally argue against your method, but the integrand is recognisable as the derivative of arcsinh, so we can use sinh.

Just in case a picture is of interest...

... where

... is the chain rule. Straight continuous lines differentiate downwards (integrate up) with respect to x, and the straight dashed line similarly but with respect to the dashed balloon expression (the inner function of the composite which is subject to the chain rule).

__________________________________________

Don't integrate - balloontegrate!

http://www.ballooncalculus.org/examples/gallery.html

http://www.ballooncalculus.org/asy/doc.html