The correct half angle formula? It is well known that $$\cos(\frac x2)=\sqrt{\frac{1+\cos(x)}2}$$
And, we also know that $\cos(\frac x2)$ may be negative for some $x$ values.
So that implies that:
$$\cos(\frac x2)=\pm\sqrt{\frac{1+\cos(x)}2}$$
However, it is fairly obvious that it will only be one value, positive or negative, not both.
So what's the truly correct half angle formula?  It gives the right magnitude, but it doesn't provide the correct sign.  And there must be a formula that implements the input value to determine the sign of the result?
Of course, you could give me ranges of values where it will be positive and ranges where it will be negative, but I want a formula that works regardless of input that doesn't require me to determine if it falls under positive or negative.
Regards, Simple Art
 A: Actually, there is no perfect formula you want.
$$\cos^2{\frac{x}{2}}=\frac{1+\cos{x}}{2}$$
is the best formula you can get.
If you want to determine the sign you vitally need the range angle lives.
A: $$
\cos\left(\frac 23 \pi \right)
 = \cos\left(\frac 83 \pi \right) = -\frac12,
$$
but
$$
\cos\left(\frac{\frac 23 \pi}{2} \right)
 = \cos\left(\frac 13 \pi \right) = \frac12
$$
while
$$
\cos\left(\frac{\frac 83 \pi}{2} \right)
 = \cos\left(\frac 43 \pi \right) = -\frac12.
$$
There is no reliable way to tell the sign of $\cos\left(\frac{x}{2}\right)$
using the value of $\cos(x)$, or even using any combination of the
trigonometric functions of $x$ in any way, since (for example)
the trig functions of $\frac 23 \pi$ all have the exact same values
as the corresponding functions of $\frac 83 \pi$, yet the cosines
of the half angles have opposite signs.
I don't see how you can avoid somehow determining at least whether
$x$ satisfies $2n\pi \leq x < 2(n+1)\pi$ for $n$ even or $n$ odd,
because each time you add $2\pi$ to $x$ you flip the sign of
$\cos\left(\frac{x}{2}\right)$.
And when you find the parity of $n$ for which
$2n\pi \leq x < 2(n+1)\pi$, it seems to me you will be doing the exact same
thing you wanted to avoid, determining whether
$x$ falls in one of the "positive" intervals or one of the
"negative" intervals.
