# Thread: calculating cos(nθ) and sin(nθ) with de Moivre

1. ## calculating cos(nθ) and sin(nθ) with de Moivre

I'm not sure in which subforum I should post this, feel free to move it to another subforum.

From my course:

$\displaystyle (cos(\theta) + jsin(\theta))^3 = cos(3\theta) + jsin(3\theta)$
$\displaystyle cos^3(\theta) + 3jcos^2(\theta)sin(\theta) - 3cos(\theta)sin^2(\theta) - jsin^3(\theta) = cos(3\theta) + jsin(3\theta)$
<->
$\displaystyle cos(3\theta) = cos^3(\theta) - 3cos(\theta)sin^2(\theta)$ and $\displaystyle sin(3\theta) = 3cos^2(\theta)sin(\theta) - sin^3(\theta)$

I have no problem with the first two lines, I don't understand how you can logically deduce the last line from the first two lines.
After all, $\displaystyle cos(3\theta) = cos^3(\theta) + 3jcos^2(\theta)sin(\theta) - 3cos(\theta)sin^2(\theta) - jsin^3(\theta) - jsin(3\theta)$

2. In order to get the third line, they equated the real parts of both sides of the second line, and the imaginary parts of both sides of the second line.

3. So that is comparable to when you would seperate X and Y in an ´ordinary` equation?
File:Complex conjugate picture.svg - Wikipedia, the free encyclopedia