If $x^{2}+\frac{1}{x^{2}}=18$, find the values of $x+\frac{1}{x}$ and $x-\frac{1}{x}$.
Let us consider the following expression:
$x+\frac{1}{x}$
Squaring the above expression, we get:
$\left(x+\frac{1}{x}\right)^{2}=x^{2}+2 \times x \times \frac{1}{x}+\left(\frac{1}{x}\right)^{2}=x^{2}-2+\frac{1}{x^{2}} \quad\left[(a+b)^{2}=a^{2}+b^{2}+2 a b\right]$
$\Rightarrow\left(x+\frac{1}{x}\right)^{2}=x^{2}+2+\frac{1}{x^{2}}$
$\Rightarrow\left(x+\frac{1}{x}\right)^{2}=20 \quad\left(\because x^{2}+\frac{1}{x^{2}}=18\right)$
$\Rightarrow x+\frac{1}{x}=\pm \sqrt{20}$ (Taking square root of both sides)
Now, let us consider the following expression:
$x-\frac{1}{x}$
Squaring the above expression, we get:
$\left(x-\frac{1}{x}\right)^{2}=x^{2}-2 \times x \times \frac{1}{x}+\left(\frac{1}{x}\right)^{2}=x^{2}-2+\frac{1}{x^{2}} \quad\left[(a-b)^{2}=a^{2}+b^{2}-2 a b\right]$
$\Rightarrow\left(x-\frac{1}{x}\right)^{2}=x^{2}-2+\frac{1}{x^{2}}$
$\Rightarrow\left(x-\frac{1}{x}\right)^{2}=16 \quad\left(\because x^{2}+\frac{1}{x^{2}}=18\right)$
$\Rightarrow x-\frac{1}{x}=\pm 4$ (Taking square root of both sides)