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.
 A: 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)$.
A: 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...
A: 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)}$$
