# Need help finding: $\frac{d}{dx}\frac{\sec{x}}{1+\tan{x}}$

So I am trying to find:

$$\frac{d}{dx}\frac{\sec{x}}{1+\tan{x}}$$

And tried doing:

$$\frac{(1+\tan{x})(\tan{x}\times\sec{x})-(\sec^{2}{x})(\sec{x})}{(1+\tan{x})^{2}}$$

Because of the Quotient Rule. Then I did some simplifying:

$$\frac{(1+\tan{x})(\tan{x}\times\sec{x})-(\sec^3{x})}{(1+\tan{x})^{2}}$$

Further simplification (crossed out the $(1+\tan{x})^{2})$:

$$\frac{\tan{x}\times\sec{x}-\sec^{3}{x}}{1+\tan{x}}$$

Then I got:

$$\frac{\sec{x}\times(\tan{x}-\sec^{2}{x})}{1+\tan{x}}$$

But Wolfram Alpha says differently. Where did I go wrong? Thanks.

Update:

So I tried regrouping:

$$\frac{(1+\tan{x})\tan{x}\times(\sec{x}-(\sec^3{x}))}{(1+\tan{x})^{2}}$$

Factored out a $\sec{x}$:

$$\frac{(1+\tan{x})\tan{x}\times\sec{x}(1-(\sec^2{x}))}{(1+\tan{x})^{2}}$$

Which then gives:

$$\frac{(1+\tan{x})\tan{x}\times\sec{x}\times-\tan^{2}{x}}{(1+\tan{x})^{2}}$$

Which then I said:

$$-\frac{\tan^{3}{x}\times\sec{x}}{(1+\tan{x})}$$

Which still isn't right. Sorry, if I made another obvious mistake.

-
The error is in "Further simplification". You cannot cancel like that. $$\frac{ab+c}{a^2}$$ is not equal to $\frac{b+c}{a}$. So you cannot cancel $(1+\tan x)$ as you did. –  Arturo Magidin Oct 24 '11 at 4:18
@Aturo: Sorry I kind of wrote it wrong the second time. I edited it. –  user667648 Oct 24 '11 at 4:21
@anon - Arturo's point still stands: $\frac{ab+c}{a^2}\not=\frac{b+c}{a}$. –  user5137 Oct 24 '11 at 4:24
It's still wrong. The first part of the denominator has a $1+\tan$ factor to cancel but the second part, that is $-\sec^3$, doesn't. Also, have fun sharing my inbox :) –  anon Oct 24 '11 at 4:24
@Aturo: O wait, I see what you are getting at... Ok, I'll try again and see how it goes. –  user667648 Oct 24 '11 at 4:25

When you crossed out the $1+\tan(x)$, you left the $\sec^3(x)$ unchanged, which you can't do.

Instead of doing that, try expanding the product in the numerator, and using the identity $1+\tan^2(x)=\sec^2(x)$.

-

Decided to use product rule:

$$\frac{d}{dx}\frac{\sec{x}}{(1+\tan{x})}$$

$$\frac{(1+\tan{x})(\tan{x}\times\sec{x})-(\sec^3{x})}{(1+\tan{x})^{2}}$$

I just worked on the top for a while:

$$(1+\frac{\sin{x}}{\cos{x}})(\frac{\sin{x}}{\cos{x}}\times\frac{1}{\cos{x}})-(\frac{1}{\cos{x}^{3}})$$

$$(\frac{\sin{x}}{\cos{x}}+\frac{\sin^2{x}}{\cos^2{x}})(\frac{1}{\cos{x}})-(\frac{1}{\cos{x}^{3}})$$

$$(\frac{\sin{x}}{\cos^2{x}}+\frac{\sin^2{x}}{\cos^3{x}})-(\frac{1}{\cos{x}^{3}})$$

$$\frac{\sin{x}}{\cos^2{x}}+\frac{\sin^2{x}}{\cos^3{x}}-\frac{1}{\cos{x}^{3}}$$

$$\frac{\sin{x}}{\cos^2{x}}+\frac{\sin^2{x}-1}{\cos^3{x}}$$

$$\frac{\sin{x}}{\cos^2{x}}+\frac{-\cos^2{x}}{\cos^3{x}}$$

$$\frac{\sin{x}}{\cos^2{x}}-\frac{1}{\cos{x}}$$

$$\frac{\sin{x}}{\cos^2{x}}-\frac{1}{\cos{x}}*\frac{\cos{x}}{\cos{x}}$$

$$\frac{\sin{x}}{\cos^2{x}}-\frac{\cos{x}}{\cos^2{x}}$$

$$\frac{\sin{x}-cos{x}}{\cos^2{x}}$$

$$\sec^2{x}\times(\sin{x}-\cos{x})$$

$$\sin{x}sec^2{x}-\cos{x}\sec^2{x}$$

$$\sin{x}\times\sec^2{x}-\cos{x}\times\sec^2{x}$$

$$\sin{x}\times\sec^2{x}-\frac{1}{\cos{x}}$$

$$\sin{x}\times\sec^2{x}-\sec{x}$$

$$\sin{x}\times\frac{1}{\cos^2{x}}-\sec{x}$$

$$\frac{\sin{x}}{\cos^2{x}}-\sec{x}$$

$$\frac{\sin{x}}{cos{x}}\frac{1}{cos{x}}-\sec{x}$$

$$\tan{x}\sec{x}-\sec{x}$$

$$(\tan{x}-1)\times\sec{x}$$

Put it all over the original denominator:

$$\frac{(\tan{x}-1)\times\sec{x}}{(1+\tan{x})^{2}}$$

So that is what I did, there probably should be an easier way though...

-
From $\sin^2 x + \cos^2 x = 1$, dividing through by $\cos^2 x$ you get $\tan^2x + 1 = \sec^2 x$. So you can replace $\sec^3 x$ by $$\sec^3x = sec^2x\sec x = (1+\tan^2x)\sec x.$$Then you have$$\frac{(1+\tan x)\sec x - \sec^3x}{(1+\tan x)^2} = \frac{(1+\tan x)\sec x - (\tan^2x - 1)\sec x}{(1+\tan x)^2}.$$Now write $(\tan^2 x - 1) = (\tan x +1)(\tan x -1)$, and now you can factor $(\tan x + 1)$ from the numerator and cancel. –  Arturo Magidin Oct 25 '11 at 3:02
@ArturoMagidin: :0 Omg. I must be retarded. Consider my mind blown. –  user667648 Oct 25 '11 at 4:03

Here is a straightforward way of finding the derivative manipulating only sines and cosines:

$$\frac{d}{dx} \left[ \frac{\sec(x)}{1+\tan(x)} \right] \\ = \frac{d}{dx} \left[ \frac{1}{\cos(x)} \frac{1}{1+\frac{\sin(x)}{\cos(x)}}\right] \\ = \frac{d}{dx} \left[ \frac{1}{\cos(x)+\sin(x)}\right] \\ = \frac{d}{dx} \left[ (\cos(x) + \sin(x))^{-1} \right] \\ = (-1)(\cos(x) + \sin(x))^{-2}(-\sin(x) + \cos(x)) \\ = \frac{(-1)(-\sin(x)+\cos(x))}{(\cos(x)+\sin(x))(\cos(x)+\sin(x))} \\ =\frac{\sin(x) - \cos(x)}{\cos^2(x)+2\sin(x)\cos(x) + \sin^2(x)} \\ = \frac{\sin(x)-\cos(x)}{1+2\sin(x)\cos(x)} \\ = \frac{\sin(x) -\cos(x)}{1+\sin(2x)}$$

-