Functional Derivative In Chapter 1 of Lancaster's Quantum Field Theory for the Gifted Amateur, he gives an example of taking the derivative of a functional but doesn't show much work. I was confused how he got the answer.
$$\int g[f(x) + \epsilon \delta(x - x_0)] dx= \int (g[f(x)] + \epsilon \delta(x - x_0) g'[f(x)])dx$$
What rules allow you to do this?
 A: The answer can simply be seen by applying Taylor series:
$$
 g[x] = g[x_0] + g'[x_0] \cdot (x-x_0) + ...
$$
In your case we should take $x_0 = f(x)$ and $x=f(x)+\epsilon \delta(x - x_0)$.
You are maybe wondering why is Lancaster using an equal sign (=) when he only took the first (and zeroth) term in Taylor series? The reason for that is because Lancaster is calculating the functional derivative:
$$ \tag{1}
\frac{1}{\epsilon} \lim_{\epsilon \rightarrow 0} \int \left(
g[f(x) + \epsilon \delta(x-x_0)] - g[f(x)] 
 \right) \mathrm{d}x
$$
and here it is sufficient to take only the first (and zeroth) term of the Taylor series because all the other term will not contribute to the end result anyway because we have $\lim_{\epsilon \rightarrow 0}$. 
The other thing that you may be wondering is, why are we allowed to take Taylor series? Well it turns out that $g[f(x) + \epsilon \delta(x-x_0)]$ is actually defined by the corresponding Taylor series:
$$
g[f(x) + \epsilon \delta(x-x_0)] := g[f(x)] +  \epsilon \delta(x - x_0) g'[f(x)]+...
$$
The reason we particularly like the expression $g[f(x) + \epsilon \delta(x-x_0)]$ is because:


*

*it is compact

*In that form we have very nice analogy between functional derivative and ordinary derivative

A: The best way to think about this is to think about the definition of a derivative. Start with $$g(x + h) \approx g(x) + h\times g'(x).$$ In the limit as $h$ goes to zero, this is the definition of a derivative of a function. Now, replace $x$ with $f(x)$ and replace $h$ with $\epsilon \delta(x-x_0)$. You get: $$ g(f(x + \epsilon \delta(x-x_0)) \approx g(f(x)) + \epsilon \delta(x-x_0)\times g'(f(x)).$$ In calculus of variations, this is known as a 'functional derivative'...in the limit as $\epsilon$ goes to zero.
