The basic of functional derivative I've just started to learn mathematical physics, and I read Stone and Goldbart's Mathematics for Physics. But right at the beginning when they introduce the functional derivative, I couldn't understand their explanation:

1.2.1. The functional derivative:
We restrict ourselves to expressions of the form
$$J[y] = \int_{x_1}^{x_2} f[ \, x, y, y',y'',...y^{(n)} ] \, dx $$
Consider a functional $J=\int f dx$ in which f depends only on $x, y$ and $y'$. Make a change $y(x) \rightarrow y(x) + \epsilon \eta (x)$, where $\epsilon$ is a (small) $x$-independent constant. The resultant change in J is:
$$\begin{align} J[y+\epsilon \eta]-J[y] &=\int_{x_1}^{x_2}\{f(x,y+\epsilon \eta,y'+\epsilon \eta')-f(x,y,y')\}dx \\ &= \int_{x_1}^{x_2} \{\epsilon \eta\frac{\partial f}{\partial y}+\epsilon\frac{d\eta}{dx}\frac{\partial f}{\partial y'}+O(\epsilon^2)\}\\ &= ......(\text{this part I understand})\end{align} $$

I can't really wrap my head around this. What is that $\eta(x)$ that suddenly showed up? How did they manage from the first line to the second line in the above expression? And why is there a big-O at the end? (If you don't have the book you can actually find on page 16 right here, the next part is just an integration by part). I'm honestly clueless.
It'd be awesome if someone can explain this to me please?
 A: $\eta(x)$ is some random well-behaved function you add to $y$ (it is the "variation").
Now, for a single-variable function, you have (Taylor series)
$$f(x+x_0) \simeq f(x) + x_0  \partial_x f(x_0)$$
For a function of three variables, we have
$$f(x+x_0,y+y_0,z+z_0) \simeq f(x,y,z)+x_0 \partial_xf(x_0,y_0,z_0)+y_0 \partial_yf(x_0,y_0,z_0)+z_0 \partial_zf(x_0,y_0,z_0)$$
Applying this result to your integrand, you obtain
$$f(x,y+\epsilon \eta, y'+\epsilon \eta') \simeq f(x,y,y')+\epsilon \eta \ \partial_y f (x,y,y')+ \epsilon \eta' \ \partial_{y'}f(x,y,y')$$
The other terms in the expansion contain multiplicative factors $\epsilon^2,\epsilon^3,\epsilon^4 \dots$, so we just write
$$f(x,y+\epsilon \eta, y'+\epsilon \eta') = f(x,y,y')+\epsilon \eta \ \partial_y f (x,y,y')+ \epsilon \eta' \ \partial_{y'}f(x,y,y')+O(\epsilon^2)$$
meaning that there is an additional part containin terms $t_k$ every one of which satisfies
$$\lim_{\epsilon \to 0} \left| \frac{t_k}{\epsilon^2} \right| < \infty$$
Plugging this result in the integral, you obtain the final result.
