Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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 saw that much trigonometry in school yet.

Can you help me?

share|improve this question
add comment

4 Answers 4

up vote 8 down vote accepted

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)$$

share|improve this answer
    
Yes, indeed. Many thanks. It was indeed not that difficult. But you saw this: $\cos^2\alpha + \sin^2\alpha = 1$. I didn't see it. –  Martijn Courteaux Jul 10 '11 at 19:14
    
@Martijn: No problem, glad to help :) –  Zev Chonoles Jul 10 '11 at 19:20
    
Alternatively you can state the above as $\alpha=2 \sin^{-1} \left( \frac{d}{2} \right)$ using a tan-half-angle formula (link en.wikipedia.org/wiki/Tangent_half-angle_formula) –  ja72 Jul 11 '11 at 2:59
    
Nitpick: $\alpha = \cos^{-1} (...)$ is not entirely correct as there are infinite solutions... –  Aryabhata Jul 11 '11 at 4:23
    
Is it safe to mix upper index meanings like that? –  Alexei Averchenko Jul 11 '11 at 5:03
add comment

A slightly more general tip that I sometimes tell my students:

If an equation contains more than one trig function, it might be nice if there were a way to rewrite it using only one trig function.

Sometimes that's easy and sometimes that's hard. But if you see precisely $\sin^2 \alpha$ or $\cos^2 \alpha$, those are very easy to rewrite using another trig function.

(The identity $\sin^2 \alpha + \cos^2 \alpha = 1$ is far and away the most important trig identity of them all.)

share|improve this answer
add comment

You could just expand the square... Hint : $\left( 1-\cos \alpha \right)^2 + \sin ^2 \alpha = 1 - 2 \cos \alpha + \cos^2 \alpha + \sin^2 \alpha$, then recall that $\cos^2 \alpha + \sin^2 \alpha = 1$.

share|improve this answer
    
Guess I was nearly one minute late ^_^ –  Bouazza S. Jul 10 '11 at 19:15
add comment

Write $\sin^{2}x = 1-\cos^{2}{x}$. Then you have

\begin{align*} (1-\cos{x})^{2} + \sin^{2}{x} &= (1-\cos{x})^{2} + (1+\cos{x})\cdot (1-\cos{x}) \\ &= (1-\cos{x}) \cdot \Bigl[ 1- \cos{x} + 1 + \cos{x} \Bigr] \\ &= 2\: \sin^{2}\frac{x}{2} \cdot 2 = 4\:\sin^{2} \frac{x}{2} \end{align*}

Now $$ \frac{d^{2}}{4} =\sin^{2}\frac{x}{2} \Longrightarrow \sin\frac{x}{2} = \pm\frac{d}{2}$$

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.