How to find the minimum of the $a^2+b^2+c^2+a+b+c+ab+bc$ (1): Let $a,b\in R$, Find this minimum of the value $a^2+b^2+ab+a+b$
I have prove $a^2+b^2+ab+a+b\ge-\dfrac{1}{3}$
(2): Let $a,b,c\in R$, find the minimum of the value
$$a^2+b^2+c^2+a+b+c+ab+bc$$
 I think when $a=b=c=-\dfrac{1}{3}$ one gets a minimum.
(3): How to find the minimum $n>1,x_{i}\in R$
$$M=\sum_{i=1}^{n}(x^2_{i}+x_{i})+\sum_{i=1}^{n-1}x_{i}x_{i+1}$$For specific n, for example, n=2, I can get: $\min{M}=-\dfrac{1}{3}$
But in above generalized problem, how can I solve that ? Can I get the result by using sage or mathematica ?
 A: $$\begin{align}\\& a^2+b^2+c^2+a+b+c+ab+bc\\&=a^2+(1+b)a+b^2+c^2+b+c+bc\\&=\left(a+\frac{1+b}{2}\right)^2-\left(\frac{1+b}{2}\right)^2+b^2+c^2+b+c+bc\\&=\left(a+\frac{1+b}{2}\right)^2+\frac 34b^2+\left(\frac 12+c\right)b+c^2+c-\frac 14\\&=\left(a+\frac{1+b}{2}\right)^2+\frac{3}{4}\left(b+\frac{1+2c}{3}\right)^2-\frac 34\left(\frac{1+2c}{3}\right)^2+c^2+c-\frac 14\\&=\left(a+\frac{1+b}{2}\right)^2+\frac{3}{4}\left(b+\frac{1+2c}{3}\right)^2+\frac 23\left(c+\frac 12\right)^2-\frac 12\\&\ge -\frac 12\end{align}$$
The equality is attained when $a+\frac{1+b}{2}=b+\frac{1+2c}{3}=c+\frac 12=0$, i.e. $a=-\frac 12,b=0,c=-\frac 12$. 
Hence, the minimum of $a^2+b^2+c^2+a+b+c+ab+bc$ is $\color{red}{-\frac 12}$. 
($a=b=c=-\frac 13$ does not give the minimum.)
A: EDIT1: as Macavity pointed out the mistake, I correct solution. 
hint :
$2M=(x_1+\dfrac{1}{2})^2+\sum_{i=1}^{n-1}(x_i+x_{i+1}+\dfrac{1}{2})^2+(x_n+\dfrac{1}{2})^2+ 2M_{min}$
but this is only work with $n=2k+1$ for $x_i$ can get reachable number.
for $n=2k$, I got answer but I am trying to find out a simple solution.
Edit2: following is the solution.
$2M=(x_1+\dfrac{k}{2k+1})^2+(x_1+x_2+\dfrac{k+1}{2k+1})^2+(x_2+x_3+\dfrac{k}{2k+1})^2+(x_3+x_4+\dfrac{k+1}{2k+1})^2+(x_4+x_5+\dfrac{k}{2k+1})^2+...+(x_{n-1}+x_n+\dfrac{k+1}{2k+1})^2+(x_n+\dfrac{k}{2k+1})^2+2M_{min}$
