Help prove this identitiy

tan(pi/4+x)+tan(pi/4-x)=2sec2x

Or

LS = sin(pi/4+x)/cos(pi/4+x) + sin(pi/4-x)/cos(pi/4-x)

I will show the expansion of one of these:
sin(pi/4+x) = sin(pi/4)cosx + cos(pi/4)sinx
= (√2/2)cosx + (√2/2)sinx
there will be a √2/2 in every term of each expansion, so it can be factored out and canceled.
so
LS = (cosx+sinx)/(cosx-sinx) + (cosx-sinx)/(cosx + sinx)
= [(cosx+sinx)^2 + (cosx-sinx)^2]/(cos^2x - sin^2x)
= 2/cos2x = 2sec2x = RS
Q.E.D.

To prove the given identity, we'll work on the left side of the equation and simplify it to match the right side.

First, let's express the tangents in terms of sine and cosine using the following identities:

1. tan(x) = sin(x)/cos(x)
2. sec(x) = 1/cos(x)

Applying these identities to the left side of the equation, we have:

tan(pi/4+x) + tan(pi/4-x)
= sin(pi/4+x)/cos(pi/4+x) + sin(pi/4-x)/cos(pi/4-x)

Now, we can apply the sum and difference identities for sine and cosine:

sin(A + B) = sin(A)cos(B) + cos(A)sin(B)
cos(A + B) = cos(A)cos(B) - sin(A)sin(B)

Let's use these identities to simplify the expression:

sin(pi/4 + x) = sin(pi/4)cos(x) + cos(pi/4)sin(x)
= 1/sqrt(2) * (cos(x) + sin(x))

cos(pi/4 + x) = cos(pi/4)cos(x) - sin(pi/4)sin(x)
= 1/sqrt(2) * (cos(x) - sin(x))

sin(pi/4 - x) = sin(pi/4)cos(x) - cos(pi/4)sin(x)
= 1/sqrt(2) * (cos(x) - sin(x))

cos(pi/4 - x) = cos(pi/4)cos(x) + sin(pi/4)sin(x)
= 1/sqrt(2) * (cos(x) + sin(x))

Substituting these simplified expressions back into the original equation:

[sin(pi/4 + x)/cos(pi/4 + x)] + [sin(pi/4 - x)/cos(pi/4 - x)]
= [(1/sqrt(2) * (cos(x) + sin(x)))/(1/sqrt(2) * (cos(x) - sin(x)))] + [(1/sqrt(2) * (cos(x) - sin(x)))/(1/sqrt(2) * (cos(x) + sin(x)))]

Now, let's simplify the expression further:

[(cos(x) + sin(x))/(cos(x) - sin(x))] + [(cos(x) - sin(x))/(cos(x) + sin(x))]

To get a common denominator, we multiply the two fractions:

[(cos(x) + sin(x))^2 + (cos(x) - sin(x))^2] / [(cos(x) - sin(x))(cos(x) + sin(x))]

Expanding the squares:

[cos^2(x) + 2cos(x)sin(x) + sin^2(x) + cos^2(x) - 2cos(x)sin(x) + sin^2(x)] / [cos^2(x) - sin^2(x)]

Canceling out the common terms:

[2(cos^2(x) + sin^2(x))] / [cos^2(x) - sin^2(x)]

Using the Pythagorean identity cos^2(x) + sin^2(x) = 1:

2(1) / [cos^2(x) - sin^2(x)]

Since cos^2(x) - sin^2(x) is equal to cos(2x), we convert it using the double-angle identity:

2 / cos(2x)

Finally, converting 1/cos(2x) back to sec(2x), we get the right side of the equation:

2sec(2x)

Hence, we have proven that tan(pi/4+x) + tan(pi/4-x) = 2sec(2x).

tan (pi/4+x) = (tan pi/4 + tan x)/(1 -tan pi/4 tan x)

tan (pi/4+x) = (tan pi/4 - tan x)/(1 +tan pi/4 tan x)
note tan pi/4 = 1
add and put over common denominator
[(1+tan x)(1+tan x)+(1-tan x)(1-tan x)]/(1 - tan^2 x)
expand top
[1+2 tanx +tan^2 x +1 - 2 tan x +tan^2 x]/(1 - tan^2 x)
or
2(1 + tan^2 x)/(1-tan^2 x)
2 (1+sin^2 x/cos^2 x)/ (1 - sin^2 x/cos^2 x)
= 2 (cos^2 x + sin^2 x)/(cos^2 x - sin^2 x)
but cos^2 + sin^2 = 1 so
= 2/(cos^2 x - sin^2 x)
Now work on the right
cos 2 x = cos^2 x - sin^2 x
so
sec 2x = 1/(cos^2x-sin^2 x)
2 sec 2x = 2 / (cos^2 x -sin^2 x)
the end

Tan(45+x)+tan(45-x)=2sec2x