[Math] Trigonometry: Solve $(1-\cos\alpha)^2 + \sin^2\alpha = d^2$ for $\alpha$

trigonometry

My next step in implementing my algorithm in Java is following.

It is quite difficult to explain, but I know what I need. I have this equation:


Given: d
Asked: $\alpha$

$$(1-\cos\alpha)^2 + \sin^2\alpha = d^2 $$


Which I "simplified" to this, using this formula's:

$$2+2\cos\alpha+\frac{\cos2\alpha}{2}-\frac{\sin\alpha}{2} = d^2$$

But now, I'm stuck. This is probably pretty easy, but I'm 15 years old at the moment. I didn't see that much trigonometry in school yet.

Can you help me?

Best Answer

Make the following manipulations: $$(1-\cos(\alpha))^2+\sin^2(\alpha)=d^2$$ $$1-2\cos(\alpha)+\cos^2(\alpha)+\sin^2(\alpha)=d^2$$ $$1-2\cos(\alpha)+1=d^2$$ $$2-2\cos(\alpha)=d^2$$ $$\cos(\alpha)=1-\frac{d^2}{2}$$ $$\alpha=\cos^{-1}\left(1-\frac{d^2}{2}\right)$$

Related Question