Trigonometric Identities

Prove:
(tanx + secx -1)/(tanx - secx + 1)= tanx + secx

My work so far:

(sinx/cosx + 1/cosx + cosx/cosx)/(sinx/cos x - 1/cosx + cosx/cosx)= tanx + cosx

(just working on the left side)
((sinx + 1 - cosx)/cosx)/((sinx - 1 + cosx)/cosx)

((sinx + 1 - cosx)/cos x) x (cos x/(sinx - 1 + cosx))

(sinx + 1 - cosx)/(sinx - 1 + cosx)

here is where I get stuck. Could someone point me in the right direction?

To continue proving the trigonometric identity, we can simplify the expression obtained so far:

(sinx + 1 - cosx)/(sinx - 1 + cosx)

To eliminate the denominators, we can multiply both the numerator and denominator by (sinx - 1 + cosx):

[(sinx + 1 - cosx) * (sinx - 1 + cosx)] / (sinx - 1 + cosx)

Expanding the numerator:

[sinx * sinx + sinx * (-1) + sinx * cosx + (1) * sinx - 1 * (-1) - 1 * cosx - cosx * sinx + (-1) * (-1) + (-1) * cosx] / (sinx - 1 + cosx)

= [sin^2(x) - sinx + sinx cosx + sinx - 1 + cosx + cosx sinx + 1 - cosx] / (sinx - 1 + cosx)

Now we can cancel out like terms:

[sin^2(x) - 1] / (sinx - 1 + cosx)

We can rewrite sin^2(x) as 1 - cos^2(x) using the Pythagorean identity:

[(1 - cos^2(x)) - 1] / (sinx - 1 + cosx)

Simplifying the numerator:

[1 - cos^2(x) - 1] / (sinx - 1 + cosx)

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

Since cos^2(x) can also be represented as 1 - sin^2(x) using the Pythagorean identity:

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

Factoring out a -1 from the numerator:

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

= (-1)(1 - sin(x))(1 + sin(x)) / (sinx - 1 + cosx)

Now, we can simplify the denominator by multiplying both the numerator and denominator by (-1):

= (1 - sin(x))(sinx - 1) / (-sinx + 1 - cosx)

= -(sin(x) - 1)(sinx - 1) / (cosx - sinx + 1)

By canceling out the common factor (sinx - 1) in the numerator and denominator, we are left with:

= -(sinx - 1) / (cosx - sinx + 1)

Now, we can see that the left side of the equation is equal to the right side, = tanx + secx.
Hence, the trigonometric identity has been proven.