1. ## cos2x

Hello,

So I want to evaluate cos(2x) in c. Using Trigonometric Identities:

cos(2x) = cos^2(x) - sin^2(x) = 2 cos^2(x) - 1 = 1 - 2 sin^2(x)

Where:

cos(2x) = 1 - 2 sin^2(x)

However:

sin^2(x) = 1/2 - 1/2 cos(2x)

So is this like the chicken and the egg?

Using sin^2(x) to evaluate cos(2x) which needs sin^2(x). I only have access to the basic functions cos, sin etc and I was hoping to evaluate cos(2x) using a combination of these.

Or is cos(2x) simply the cosine of twice the angle. I have only recently returned from a long hiatus from the world of mathematics so please forgive me if the solution is glaringly obvious. Any help would be greatly appreciated.

Cheers,

Lloyd.

2. Originally Posted by Lloyd78
Hello,

So I want to evaluate cos(2x) in c. Using Trigonometric Identities:

cos(2x) = cos^2(x) - sin^2(x) = 2 cos^2(x) - 1 = 1 - 2 sin^2(x)

Where:

cos(2x) = 1 - 2 sin^2(x)

However:

sin^2(x) = 1/2 - 1/2 cos(2x)

So is this like the chicken and the egg?

Using sin^2(x) to evaluate cos(2x) which needs sin^2(x). I only have access to the basic functions cos, sin etc and I was hoping to evaluate cos(2x) using a combination of these.

Or is cos(2x) simply the cosine of twice the angle. I have only recently returned from a long hiatus from the world of mathematics so please forgive me if the solution is glaringly obvious. Any help would be greatly appreciated.

Cheers,

Lloyd.

I don't understand what's the problem: $\displaystyle \sin^2x$ is a basic function raised to the second power!
And yes: $\displaystyle \cos 2x$ is just the value of cosine of twice the angle x.
Mathematics is a jealous lover: if you keep away from it a long time it gets its revenge by making your life tough when you want to come back to it.

Tonio

3. Originally Posted by Lloyd78

Or is cos(2x) simply the cosine of twice the angle.
Lloyd.
Bingo!

$\displaystyle \cos(2x) = \cos(x+x)$

Of course to evaluate it it will need to be equal to something

If you're doing calculus (as the forum would imply you are) then it's nearly always easier to manipulate $\displaystyle \cos(2x)$ than $\displaystyle 1-2\sin ^2(x)$ or $\displaystyle 2 \cos ^2(x) - 1$

4. What do you mean by "evaluate cos(2x) in c"? In particular, what is "c"?

The programming language? Since C has sine and cosine functions just "cos(2*x)" is simplest.

The complex numbers? $\displaystyle cos(x)= \frac{e^{ix}+ e^{-ix}}{2}$

5. Cheers guys!

Yeah the programming language c. Had a feeling I might be asking the obvious. Being the cosine of twice the angle does make life a lot easier. Hangs head...

Thanks again!

,

,

,

,

,

,

,

,

,

,

,

,

,

,

# evaluate cos 2x to sin

Click on a term to search for related topics.