Prove that 1+cosx+sinx/1-cosx+sinx=cotx

I do not know what are your numerators and denominators.

multiply top and bottom by 1+sin+cos

For ease of reading, I'll just use s and c for sinx and cosx

(1+s+c)/(1+s-c) * (1+s+c)/(1+s+c)
= (1+s+c)^2 / ((1+s)^2 - c^2)
= (1+s^2+c^2+2s+2c+2sc) / (1+2s+s^2-c^2)
= (2+2s+2c+2sc)/(1+2s+s^2-1+s^2)
= (2+2s+2c+2sc)/(2s+2s^2)
= ((1+c)(1+s))/(s(1+s))
= (1+c)/s

Now you see the typo. Using the half-angle formulas, the result is

cot(x/2), not cot(x)

To prove that 1 + cos(x) + sin(x) / 1 - cos(x) + sin(x) is equal to cot(x), we need to manipulate the expression and simplify it using trigonometric identities.

Let's start by simplifying the numerator, which is 1 + cos(x) + sin(x):
1 + cos(x) + sin(x) = (cos^2(x) + 2cos(x)sin(x) + sin^2(x)) / (cos(x) + sin(x))

Next, let's simplify the denominator, which is 1 - cos(x) + sin(x):
1 - cos(x) + sin(x) = (cos^2(x) - 2cos(x)sin(x) + sin^2(x)) / (cos(x) - sin(x))

Now, let's rewrite the expression with the simplified numerator and denominator:
(cos^2(x) + 2cos(x)sin(x) + sin^2(x)) / (cos(x) + sin(x)) / (cos^2(x) - 2cos(x)sin(x) + sin^2(x)) / (cos(x) - sin(x))

Next, we can apply the trigonometric identity sin^2(x) + cos^2(x) = 1 to both the numerator and denominator:
(1 + 2cos(x)sin(x)) / (cos(x) + sin(x)) / (1 - 2cos(x)sin(x)) / (cos(x) - sin(x))

Now, let's try to simplify further by factoring out 2sin(x)cos(x):
[1 + 2sin(x)cos(x)] / (cos(x) + sin(x)) / [1 - 2sin(x)cos(x)] / (cos(x) - sin(x))

We can see that the numerator and denominator of the expression have a common factor of cos(x) + sin(x):
[(cos(x) + sin(x))(1 + 2sin(x)cos(x))] / [(cos(x) + sin(x))(1 - 2sin(x)cos(x))]

Simplifying further, the common factors of (cos(x) + sin(x)) cancel out:
(1 + 2sin(x)cos(x)) / (1 - 2sin(x)cos(x))

Now, let's apply the double angle identity for tangent:
2tan(x) / (1 - tan^2(x))

Finally, using the identity 1 + tan^2(x) = sec^2(x), we can rewrite the expression as:
2tan(x) / sec^2(x)

Now, let's use the identity cot(x) = 1 / tan(x) to rewrite the expression:
2 / (sec^2(x) * cot(x))

Using the identity sec^2(x) = 1 + tan^2(x), we can simplify further:
2 / (1 + tan^2(x)) * 1 / tan(x)

Simplifying, we get:
2 / tan(x) = cot(x)

Therefore, we have proven that 1 + cos(x) + sin(x) / 1 - cos(x) + sin(x) = cot(x).