# Simplifying a Trigonometric Expression

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.

-

Two issues—first, as suggested in Jerry's answer, you have a factor of $|\sec x+\tan x|$ in the numerator of the last term of your derivative that does not belong there. Second, the derivative of $\ln|x|$ is $\frac{1}{x}$ (no absolute value), so $\frac{d}{dx}\ln|f(x)|=\frac{1}{f(x)}\cdot f'(x)$ with the chain rule.

-
Thanks for clarifying that, so there are no more abs values needed after I use the chain rule. So f'(x) = secxtanx+sec^(2)x – Finzz Feb 8 '11 at 21:00
@Finzz: $\frac{d}{dx}(\sec x+\tan x)=\sec x\tan x+\sec^2x$, yes. $\frac{d}{dx}(\ln|\sec x+\tan x|)=\frac{1}{\sec x+\tan x}\cdot(\sec x\tan x+\sec^2x)$, which can be simplified... – Isaac Feb 8 '11 at 21:05
Right, but all I see is to factor out secx, giving me: secx(secx + (tanx/(tanx+secx))) – Finzz Feb 8 '11 at 21:26
@Finzz: Factoring out the common $\sec x$ is a good choice. I think your parentheses are misplaced: $\frac{1}{\sec x+\tan x}\cdot(\sec x\tan x+\sec^2x)=$ $\frac{1}{\sec x+\tan x}\cdot\sec x\cdot(\tan x+\sec x)=$ $\frac{(\tan x+\sec x)}{\sec x+\tan x}\cdot\sec x=$ $1\cdot\sec x=\sec x$ – Isaac Feb 8 '11 at 21:29
Yes I'm not sure what I did but it looks funky, the way you wrote it makes way more sense. Thanks man. – Finzz Feb 8 '11 at 21:44

Your derivative for $x\sec\;x$ is correct; for the second term, note that $\frac{\mathrm d}{\mathrm dx}\ln(f(x))=\frac{f^{\prime}(x)}{f(x)}$ . Apply the formula accordingly.

-
I'm confused, I already took the derivative of the ln part. Not sure what you want me to do. Are you trying to say I made an error when taking the derivative of the second term? – Finzz Feb 8 '11 at 9:31
@Finzz: Yes, you did -- you wrote $f\cdot f'/f$ instead of $f'/f$. – joriki Feb 8 '11 at 9:49