I have the vectors:
$v = (1, 0, 1)$ and $w = (1, x, 2)$
How do I find out which values $x$ has to be to make the angle between $v$ and $w $ of 45° degrees?
What I have tried to do is:
$$v\cdot w = ||v||\cdot||w|| \cdot \cos(45°)$$
$$\frac{v\cdot w}{||v||\cdot||w||} = \cos(45°)$$
I calculated that $||v||\cdot||w|| = \sqrt{5+x^2}$
$$\frac{v\cdot w}{\sqrt{5+x^2}} = \cos(45°)$$
Which is where I'm stuck.
From $$\langle v,w\rangle = ||v||\cdot||w|| \cdot \cos(45°)$$
that is
$$1\cdot 1+0\cdot x+1\cdot 2=\sqrt{5+x^2}\sqrt{2}/2$$
$$3\sqrt{2}=\sqrt{5+x^2}$$ $$18=5+x^2$$ $$x^2=13$$ thus
$$\bbox[yellow,5px,border:2px solid red]{x=\pm \sqrt{13}} $$