I need help underrating how to prove identity and give the rule to use. I need help understand it better.

0. Using the ,tangent identity,:
[tex]\tan x=\frac{\sin x}{\cos x}[/tex]We can replace in the equation the tangent function:
[tex]\frac{1}{\cos x}-\sin x\cdot\frac{\sin x}{\cos x}=\cos x[/tex]Reordering the equation, we get:
[tex]\frac{1}{\cos x}\cdot\lbrack1-\sin x\cdot\sin x\rbrack=\cos x[/tex][tex]\frac{1}{\cos x}\lbrack1-\sin ^2x\rbrack=\cos x[/tex]2. Using the Pythagorean identity:
[tex]\sin ^2x+\cos ^2x=1[/tex]...which can be reordered as:
[tex]\cos ^2x=1-\sin ^2x^{}[/tex]Replacing this in the latter expression we had:
[tex]\frac{1}{\cos x}\lbrack1-\sin ^2x\rbrack=\cos x[/tex][tex]\frac{1}{\cos x}\cos ^2x=\cos x[/tex]Finally, we get:
[tex]\cos x=\cos x[/tex]