Solution:
Concept: For every angle A: sin2A+cos2A=1, sec2A−tan2A=1 and cosec2A−cot2A=1.
They come from Pythagoras' theorem p2+b2=h2 divided by h2, by b2 or by p2.
Given: sinA=cosA.
Step 1 — Use the identity.
We take out the factor 2 and use sec2A−tan2A=1, which holds for every angle.
2tan2A−2sec2A+5=−2×1+5=3
Step 2 — Check with the given condition.
Since sinA=cosA, dividing gives tanA=1. Then sec2A is 1+tan2A, or 2.
2tan2A−2sec2A+5=2×1−2×2+5=3
Watch out: The order matters: sec2A−tan2A is 1, but tan2A−sec2A is −1.
Therefore, 2tan2A−2sec2A+5=3.