Ta có:
\(a+b=a^2+b^2=a^3+b^3\)
\(\Rightarrow a+b+a^3+b^2=2.\left(a^2+b^2\right)\)
\(\Rightarrow\left(a-2a^2+a^3\right)+\left(b-2b^2+b^3\right)=0\)
\(\Rightarrow a.\left(1-2a+a^2\right)+b.\left(1-2b+b^2\right)=0\)
\(\Rightarrow a.\left(1-a\right)^2+b.\left(1-b\right)^2=0\left(1\right)\)
Ta có:
\(\left(1-a\right)^2\ge0\)
\(\Rightarrow a.\left(1-a\right)^2\ge0\)
\(\left(1-b\right)^2\ge0\)
\(\Rightarrow b.\left(1-b\right)^2\ge0\)
Từ \(\left(1\right)\) ta có:
\(\Leftrightarrow\left[{}\begin{matrix}a.\left(1-a\right)^2=0\\b.\left(1-b\right)^2=0\end{matrix}\right.\)
\(\Leftrightarrow\left[{}\begin{matrix}1-a=0\\1-b=0\end{matrix}\right.\)
\(\Leftrightarrow a=b=1\)
Vậy giá trị của P là:
\(P=a^{2015}+b^{2015}\)
\(P=1+1\)
\(P=2\)