Is this Frechet derivative correct? Problem statement:
Let $u \in L^2[0, 1]$ and $$J(u) = \int_0^1 u(t) u(1-t)dt$$ Find $J'(u)$ and $J''(u)$.
Attempted solution:
First derivative
There is a hint that the derivative looks like this: $$J(u + h) - J(u) = \langle J'(u), h\rangle + o(\|h\|)$$ I do not really understand why, since this is not the definition of the Frechet derivative. However:
$$
\begin{split}
J(u + h) - J(u) &= \int_0^1\left(u\left(t\right) + h\left(t\right)\right)\left(u\left(1 - t\right) + h\left(1 - t\right)\right)dt - \int_0^1u\left(t\right)u\left(1 - t\right)dt \\
&=\int_0^1 h(t)(u(1 - t) + h(1 - t))dt + \int_0^1u(t) h(1 - t)dt \\
&= \int_0^1h(t) h(1 - t)dt + \int_0^1h(t)u(1 - t)dt + \int_0^1u(t)h(1 - t)dt 
\end{split}
$$ 
Where it can be shown that the last two integrals are actually equal. Which results in:
$$J(u + h) - J(u) = \int_0^1 h(t) h(1 - t)dt + 2 \int_0^1 u(1 - t) h(t) dt$$
If we now recall the definition of scalar product in $L^2[0, 1]$: $\langle f, g \rangle = \int_0^1 f(t) g(t) dt$ then we can rewrite our result as:
$$J(u + h) - J(u) = \langle 2 u(1 - t), h(t)\rangle + \langle h(t), h(1 - t)\rangle$$
Let's now show $\langle h(t), h(1 - t)\rangle = o(\|h\|)$:
$$\lim_{h \to 0} \frac{|\langle h(t), h(1 - t)\rangle|}{\|h(t)\|} \le \lim_{h \to 0} \frac{\|h(t)\| \|h(1 - t)\|}{\|h(t)\|} = \lim_{h \to 0} \|h(1 - t)\| = 0$$ Where the inequality is the Cauchy-Bunyakovsky-Schwarz inequality.
Second derivative
There are no hints this time but here is the definition from class (B is a matrix):
$$ J'(u + p) - J'(u) = Bp + o(\|p\|)$$
As far as I understand, $J''(u) = B$ at point p. Which leaves me with:
$$J'(u + p) - J'(u) = 2(u(1 - t) + p(1 - t)) - 2 u(1 - t) = 2p(1 - t) = o(\|p\|)$$ Which means $J''(u) = B = 0$.
My current answer to the problem:


*

*$J'(u) = 2 u(1 - t)$

*$J''(u) = 0$


My questions:


*

*Is my answer correct, are there any mistakes?

*Why does the first hint look like this? There are no scalar products in the definition of a Frechet derivative...

 A: The first derivative looks good, but I believe that the second is wrong. The first derivative is the linear map
$$
DJ(u) \colon h \mapsto 2 \int_0^1 u(t)h(1-t)\, dt.
$$
To find the second derivative, you must differentiate this with respect to $u$: if $k \in L^2([0,1])$, then
$$
D^2J(u)(h,k) = 2 \int_0^1 k(t)h(1-t)\, dt.
$$
The second derivative is independent of the point $u$, but it is far from being zero!
It seems to me that you don't master the definition of Fréchet derivative, yet. In particular, you should know that there is an isometry between the space of continuous linear functionals on a Hilbert space and the Hilbert space itself (Riesz theorem), and this allows you to consider the first derivative as an element of $L^2([0,1])$.
But, more important, you should study the definition of the second derivative, which is more involved and more technical: it can always be considered to be a continuous bilinear map on the (Hilbert) space, but it is often useless to believe it is a matrix (unless you work in a finite-dimensional setting).
