Let the function be $f(x)$ such that it is monotonic and continuous function
It has maximum area between $x=0$ and $x=1$
$f'(x)$ = $f(x)(1-f(x))$
$f''(0.5) =0$ thus, gradient is maximum at 0.5.
We are looking for which is increases linearly with $x$ after $f(x)>=1$ , decreases linearly with $x$ when $f(x) <= 0$.
We are looking to make small changes in Sigmoid function to find maxima and minima using Euler–Lagrange equation of the calculus of variations.
Is there a Lagrangian through which we can arrive to sigmoid or is it just some heuristic?
Notice that we can write:
$$y'=y-y^2 \Rightarrow \frac{dy}{dx}=y-y^2 \Rightarrow \frac{1}{y-y^2}dy=dx$$
Integrating both sides:
$$\int \frac{1}{y-y^2} dy=\int 1 \ dx $$
The first integral is pretty easy(the second trivial):
$$\int \frac{1}{y-y^2} dy=\int \frac{1}{y} + \frac{1}{1-y} dy=\ln(y)-\ln(1-y)+c=\ln\left(\frac{y}{1-y}\right)+c$$
So:
$$\ln\left(\frac{y}{1-y}\right)=x+c$$
$$\frac{y}{1-y}=e^{x+c}$$ $$y=e^{x+c}-ye^{x+c}$$ $$y=\frac{e^{x+c}}{1+e^{x+c}}$$
That can be rewritten as:
$$y=\frac{e^{x}}{c+e^{x}} \ \ \ \ c>0$$
Let's impose the condition $$f''(\frac 12)=0$$:
$$y''=\frac{c e^x (c-e^x)}{(c+e^x)^3}$$
$$\frac{c e^{\frac 12} (c-e^{\frac 12})}{(c+e^{\frac 12})^3}=0$$
$$c=0 \vee c=\sqrt{e} $$
Since $c>0$ the only solution is the second one:
$$y=\frac{e^x}{e^x+\sqrt{e}}$$
:)