Smooth ride with the subway (Optimization with Lagrange multiplier) I have following problem and im struggeling with it.
I need to find be a twice differentiable function $ h:[0,1] \rightarrow \mathbb{R}$
which fullfills the conditions:


*

*$h(0)=0$ , $h(1)=1$ (the position of the subway train)

*$h'(0)=h'(1)=0$ (the velocity)

*$\vert h''(t)\vert \leq c\in \mathbb{R}^+$ 


Such that the cost function $U(h):=\int_{0}^{1}(h''(t))^2 dt$ is minimal.(Also: for which c exists a solution at all?)
I tried with the Lagrange-Ansatz, but i fail already there, as i am not sure how to express the second condition in the lagrange equation.(since the function is "only" twice differentiable so the i  cannot express the first derivative as an integral with the second derivative, can I?), what i got so far:
$\Lambda(h,\lambda_1,\lambda_2)=U(h)+\lambda_1(\int_{0}^1h'(t)dt-1)+ \lambda_2(...)$.
Im glad for every shred of help. Thanks in advance.
 A: Put $f(t)=h'(t)$. Then you want to minimize the functional 
$$\int_0^1 L(t,f(t),f'(t))\,dt\enspace\enspace (1)$$
where $L(t,f,f')=(f')^2$. The corresponding Euler-Lagrange equation is:
$$\frac{\partial L}{\partial f}-\frac{d}{dt}\frac{\partial L}{\partial f'}=0$$
that is:
$$\frac{d}{dt}(2f')=0$$
which implies $f''=0$. It follows that $f$ is a linear function, say, $f(t)=at+b$. Since $f=h'$, we deduce that
$$h(t)=\frac{1}{2}at^2+bt+d$$
Correction
Unfortunately, there does not exist a polynomial of order $2$ satisfying the initial conditions. Since the Euler-Lagrance equation must be satisfied by a stationary function for the functional $(1)$, and since a twice-differentiable function has second derivative identically zero if and only if it is linear, the argument above effectively proves that the general solution must be a polynomial of degree $2$. It follows that your problem has no solution with the initial conditions given.
A: If you allow discontinuities of $h''$ you can argue as follows: By symmetry it is sufficient to solve the problem on $\bigl[0,{1\over2}\bigr]$ with conditions
$$h(0)=h'(0)=0,\quad h\left({1\over2}\right)={1\over2},\quad 0\leq a(t):=h''(t)\leq c\ .$$
One has
$$h'(t)=\int_0^t a(\tau)\>d\tau,\quad h(t)=\int_0^ta(\tau)(t-\tau)\>d\tau\ ,$$
so that we have to minimize $\int_0^{1/2}a^2(t)\>dt$ under the conditions
$$0\leq a(t)\leq c,\quad \int_0^{1/2}a(t)\left({1\over2}-t\right)\>dt={1\over2}\ .$$
This easily implies $c\geq4$ as a necessary condition, whereby in the case $c=4$ the train has to be maximally accelerated during the whole interval $\bigl[0,{1\over2}\bigr]$.
Forgetting about the condition $a(t)\leq c$ for the moment we have to minimize the $L^2$-norm of $a$ under the condition $\langle a,u\rangle={1\over2}$ for a given vector $u$. The minimum is attained for $a_*=\lambda u$ for a certain scalar $\lambda$. Calculation gives
$$a_*(t)=12\left({1\over2}-t\right)\ ,\tag{1}$$
so that $a_*(0)=6$. We therefore can say the following: If $c\geq6$ then $(1)$ is the solution to the problem for the interval $\bigl[0,{1\over2}\bigr]$, and a suitable reflection will take care of the interval $\bigl[{1\over2},1\bigr]$. Since $a_*\bigl({1\over2}\bigr)=0$ the extended $a_*$ will even be continuous on $[0,1]$.
If $4\leq c<6$ the condition $a(t)\leq c$ really enters the picture, and I don't know how to deal with that. 
A: The post from Christian Blatter and the methods for finding the catenoid-equation gave some new ideas to tackle the problem:
First:
$$h(1)-h(0)=\int\limits_0^1h'(t)dt=\int\limits_0^1\int\limits_0^t h'(s) ds\ dt = \int\limits_0^1\int\limits_s^1h'(s)dt\ ds=\int\limits_0^1h'(s)(1-s)ds=1$$
Second (Ignoring that $h'(t)$ might not be continously differentiable):
$$h'(1)-h'(0)=\int\limits_0^1 h''(t)dt=\int\limits_0^1\int\limits_0^th''(s)ds \ dt=\int\limits_0^1\int\limits_s^1h''(s)dt\ ds=\int\limits_0^1h''(s)(1-s)ds=0$$
Henze our Langrange equation looks like this:
$$\Lambda(h'',h',\lambda_1,\lambda_2)=\int\limits_0^1(h''(s))^2ds+\lambda_1(\int\limits_0^1h'(s)(1-s)ds-1)+\lambda_2(\int\limits_0^1h''(s)(1-s)ds)$$
and therefore:
$$\frac{\partial}{\partial s}\frac{\partial \Lambda}{\partial h''}-\frac{\partial \Lambda}{\partial h'}=0 \Leftrightarrow 2 \frac{d^3 h}{ds^3}-\lambda_1-\lambda_2(1-s)=0 \Leftrightarrow \frac{d^3 h}{ds^3}=\frac{1}{2}(\lambda_1+\lambda_2(1-s))$$
Integration gives us:
$$h(x)=\frac{-\lambda_2}{48}x^4+\frac{(\lambda_1-\lambda_2)}{12}x^3+\frac{c_1}{2}x^2+c_2x+c_3; \ c_i\in \mathbb{R}$$
With the initial conditions one gets:


*

*$c_2=c_3=0$

*$\lambda_1=\frac{-1}{2}(48+\lambda_2)$

*$c_1=\frac{-1}{12}(3\lambda_1+2\lambda_2)=6-\frac{\lambda_2}{24}$


This delivers:
$$h_{\lambda_2}(x)=\frac{-\lambda_2}{48}x^4+\frac{1}{12}x^3(\lambda_2-\frac{1}{2}(48+\lambda_2))+\frac{1}{24}x^2(\frac{3}{2}(48+\lambda_2)-2\lambda_2)$$
So i got an equation which still contains a unknown variable $\lambda_2$.
Calculating the integral $\int_{0}^{1} (h_{\lambda_2}'')^2 dx=12+\frac{\lambda_2^2}{2880}$. Now we can differentiate for $\lambda_2$ and set it equal to $0$ which gives us:
$\frac{\lambda_2}{1440}=0 \Leftrightarrow \lambda_2=0$
Hence: $h(t)=3 t^2 - 2 t^3$
(and therefore a Solution exists only if $c\geq 6$ otherwise the train will overshoot or won't arrive at all)
I welcome any feedback and i thank uniquesolution and Christian Blatter for their answers. 
