A hard 'if and only if' trigonometric identity proof Prove 
$$
\frac{-2+2\tan A+2\cos B\cdot\sin B+\cot^2 A\cdot({\sec^4A-\operatorname{cosec}^2A-2)}}{2+\tan^2A-2\sin^2A} =(\sin A+\cos A)^2
$$ 
if and only if B is the double angle of A, or $B=2A+2k\pi$, $k=0,1,2,3...$
Advice is welcome as to improve notation and format. 
i understand the RHS can be simplified to 1+sin(2A), but that doesn't seen to go anywhere .
Also, I have been able to simplify the left hand side of the expression down a little, but it's not taking me anywhere at all. I have a feeling that the difficulty of this proof lies in using the 2's in the LHS.
again, many thanks,
Yun Fei
 A: Abbreviating your equation as 
$$\frac{P + 2\sin B \cos B}{Q} = R$$
we have 
$$\sin 2B = Q R - P$$
where 
$$\begin{align}
R &= \left(\cos A + \sin A \right)^2 = \cos^2 A + \sin^2 A + 2 \sin A \cos A \\
&= 1 + \sin 2A \\[4pt]
Q &= 2 - 2 \sin^2 A + \tan^2 A = 2 \cos^2 A + \frac{\sin^2 A}{\cos^2 A} \\
&= \frac{1}{\cos^2 A}\left(2 \cos^4 A + \sin^2 A\right)
\end{align}$$
For $P$, we'll conveniently add and subtract $\csc^4 A$:
$$\begin{align}
P &= 2 \tan A - 2 + \cot^2 A \left(- 2 + \sec^4 A - \csc^2 A \right) + \left( \csc^4 A - \csc^4 A \right)\\
&= 2 \tan A - 2 \left(1 +\cot^2 A \right) + \frac{\cos^2 A}{\sin^2 A}\left(\frac{1}{\cos^4 A} - \frac{1}{\sin^2 A} \right) + \frac{1}{\sin^4 A} &- \csc^4 A\\
&= 2 \tan A - 2 \csc^2 A + \frac{1}{\sin^2 A \cos^2 A} + \left(-\frac{\cos^2 A}{\sin^4 A} + \frac{1}{\sin^4 A}\right) &-\csc^4 A\\[4pt]
&=2\tan A + \frac{1}{\sin^2 A \cos^2 A} - \frac{2}{\sin^2 A} + \frac{1}{\sin^2 A} &-\csc^4 A \\[4pt]
&=2\tan A + \frac{1}{\sin^2 A \cos^2 A} - \frac{1}{\sin^2 A} &-\csc^4 A \\[4pt]
&=\frac{2\sin A}{\cos A}+ \frac{1-\cos^2 A}{\sin^2 A\cos^2 A} &-\csc^4 A \\[4pt] 
&= \frac{2\sin A \cos A}{\cos^2 A} + \frac{1}{\cos^2 A} &-\csc^4 A \\[4pt]
&= \frac{1+\sin 2A}{\cos^2 A} &-\csc^4 A
\end{align}$$
Therefore, 
$$\begin{align}
QR-P &= \frac{1}{\cos^2A}\left( 2 \cos^4 A + \sin^2 A \right)\left( 1 + \sin 2A \right) - \frac{1}{\cos^2 A}\left( 1 + \sin 2 A \right) + \csc^4 A \\[4pt]
&= \frac{1}{\cos^2A}\left( 2 \cos^4 A + \sin^2 A - 1\right)\left( 1 + \sin 2A \right) + \csc^4 A \\[4pt]
&= \frac{1}{\cos^2A}\left( 2 \cos^4 A - \cos^2 A\right)\left( 1 + \sin 2A \right) + \csc^4 A \\[4pt]
&=\left( 2 \cos^2 A - 1\right)\left( 1 + \sin 2A \right) + \csc^4 A \\[4pt]
&=\cos 2A \left( 1 + \sin 2A \right) + \csc^4 A \\[4pt]
\end{align}$$
So, your equation reduces to
$$\sin 2 B = \cos 2A ( 1 + \sin 2 A ) + \csc^4 A$$ 
which is decidedly not equivalent to $B = 2 A + 2k\pi$. Perhaps your original equation has a typo or something.
Note that, even had the equation become
$$\sin 2B = \sin 4A$$
(which seems closest to what you might be anticipating), we'd have $2B = 4A + 2k\pi$ OR $2B = \pi - 4A + 2k\pi$, whence $B = 2A+k\pi$ OR $B = \frac{\pi}{2}-2A + k\pi$.
A: The equation can be written as 
$\sin 2B =$ (complicated rational function of $\sin A$ and $\cos A$).
The left side is bounded and the right side appears to have an uncancelled 6th-order pole at $\sin A = 0$ from the $\cot^2 A \csc^4 A$ term.  [correction from comments: a 4th order pole from the $\cot^2 A \sec^4 A$ term]
