Proving a trigonometric identity: $\frac{\cos x}{1-\sin x} -\tan x = \sec x$ I am trying to prove a trig identity that is confusing me. The identity is 
$$\frac{\cos(x)}{(1-\sin(x))}-\tan(x)=\sec(x)$$
Here is my attempt.
I did $$\frac{\cos(x)}{(1-\sin^2(x))}=\frac{\cos(x)}{\cos^2(x)}=\frac{1}{\cos(x)}=\sec(x)=(\sec(x)+\tan(x))(1+\sin(x))\\\sec(x)=\sec(x)+\sec(x)\sin(x)+\tan(x)+\tan(x)\sin(x)\\0=\tan(x)+\tan(x)+\tan(x)\sin(x)$$ but this does not make sense to me. Can somebody please help me with this thing?
 A: $$
1 = \sec^2 x - \tan^2 x = (\sec x + \tan x )(\sec x - \tan x)
$$
dividing by the second factor on the RHS:
$$
\frac1{\sec x - \tan x} = \sec x + \tan x
$$
multiplying LHS numerator and denominator by $\cos x $ and bringing $\tan x$ over to the LHS from RHS:
$$
\frac{\cos x}{1-\sin x} - \tan x = \sec x
$$
A: For fun, I found a "trigonograph" of this identity (for acute $\theta$).
In the diagram, $\overline{AB}$ is tangent to the unit circle at $P$. The "trig lengths" (except for $|\overline{AQ}|$) should be clear.  

We note that $\angle BPR \cong \angle RPP^\prime$, since these inscribed angles subtend congruent arcs $\stackrel{\frown}{PR}$ and $\stackrel{\frown}{RP^\prime}$. Very little angle chasing gives that $\triangle APQ$ is isosceles, with $\overline{AP} \cong \overline{AQ}$ (justifying that last trig length). Then,
$$\triangle SPR \sim \triangle OQR \implies \frac{|\overline{SP}|}{|\overline{SR}|} = \frac{|\overline{OQ}|}{|\overline{OR}|} \implies \frac{\cos\theta}{1-\sin\theta} = \frac{\sec\theta+\tan\theta}{1}$$ 
A: I am going to abuse the equality sign a little, and manipulate both sides at once.
I find that a bit more intuitive
Required to Prove: 
$$\dfrac{\cos(x)}{1-\sin(x)}-\tan(x)=\sec(x)$$
Move to "usual" trig functions
$$\dfrac{\cos(x)}{1-\sin(x)}-\dfrac{\sin(x)}{\cos(x)}=\dfrac{1}{\cos(x)}$$
There are $\cos$'s on the bottom line, so lets simplify by multiplying both sides by $\cos(x)$
$$\dfrac{\cos^{2}(x)}{1-\sin(x)}-\sin(x)=1$$
Move the lonely $\sin(x)$
$$\dfrac{\cos^{2}(x)}{1-\sin(x)}=1+\sin(x)$$
The denominator on the bottom of left hand side would be good to have  $\cos^2(x)=1-\sin^2(x)=(1-\sin(x))(1+\sin(x))$. and we can always multiple any term by $1=\dfrac{1+\sin(x)}{1+\sin(x)}$
$$\dfrac{\cos^{2}(x)}{1-\sin(x)}\dfrac{1+\sin(x)}{1+\sin(x)}=1+\sin(x)$$
$$\dfrac{\cos^{2}(x)(1+\sin(x))}{1-\sin^{2}(x)}=1+\sin(x)$$
$$\dfrac{\cos^{2}(x)(1+\sin(x))}{\cos^{2}(x)}=1+\sin(x)$$
$$1+\sin(x)=1+\sin(x)$$
A: We have
$$\begin{align}\frac{\cos x}{1-\sin x}-\tan x & = \frac{\cos x}{1-\sin x}-\frac{\sin x}{\cos x} \\[1.5ex] & =\frac{\cos^2 x-\sin x(1-\sin x)}{\cos x(1-\sin x)} \\[1.5ex] & =\frac{\cos^2 x+\sin^2 x-\sin x}{\cos x(1-\sin x)} \\[1.5ex] & =\frac{1-\sin x}{\cos x(1-\sin x)} \\[1.5ex] & =\frac{1}{\cos x} \\[2.8ex] & =\sec x\end{align}$$
A: $$\cos ^{2}x=1-\sin ^{2}x=(1-\sin x)(1+\sin x)\Longrightarrow \frac{\cos x}{%
1-\sin x}=\frac{1+\sin x}{\cos x}=\sec x+\tan x.$$
A: Hint
$$\frac{\cos(x)}{1-\sin(x)}-\tan(x)=\frac{\cos(x)}{1-\sin(x)}-\frac{\sin(x)}{\cos(x)}=\frac{\cos^2(x)-\sin(x)+\sin^2(x)}{\cos(x)(1-\sin(x))}$$
Now what is $\cos^2(x)+\sin^2(x)$?
A: General case
You can employ the tangent half-angle substitution, writing $t:=\tan\frac x2$.
\begin{align*}
\frac{\cos(x)}{1-\sin(x)}-\tan(x)&=\sec(x) \\
\frac{\frac{1-t^2}{1+t^2}}{1-\frac{2t}{1+t^2}} - \frac{2t}{1-t^2} &= \frac{1+t^2}{1-t^2} \\
\frac{1-t^2}{1-2t+t^2} - \frac{2t}{1-t^2} &= \frac{1+t^2}{1-t^2} \\
\frac{(1+t)(1-t)}{(1-t)^2} - \frac{2t}{1-t^2} &= \frac{1+t^2}{1-t^2} \\
\frac{(1+t)^2}{(1+t)(1-t)} - \frac{2t}{1-t^2} &= \frac{1+t^2}{1-t^2} \\
(1+t)^2-2t&=1+t^2 \\
1+2t+t^2-2t&=1+t^2
\end{align*}
Special cases
If you want to, you can also consider possible special cases. The tangent half-angle substitution I did in my first step doesn't directly capture $x=\pm\pi$, but you get that as $\lim_{t\to\infty}$. Verifying that case explicitely you find
$$\frac{\cos\pi}{1-\sin\pi}-\tan\pi=\frac{1}{1-0}-0=1=\sec\pi$$
In the second step I canceled $1+t^2$ which will be non-zero for real $t$. In the fourth step, I canceled $1-t$ which corresponds to $x=\frac\pi2$. In that case you indeed have a singularity, where pretty much all your terms become undefined. One step later I multiply everything with $1-t^2=(1+t)(1-t)$ which would be illegal for $x=\pm\frac\pi2$. But for $x=-\frac\pi2$ again $\tan(x)$ and $\sec(x)$ become undefined. So the equation holds whenever all the terms it contains are defined, and when all the terms of one side are defined then so are those on the other.
Note that the above does not hold if you are operating in the real projective line $\mathbb R\cup\{\infty\}$. There you have for $x=\frac\pi2$:
$$\frac{\cos\tfrac\pi2}{1-\sin\tfrac\pi2}-\tan\tfrac\pi2=\frac{0}{1-1}-\infty=\frac00-\infty\overset?=\infty=\sec\tfrac\pi2$$
but $\frac00$ is still undefined. So you have a removable singularity in this case.
A: Split LHS, in terms of $\sin$ and $\cos$ 
$\frac{\cos(x)}{(1-\sin(x))}-\tan(x)$
$\implies \frac{\cos x}{1-\sin x}-\frac {\sin x}{\cos x}$
$\implies \large\frac{\cos^2 x-\sin x+ sin^2x}{\cos x-\cos x\sin x}$
$\implies \large\frac{1-\sin x}{\cos x(1-\sin x)}$
$\implies \large\frac{1}{\cos x}=\sec x$ =R.H.S
A: From the definition of sec(x) we have:
$$
\frac{\cos(x)}{(1-\sin(x))}-\tan(x)=\frac{1}{\cos(x)}
$$
I don't like fractions, so lets multiply overall by the denominators: $$ (1-\sin(x))\cos(x)$$
and we get
$$
\cos ^{2}(x) -\tan(x)\cos(x) + \tan(x)\cos(x)\sin(x) = 1-\sin(x)
$$
This looks horrible until we realise that tan(x) cos(x) = sin(x), (from the identity tan(x) = sin(x) / cos(x) ). So:
$$
\cos ^{2}(x) -\sin(x) + \sin ^{2}(x) = 1-\sin(x)
$$
By Pythogoras
$$
\cos ^{2}(x) + \sin ^{2}(x) = 1
$$
and so we have the identity
$$
1-\sin(x) = 1-\sin(x)
$$
and we are done.
A: Transfer $ \tan x $ to right hand side, now it is:
$${\sec x + \tan x } =  \dfrac{1+\sin x }{\cos x} =\dfrac{\cos x}{1-\sin x } $$
which is what is left on the left hand side.
A: Multiply both sides by $(1-\sin(x))\cos(x)$ to get rid of the denominators and verify:
$$\cos^2(x)-(1-\sin(x))\sin(x)=1-\sin(x).$$
