Don't integrate - balloontegrate!
(As usual, straight continuous lines differentiate down, integrate up with respect to x. Straight dashed lines with respect to the dashed balloon expression, so that the right hand, triangular network satisfies the chain rule.)
Start by identifying tan x as a possible inner function of the chain rule...
Then differentiate for the sake of the chain rule...
Make the lower level of the chain rule shape equal to what you want to integrate...
Use the trig identity to re-write in terms of the inner function - i.e. so that x appears in the dashed balloon expression if at all, in the big bottom balloon...
Integrate with respect to the dashed balloon, as though it were a variable like x or t ...
I.e...
Balloon Calculus: worked examples from past papers