Maximizing a polynomial expression involving the sidelengths of an inscribed pentagon 
Given that $ABCDE$ is a convex pentagon and is inscribed in a circle of radius $1$ unit with $AE$ as diameter. If $AB=a,BC=b ,CD=c$ and $DE=d$, then maximum possible integral value of $a^2+b^2+c^2+d^2+abc+bcd$ is ?

What I tried
$AE =2$ , I joined points to form lines $BE,AC,CE$ and $AD$ and tried to use the fact that angle subtended by diameter would be a right angle.
However, I was unable to solve the problem. 
I was looking for some hint or an alternate approach to the problem.
 A: We will use the fact: If a bunch of circular chords can be packed to "fit" a half-circle, so do any rearrangement of them.

Let $\mathcal{E} = a^2+b^2+c^2+d^2 + bc(a+d)$ be the expression at hand.
Choose points $P, Q, R$ on the half-circle such that
$AP = b$, $PQ = c$, $QR = a$, $RE = d$.
Let $u = AQ$, $v = QE$ and $\angle QEA = \theta$. When either $u$ or $v$ vanishes,  $bc(a+d)$ also vanishes. It is easy to see $\mathcal{E}$ trivially reduces to $4$. This means we only need to consider the case $u, v \ne 0$.
Since $AE$ is a diameter of the half circle, $\angle AQE = \frac{\pi}{2}$. This leads to $u^2 + v^2 = 4$ and $v = 2\cos\theta$. The condition $v \ne 0$ implies $u \ne 2$.
Since $\angle APQ$ and $\angle QEA$ are opposite angles of cyclic quadrilateral $APQE$, these two angles sum to $\pi$. Apply cosine rule to triangle $APQ$, we find
$$\frac{b^2 + c^2 - u^2}{2bc} = \cos(\pi - \theta) = -\cos\theta = -\frac{v}{2}$$
This leads to
$$b^2 + c^2 + vbc = u^2\tag{*1a}$$
By a similar argument, we have
$$a^2 + d^2 + uad = v^2\tag{*1b}$$
Use these, we can rewrite the expression at hand as
$$\begin{align}
\mathcal{E} &=  (a^2+ d^2) + (b^2+c^2) + bc(a+d)\\
&= (v^2 - uad) + (u^2-vbc) + bc(a+d)\\
&= 4 + bc(a+d-v) - uad\tag{*2}
\end{align}$$
To bound $\mathcal{E}$ from below and above, we look at two sub-problems.
We fix $a, d$ and then either minimize or maximize $\mathcal{E}$ by varying $b,c$ alone. When $a, d$ are fixed, so do $u, v$. Apply triangle inequality to triangle $QRE$, we have $a + d - v \ge 0$. 
The sub-problem of minimizing $\mathcal{E}$ becomes easy, we just set either $b$ or $c$ to $0$ and get $$4 - uad \le \mathcal{E}$$
For non-degenerate configurations, $bc(a+d-v) > 0$ and above inequality becomes strict. It is easy to show $uad \le 1$ using the concavity of $\log\sin x$. In general, we have:
$$3 \le \mathcal{E}$$
and the inequality becomes strict for non-degenerate configurations.
For the sub-problem of maximizing $\mathcal{E}$, we need $bc$ as large as possible. Introduce variables $p, q$ such that $b+c = p$, $b-c = q$, condition $(*1a)$ becomes
$$\frac{p^2+q^2}{2} + v\frac{p^2-q^2}{4} = u^2
\quad\iff\quad (2+v)p^2 + (2-v)q^2 = 4u^2
$$
Notice
$$bc = \frac{p^2-q^2}{4}
= \frac{1}{4(2+v)}((2+v)p^2-(2+v)q^2) = 
\frac{1}{2+v}(u^2 - q^2)$$
For this sub problem, $\mathcal{E}$ is maximized when $q = 0$. 
When $q = 0$, $b = c$ and their common value satisfies:
$$b^2(2+v) = c^2(2+v) = u^2 \implies b^2 = c^2 = \frac{u^2}{2+v} = 2 - v$$
As a result, we find
$$\mathcal{E} \le 4 + (2-v)(a+d - v) - uad$$
Introduce variables $a + d = r, a - d = s$, condition $(*1b)$ becomes
$$\frac{r^2+s^2}{2} + u\frac{r^2-s^2}{4} = v^2
\quad\iff\quad (2+u)r^2 + (2-u)s^2 = 4v^2$$
We find
$$ad = \frac{r^2-s^2}{4} = \frac{1}{4(2-u)}((2-u)r^2 - (2-u)s^2)
= \frac{1}{2-u}(r^2-v^2)
$$
and the inequality becomes
$$\mathcal{E} \le 4 + (2-v)(r-v) - \frac{u}{2-u}(r^2-v^2)
= 4 + \frac{r-v}{2-u}\left[(2-u)(2-v) - u(r+v)\right]\\
= 4 - \frac{r-v}{2-u}\left[2(u+v-2) + ur\right]
$$
Apply triangle inequality to triangle $AQE$, we have $u + v - 2 \ge 0$.
Together with $r - v = a + d - v \ge 0$, this leads to
$$\frac{r-v}{2-u}\left[2(u+v-2)+ur\right] \ge 0 \quad\implies\quad \mathcal{E} \le 4
$$
If one look at last inequality carefully, we find it is strict unless
$$(r - v = 0) \lor ( u+v-2 = 0 \land ( u = 0 \lor r = 0 ))$$
The case $r = 0$ can be ruled out because it contradict with our assumption $v \ne 0 $. We can simplify last condition to
$$a + d = v \lor u = 0$$
In both cases, the configuration is degenerate (i.e at least one of $a,b,c,d$ vanishes). 
Combine these two bounds, we can conclude
$$3 \le \mathcal{E} \le 4$$
For non-degenerate configurations, we can strengthen this to $3 < \mathcal{E} < 4$.
So the answer to the original question "What is the maximum possible integral value of $\mathcal{E}$?" is $4$ for generate configurations and doesn't exist for non-degenerate configurations.
A: In quadrilateral $ABCE$ By Ptolemy's theorem
$$2b+av=(\sqrt {4-a^2})u$$ 
And similarly in quadrilateral $CDEA$ 
$$2c+du=(\sqrt {4-d^2})v$$
On squaring these equations and adding them we get $$4b^2+a^2v^2+4abv+4c^2+d^2u^2+4cdu$$
$$=4u^2-a^2u^2+4v^2-v^2d^2$$
Which simplifies to 
$$4(b^2+c^2)+(a^2+d^2)(u^2+v^2)+4(abv+cdu)=4(u^2+v^2)$$
By Pythagoras theorem we get $$u^2+v^2=4$$
Hence the obtained expression simplifies to $$a^2+b^2+c^2+d^2+(abv+cdu)=4$$
In triangle $ABC$ and triangle $CDE$ , By triangle inequality we get $u\lt (a+b)$ and $v\lt (c+d)$
Using all these expressions and inequalities we get 
$$a^2+b^2+c^2+d^2+abc+bcd+ ad(b+c)\lt 4$$
Now by AM-GM we have 
$$\frac{a+b+c+d}{3}\ge.\sqrt[3] {ad(b+c)}$$
Hence 
$$ad(b+c)\le (\frac{a+b+c+d}{3})^3$$
We have triangle inequalities 
 $$u\lt (a+b)$$ $$v\lt (c+d)$$ $$u+v\gt 2$$
Using the result of AM GM and these inequalities we get 
$$a^2+b^2+c^2+d^2+abc+bcd\lt \frac{100}{27}$$
Hence the integral value is 3

A: I'll sum up what I found until now. I don't have a proof yet that $4$ is indeed the maximal value, but I think it's pretty safe to say that that is the correct answer.
I wrote out some R code to generate several point distributions forming a convex pentagon on the circle half as required in your question. I then computed the polynomial for each of these and the results were distributed in the interval $[3,4]$. I then found two degenerate cases that correspond to the extremities of that interval.
Here's the R code:
store<-c();
jeveux<-c();
for (i in 1:10000) {
    angles<-sort(runif(3,0,pi));
    x<-c(1,cos(angles),-1);
    y<-c(0,sin(angles),0);
    points<-cbind(x,y);
    x<-as.matrix(dist(points));
    a<-x[2,1];
    b<-x[3,2];
    c<-x[4,3];
    d<-x[5,4];
    if (a^2+b^2+c^2+d^2+a*b*c+b*c*d>3.999) {jeveux<-rbind(jeveux,angles);}
    store<-c(store,a^2+b^2+c^2+d^2+a*b*c+b*c*d);
}

Here's the histogram of the results
 
And I illustrate the degenerate cases:
To obtain the value 4, take A=B, C and D=E  clockwise as in the left picture.
To obtain the value 3, take A, B=C and D, E clockwise as in the right picture.

They are indeed degenerate cases, as in the first case we have a triangle and in the second a convex quadrilateral. I think that all non-degenerate cases will have a value for the polynomial that lies strictly between 3 and 4. But I have as of now no proof.
