I have to prove that:
$$x \sec x - \ln |\sec x + \tan x| + C$$
is the indefinite integral of:
$$x \sec x \tan x $$
by taking the derivative.
I've got far enough to get:
$$x\sec x\tan x + \sec x -\dfrac{|\sec x+\tan x|(\sec^2 x + \sec x \tan x)}{|\sec x + \tan x|}.$$
Kind of stuck here. Am I able to cancel out the $|\sec x + \tan x|$ on top and bottom and then set $-\sec x$ equal to $\sec^2 x + \sec x \tan x$? I'm guessing that's not right though.
Sorry for the crummy way I have it setup, feel free to edit it.