Theorem 3 from this section states that:

\(\displaystyle{a}\cdot{b}={m}{i}{d}{a}{p}{a}{r}{a}{l}\le{l}{b}{m}{i}{d}{\cos{\theta}}\)

where \theta is the angle between the vectors a,b

\(\displaystyle{\left\langle{2},{1},-{1}\right\rangle}\cdot{\left\langle{1},{x},{0}\right\rangle}=\sqrt{{{2}^{{{2}}}+{1}^{{{2}}}+{\left(-{1}\right)}^{{{2}}}}}\sqrt{{{1}^{{{2}}}+{x}^{{{2}}}+{0}^{{\lbrace}}}}{{\cos{{45}}}^{{\circ}}}\)

Remember that:

\(\displaystyle{\left\langle{a}_{{{1}}},{b}_{{{1}}},{c}_{{{1}}}\right\rangle}\cdot{\left\langle{a}_{{{2}}},{b}_{{{2}}},{c}_{{{2}}}\right\rangle}={a}_{{{1}}}{a}_{{{2}}}+{b}_{{{1}}}{b}_{{{2}}}+{c}_{{{1}}}{c}_{{{2}}}\)

This is because when it comes to the unit vectors i,j,k, their dot product with themselves is 1 and their dot product with the other two is 0.

\(\displaystyle{\left({2}\right)}{\left({1}\right)}+{\left({1}\right)}{\left({x}\right)}+{\left(-{1}\right)}{\left({0}\right)}=\sqrt{{{4}+{1}+{1}}}\sqrt{{{1}+{x}^{{{2}}}+{0}}}{\frac{{{1}}}{{\sqrt{{{2}}}}}}\)

\(\displaystyle{2}+{x}+{0}=\sqrt{{{6}}}\sqrt{{{1}+{x}^{{{2}}}}}{\frac{{{1}}}{{\sqrt{{{2}}}}}}\)

\(\displaystyle{2}+{x}=\sqrt{{{3}}}\sqrt{{{1}+{x}^{{{2}}}}}\)

Square both sides

\(\displaystyle{\left({2}+{x}\right)}^{{{2}}}={3}{\left({1}+{x}^{{{2}}}\right)}\)

\(\displaystyle{4}+{4}{x}+{x}^{{{2}}}={3}+{3}{x}^{{{2}}}\)

Rewrite the quadratic equation in the standard form

\(\displaystyle{2}{x}^{{{2}}}-{4}{x}-{1}={0}\)

Using the quadratic formula, we can write

\(\displaystyle{x}={\frac{{-{\left(-{4}\right)}\pm\sqrt{{{\left(-{4}\right)}^{{{2}}}-{4}{\left({2}\right)}{\left(-{1}\right)}}}}}{{{2}{\left({2}\right)}}}}={\frac{{{4}\pm\sqrt{{{24}}}}}{{{2}{\left({2}\right)}}}}={\frac{{{2}\pm\sqrt{{{6}}}}}{{{2}}}}\)

\(\displaystyle{a}\cdot{b}={m}{i}{d}{a}{p}{a}{r}{a}{l}\le{l}{b}{m}{i}{d}{\cos{\theta}}\)

where \theta is the angle between the vectors a,b

\(\displaystyle{\left\langle{2},{1},-{1}\right\rangle}\cdot{\left\langle{1},{x},{0}\right\rangle}=\sqrt{{{2}^{{{2}}}+{1}^{{{2}}}+{\left(-{1}\right)}^{{{2}}}}}\sqrt{{{1}^{{{2}}}+{x}^{{{2}}}+{0}^{{\lbrace}}}}{{\cos{{45}}}^{{\circ}}}\)

Remember that:

\(\displaystyle{\left\langle{a}_{{{1}}},{b}_{{{1}}},{c}_{{{1}}}\right\rangle}\cdot{\left\langle{a}_{{{2}}},{b}_{{{2}}},{c}_{{{2}}}\right\rangle}={a}_{{{1}}}{a}_{{{2}}}+{b}_{{{1}}}{b}_{{{2}}}+{c}_{{{1}}}{c}_{{{2}}}\)

This is because when it comes to the unit vectors i,j,k, their dot product with themselves is 1 and their dot product with the other two is 0.

\(\displaystyle{\left({2}\right)}{\left({1}\right)}+{\left({1}\right)}{\left({x}\right)}+{\left(-{1}\right)}{\left({0}\right)}=\sqrt{{{4}+{1}+{1}}}\sqrt{{{1}+{x}^{{{2}}}+{0}}}{\frac{{{1}}}{{\sqrt{{{2}}}}}}\)

\(\displaystyle{2}+{x}+{0}=\sqrt{{{6}}}\sqrt{{{1}+{x}^{{{2}}}}}{\frac{{{1}}}{{\sqrt{{{2}}}}}}\)

\(\displaystyle{2}+{x}=\sqrt{{{3}}}\sqrt{{{1}+{x}^{{{2}}}}}\)

Square both sides

\(\displaystyle{\left({2}+{x}\right)}^{{{2}}}={3}{\left({1}+{x}^{{{2}}}\right)}\)

\(\displaystyle{4}+{4}{x}+{x}^{{{2}}}={3}+{3}{x}^{{{2}}}\)

Rewrite the quadratic equation in the standard form

\(\displaystyle{2}{x}^{{{2}}}-{4}{x}-{1}={0}\)

Using the quadratic formula, we can write

\(\displaystyle{x}={\frac{{-{\left(-{4}\right)}\pm\sqrt{{{\left(-{4}\right)}^{{{2}}}-{4}{\left({2}\right)}{\left(-{1}\right)}}}}}{{{2}{\left({2}\right)}}}}={\frac{{{4}\pm\sqrt{{{24}}}}}{{{2}{\left({2}\right)}}}}={\frac{{{2}\pm\sqrt{{{6}}}}}{{{2}}}}\)