maximum and minimum value of $(a+b)(b+c)(c+d)(d+e)(e+a).$ 
Let $a,b,c,d,e\geq  -1$ and $a+b+c+d+e=5.$ Find the maximum and minimum value of $S=(a+b)(b+c)(c+d)(d+e)(e+a).$

I couldn't proceed much, however I think I got the minimum and maximum case.
For minimum, we get $-512$ with equality on $(-1,-1,-1,-1,9).$
For maximum, we get $288$ with equality on   $(-1,-1,-1,4,4).$

We can solve the problem by substitution.
Step 1: Let
\begin{align}
  &A = a+b \\ 
  &B = b+c \\
  &C = c+d \\
  &D = d+e \\
  &E = e+a \\
\end{align}
Then the problem is equivalent to find the maximum and minimum of $ABCDE$, where $A,B,C,D,E\ge -2$ and $A+B+C+D+E = 10$.
\begin{align}
{}
\end{align}
Step 2: Consider each case separately, according to the sign of $A$, $B$, $C$, $D$, and $E$. Without loss of generality, we only need to consider cases as follows:
\begin{align}
 &(1):~(A,B,C,D,E) = (+,+,+,+,+)\\
 &(2):~(A,B,C,D,E) = (+,+,+,+,-)\\
 &(3):~(A,B,C,D,E) = (+,+,+,-,-)\\
 &(4):~(A,B,C,D,E) = (+,+,-,-,-)\\
 &(5):~(A,B,C,D,E) = (+,-,-,-,-)\\
\end{align}
where + means the number is non-negative, and - means the number is non-positive.
Step 3 (Minimum): Of course, the minimum can occur in cases (2) and (4). First, consider case (2). As your intuition suggested, the minimum occurs when $E=-2$ and $A=B=C=D=3$. We can show this as follows. First, observe that for all $(A,B,C,D,E)$, we have
\begin{align}
  -2ABCD \le ABCDE.
\end{align}
Next, observe that $4(ABCD)^{1/4}\le A+B+C+D = 10-E\le 12$, which implies that $ABCD\le 81$. Thus, in case (2), the minimum of $ABCD$ is $-162$. Similarly, you can find the minimum value under case (4), which is $-512$.
Step 4 (Maximum): In the same vein, the maximum can occur in cases (1), (3), and (5). And their maximum values are $32$, $784/9\approx 87.11$, and $288$.
