# Calculus of Variation: small variation in functions

I am reading a mathematical physics book, and I am trying to follow along. In the section about functionals ( $J[y] = \int_{x_1}^{x_2} f(x,y,y',\ldots,y^n)$ ), they let $y(x) \rightarrow y(x) + \epsilon \eta(x)$, and are looking at the difference in the functionals from this variation, $J[y+\epsilon \eta] - J[y]$. In one part of a derivation I cannot understand how they did the following:

$$\int_{x_1}^{x_2} \{f(x,y+\epsilon \eta ,y'+\epsilon \eta')-f(x,y,y')\} \, dx = \int_{x_1}^{x_2} \left\{\epsilon \eta \frac{\partial f}{\partial y}+ \epsilon \frac{d \eta}{d x} \frac{\partial f}{\partial y'} + O(\epsilon^2)\right\} \, dx$$

Supposing $f=f(x,y,y')$, by Taylor's theorem, we have that
$$f(x,y+\epsilon \eta,y' + \epsilon \eta') = f(x,y,y') + \epsilon \eta \frac{\partial f}{\partial y}+ \epsilon \eta' \frac{\partial f}{\partial y'} + O(\epsilon^2)$$
• Thanks for your answer, and that seems reasonable. If I am understanding this correctly, only taking the linear approximation of the Taylor expansion into account, we will approximation $f(x,y+\epsilon \eta, y'+\epsilon \eta')$ around the points x, y and y'. So $f(x,y+\epsilon \eta, \epsilon \eta')$ is equal to f(x,y,y') at x,y,y' plus the correction terms $\partial f/\partial y(y+\epsilon \eta - y) + \partial f/\partial y'(y' + \epsilon \eta' - y')$. I was curious why there is no df/dx in the expansion, but I suppose that is because we did no variation in the x term! Commented Sep 4, 2013 at 16:43