If $a+b=10$ and $a b=16$, find the value of $a^{2}-a b+b^{2}$ and $a^{2}+a b+b^{2}$
Given,
a + b = 10, ab = 16
We know that,
$(a+b)^{3}=a^{3}+b^{3}+3 a b(a+b)$
$\Rightarrow a^{3}+b^{3}=(a+b)^{3}-3 a b(a+b)$
$\Rightarrow a^{3}+b^{3}=(10)^{3}-3(16)(10)$
$\Rightarrow a^{3}+b^{3}=1000-480$
$\Rightarrow a^{3}+b^{3}=520$
Substitute, $a^{3}+b^{3}=520$
$a+b=10 i n a^{3}+b^{3}$
$=(a+b)\left(a^{2}+b^{2}-a b\right) a^{3}+b^{3}$
$=(a+b)\left(a^{2}+b^{2}-a b\right) 520$
$=10\left(a^{2}+b^{2}-a b\right) 520 / 10$
$=\left(a^{2}+b^{2}-a b\right)$
$\Rightarrow\left(a^{2}+b^{2}-a b\right)=52$
Now, we need to find $\left(a^{2}+b^{2}+a b\right)$
Add and subtract $2 a b$ in $a^{2}+b^{2}+a b$
$\Rightarrow a^{2}+b^{2}+a b-2 a b+2 a b$
$\Rightarrow(a+b)^{2}-a b$
Substitute a + b = 10, ab
$\Rightarrow a^{2}+b^{2}+a b=10^{2}-16=100-16=84$
Hence, the values of $\left(a^{2}+b^{2}-a b\right)=52$ and $\left(a^{2}+b^{2}+a b\right)=84$