Let $V$ and $W$ be normed vector spaces, and $U \subset V$ be an open subset of $V .$ A function $F: U \rightarrow W$ is called Fréchet differentiable at $f \in U$ if there exists a bounded linear operator $A_f: V \rightarrow W$ such that $$ \lim _{\|h\| \rightarrow 0} \frac{\|F(f+h)-F(f)-A_f (h)\|_{W}}{\|h\|_{V}}=0 $$
That is the definition we find in most textbooks. First question: is that definition equivalent to saying
$$A_f (g)=\lim _{\|h\| \rightarrow 0} \frac{\|F(f+gh)-F(f)\|_{W}}{\|h\|_{V}} ?$$
I am interested in the case $V=U=L^2(\mathbb R)$, $W=\mathbb R$, $F(f)=\int_\mathbb R |f(x)|^2 dx$. $F$ should be differentiable as it is a norm induced by a scalar product in a Hilbert space. We have
$$ \lim _{\|h\| \rightarrow 0} \frac{|\int_\mathbb R |f(x)+h(x)|^2 - |f(x)|^2 dx-A_f (h)|}{\|h\|_{L^2}}=0 $$
What should $A_f$ be ? I would like the answer to include a heuristic to find $A_f$, so I could compute other Fréchet derivatives in $L^2$, for example the one of $F(f)=\int_\mathbb R |f(x)|^4 dx$.
If one consider real valued functions, i.e. $L_2(X;\mathbb{R})$ with $\langle f,g\rangle =\int fg\,d\mu$
Then
$$F(f+h)=\langle f+h,f+h\rangle = \langle f,f\rangle + 2\langle f,h\rangle +\langle h,h\rangle=F(f)+2\langle f,h\rangle + F(h) $$
Cearly, $h\mapsto \langle f,h\rangle$ is linear, and $\frac{F(h)}{\|h\|_2}\xrightarrow{\|h\|_2\rightarrow0}0$. From this, it follows that $$F'(f)h=2\langle f,h\rangle$$