# What am I supposed to do here now? $\tan(\pi/8) = \sqrt{2} -1$ complex analysis

Find $\sqrt{1+i}$, and hence show $\tan(\pi/8) = \sqrt{2}-1$

Okay so I know that $\sqrt{1+i} = 2^{1/4}e^{i\pi/8}$ and I know $\sin x = \frac{e^{ix} - e^{-ix}}{2i}$ and $\cos x = \frac{e^{ix} + e^{-ix}}{2}$

If i directly substitute those definitions of sine and cosine into $$\tan(x) = \frac{\sin(x)}{\cos(x)}$$

then I am going to end up with a complex number in the form of $x + iy$. My key says

$$\tan \pi/8 = \sqrt{\frac{\sqrt{2}-1}{\sqrt{2}+1}} = \sqrt{2}-1.$$

Did they just use $\Re(\tan \pi/ 8) = \frac{\Re (\sin )}{\Re \cos}$?

• I found a quick formula for computing $Tan(\pi/8)$; please see my post. Commented Jun 28, 2014 at 6:06

If you let $$\sqrt{1+i}=x+iy$$, then $$(x^2-y^2)+i2xy=1+i$$. then $$x^2-y^2=1$$ and $$2xy=1$$. Hence $$(x^2+y^2)^2=(x^2-y^2)^2+4x^2y^2=2$$. Hence $$x^2+y^2=\sqrt{2}$$. Now adding this two terms $$x^2=\frac{1+\sqrt{2}}{2}$$ and $$y^2=\frac{\sqrt{2}-1}{2}$$. So $$\sqrt{1+i} =\sqrt{\frac{1+\sqrt{2}}{2}}+i\sqrt{\frac{\sqrt{2}-1}{2}}$$

You already have $$\sqrt{1+i} = 2^{1/4}e^{i\pi/8}=2^{\frac{1}{4}}\left(\cos \frac{2\pi}{8}+ i\sin \frac{2 \pi}{8}\right)$$

Comparing both these $$\cos \frac{ \pi}{8}=\frac{1}{2^{\frac{1}{4}}}\sqrt{\frac{\sqrt{2}+1}{2}}$$ and $$\sin \frac{ \pi}{8}=\frac{1}{2^{\frac{1}{4}}}\sqrt{\frac{\sqrt{2}-1}{2}}$$

• Can't you jump $x^2=\frac{1+\sqrt{2}}{2}$ and $y^2=\frac{\sqrt{2}-1}{2}$ straight to the answer? It looks like you can. *By that I mean every $x + iy$ is of the form $re^{i\arctan(y/x)}$ Commented Jun 28, 2014 at 5:29
• The values you give are for $\cos(\pi/8)$ and $\sin(\pi/8)$. I let you editing. Cheers :) Commented Jun 28, 2014 at 6:12
• @ClaudeLeibovici I didn't get you. Commented Jun 28, 2014 at 6:39
• You know what? I fund my mistake. I used the wrong formula. I don't know why I put a $i$ in my $\cos$ in the first place. That's why I spent 3 pages of writing and couldn't figure out what the heck was wrong. Commented Jun 28, 2014 at 7:32
• @TattwamasiAmrutam : $\cos \frac{\pi}{8}=\frac{1}{2^{\frac{1}{4}}}\sqrt{\frac{\sqrt{2}+1}{2}}$ not $\cos \frac{2\pi}{8}$ Commented Jun 28, 2014 at 18:20

You can work it out by rationalizing *

You can use a half-angle formula for Tan, i.e., a formula for Tan(B/2)

$tan(B/2) = (1 − cos B) / sin B = sin B / (1 + cos B)$

For CosB=SinB =$\sqrt \frac{2}{2}$, then , $Tan \pi/8= \frac{\frac{\sqrt{2}}{2}}{1+\frac{\sqrt{2}}{2}}=\frac{\sqrt2}{2+\sqrt2}=\frac{2\sqrt2-2}{2}=\sqrt{2}-1$

If you want to arrive at the actual values of $\sqrt{2}-1, \sqrt{2}+1$ for sin, cos, you can use DeMoivre's theorem:

$(Cos\theta+iSin\theta)^{1/2}=(Cos\theta/2+ iSin \theta/2)$, and then you can use half-angle formulas for each of sine and cosine:

$cos(B/2) = ± \sqrt{([1 + cos B] / 2)}$

$Sin(B/2) = ±\sqrt{([1 - cos B] / 2})$

And in this case, $SinB=CosB= \frac{\sqrt{2}}{2}$

• No I am actually more confused with how they obtained $\sqrt{\frac{\sqrt{2}-1}{\sqrt{2}+1}}$ in the first place. I can rationalize easily Commented Jun 28, 2014 at 5:28
• You can use DeMoivre and then half-angle formulas for each sine and cosine. Commented Jun 28, 2014 at 5:33
• Thanks, but that isn't the point of this exercise... Commented Jun 28, 2014 at 6:08
• Well, you can use half-angle formulas for sine and cosine, using DeMoivre's theorem, to arrive at $\sqrt{2}-1$ and $\sqrt{2}+1$. Commented Jun 28, 2014 at 6:18
• You know what? I fund my mistake. I used the wrong formula. I don't know why I put a $i$ in my $\cos$, this explains why my answer made no sense. Commented Jun 28, 2014 at 7:26