prove that

(cosx - sinx) / (cosx + sinx) = sec2x - tan2x

multiply top and bottom by (cosx - sinx) to get

(cosx-sinx)^2 / (cos^2x - sin^2x)
(cos^2x - 2sinx cosx + sin^2x) / cos2x
(1 - sin2x)/cos2x
1/cos2x - sin2x/cos2x
QED

(cosx - sinx)^2 / (cosx + sinx)(cosx - sin x)

= (cos^2x - 2 sinx cosx + sin^2x) / (cos^2x - sin^2 x)
= (1 -2 sinx cosx) / cos2x
= 1/cos2x - sin2x /cos2x
= sec2x - tan2x
whew !

To prove the given equation:

(cosx - sinx) / (cosx + sinx) = sec2x - tan2x,

we can start with the left-hand side (LHS) and simplify it step by step until it matches the right-hand side (RHS).

Using the Difference of Squares identity (a^2 - b^2 = (a + b)(a - b)), we can rewrite the denominator:

(cosx + sinx) = (cosx + sinx)(cosx - sinx) / (cosx - sinx)
= (cos^2x - sin^2x) / (cosx - sinx)

Now, let's substitute the denominator in the LHS expression with the simplified form:

(cosx - sinx) / (cosx + sinx) = (cosx - sinx) * (cosx - sinx) / (cos^2x - sin^2x)

Expanding the numerator, we have:

= (cos^2x - 2sinxcosx + sin^2x) / (cos^2x - sin^2x)

Applying the Pythagorean identity (sin^2x + cos^2x = 1), we get:

= (cos^2x - 2sinxcosx + sin^2x) / (1 - sin^2x)

Rearranging the terms in the numerator and denominator, we have:

= (cos^2x + sin^2x - 2sinxcosx) / (1 - sin^2x)

Now, apply the trigonometric identity for double angle:

= (1 - 2sinxcosx) / (1 - sin^2x)

Next, apply the identity for 2sinθcosθ = sin(2θ):

= (1 - sin(2x)) / (1 - sin^2x)

Finally, use the Pythagorean identity again and simplify:

= (1 - sin(2x)) / cos^2x
= sec^2x - sin(2x) / cos^2x

Since sin(2x) = 2sinxcosx, we can substitute this into the equation:

= sec^2x - (2sinxcosx / cos^2x)
= sec^2x - 2tanx
= sec^2x - tan^2x

Therefore, we have proven that (cosx - sinx) / (cosx + sinx) is equal to sec^2x - tan^2x.