Find the function that minimises the following integral How can I find the function $f(t)$, $t\geq0$ continuous and everywhere differentiable that minimises the following integral
$$L = \int_0^\infty f(t)^2 + f'(t)^2dt$$
such that $f(0)=x$.
Intuitively I am asking what is the function $f$ that starts at $x$ and wants to approach $0$ the fastest but keeping the derivative smaller. My intuition tells me that somehow the function $f$ should be a decreasing exponential. But how to prove it? how does one tackle this problem?
Here is what I tried to do:
I tried to think of a similar discrete problem: find the sequence $h_n$ that minimises
$$L = \sum_{i=1}^\infty h_i^2 + (h_{i-1}-h_i)^2$$ such that $h_0=x$
Some observations:
If $x=0$ then trivially $h_i=0$ $\forall i$
On the other hand, if $h_i=0$ $\forall i$, then $L = x^2$. (here the function would suddenly drop to $0$)
If instead we had gradually decreased it with one step: $h_1=\frac{x}{2}$ and $0$ otherwise, then $L=\frac{x^2}{4}+\frac{x^2}{4}+\frac{x^2}{4}=\frac{3x^2}{4}$ which is lower than the previous example, showing that it is better to decrease it gradually...
Then my intuition tells me that if $h_i = \alpha h_{i - 1}$ for $\alpha<1$, then $h_i=x\alpha^i$ and $h_{i-1}-h_i = x\alpha^{i-1}(1-\alpha)$.
For this case, this means that $L = \sum_{i=1}^\infty (x\alpha^i)^2 + (x\alpha^{i-1}(1-\alpha))^2=x^2\sum_{i=1}^\infty (\alpha^2)^i+x^2(1-\alpha)^2\sum_{i=1}^\infty (\alpha^2)^{i-1}$
$$L=x^2\frac{\alpha^2}{1-\alpha^2}+x^2(1-\alpha)^2\frac{1}{1-\alpha^2}=\frac{x^2}{1-\alpha^2}(2\alpha^2-2\alpha + 1)$$
Now if we try to find $\alpha$ that minimises this expression we can take its derivative
$\frac{dL}{d\alpha}=x^2\frac{(4\alpha-2)(1-\alpha^2)-(2\alpha^2-2\alpha + 1)(-2\alpha)}{(1-\alpha^2)^2}=0 \Leftrightarrow (4\alpha-2)(1-\alpha^2)-(2\alpha^2-2\alpha + 1)(-2\alpha)=0 \Leftrightarrow 4\alpha-4\alpha^3-2+2\alpha^2+4\alpha^3-4\alpha^2+2\alpha=0\Leftrightarrow -2\alpha^2+6\alpha-2=0$
$\alpha=1+\frac{1-\sqrt{5}}{2}$ which seems to be related to the golden ratio
 A: This is the sort of problem that the calculus of variations was invented to solve.  According to that formalism, $f$ will extremize the functional (in the sense that small "perturbations" of $f$ will not change the value of $L$) if it satisfies the Euler-Lagrange equation
$$
\frac{d}{dt} \left( \frac{\partial Q}{\partial f'} \right) = \frac{\partial Q}{\partial f},
$$
where $Q$ is defined to be the integrand $(f')^2 + f^2$.
Doing these derivatives, we obtain
$$
f'' = f.
$$
In other words, $f = A e^t + B e^{-t}$ for some values of $A$ and $B$.
To carry this further, we note that if $A \neq 0$, $L \to \infty$, and this cannot be a minimum of $L$.  So we must have $f(t) = B e^{-t}$.  Requiring that $f(0) = x$ then sets $B=x$, with the result that
$$
f(t) = x e^{-t}.
$$
This function will be the minimum if a minimum exists;  and the value of $L$ in this case can be shown to be $L = x^2$.
A: We assume that $x>0$. The other case is similar.
Claim 1: It suffices to assume that $f(t) <x$ for all $t>0$.
Proof of claim: Let be $f$ be a continuously differentiable function so that $f(t_1) >x$ for some $t_1 >0$. We show that this $f$ cannot attain the minimum value.
Since the integral $\int_0^\infty f^2$ has to be finite, there must be $t_2 > t_1$ so that $f(t_2) <x$. By continuity, there is $t_0 \in (t_1, t_2)$ so that $f(t_0) = x$. Then $g(t) = f(t+ t_0)$ satisfies $g(0) = x$ and
$$\int_0^\infty (g^2 + g'^2 ) = \int_{t_0}^\infty (f^2 + f'^2) < \int_{0}^\infty (f^2 + f'^2).$$
So $f$ cannot attain the minimum.
Claim 2: it suffices to assume $f(t) > -x$ for all $t>0$
Proof of claim: similar as in the proof of claim 1: find $t_0$ so that $f(t_0) = -x$ and consider $g(x) = -f(t+t_0)$.
In particular, it suffices to consider only those $f$ that is bounded.
Let $h = f - xe^{-t}$. Then $h(0) = 0$. Also
\begin{align}
\int_0^\infty f^2 + (f')^2 &= \int_0^\infty (h^2 +2xh e^{-t} + x^2 e^{-2t}) + ((h')^2 -2xh' e^{-t} + x^2 e^{-2t})\\
&= \int_0^\infty (h^2 + (h')^2) + 2x \int_0^\infty (h-h') e^{-t} + 2x^2\int_0^\infty e^{-2t} \\
&= \int_0^\infty (h^2 + (h')^2) - 2x \int_0^\infty (he^{-t})'  + x^2.\\ 
&=x^2 + 2xhe^{-t}\bigg|_{t=0}^\infty + \int_0^\infty (h^2 + (h')^2), \\
&=x^2 + \int_0^\infty (h^2 + (h')^2),
\end{align}
where in the last equality we used $h(0) = 0$ and $he^{-t}$ tends to $0$ as $t\to \infty$ since $f$ is bounded. Thus the problem is transformed into this:

Find the minimum of
$$x^2 + \int_0^\infty (h^2 + h'^2)$$
along all continuously differentiable function $h$ with $h(0) = 0$.

Since for this question it is obvious that $h(t) = 0$ is the (global) minimum, $f = xe^{-t}$ is the global minimum for your problem.
