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...
... 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!