# Is this Taylor approximation allowed for solving this functional? (first variation)

Here is an exercise in the calculus of variations:

Exercise 1.5 Consider the space $$V=\mathcal C^0([0,1],\Bbb R)$$, let $$g:\Bbb R\to\Bbb R$$ be a $$\mathcal C^1$$ function, and define the functional $$J$$ on $$V$$ by $$J(y)=\int^1_0 g(y(x))\,\Bbb dx$$. Show that its first variation exists and is given by the formula $$\delta J|_y (\eta) = \int^1_0 g' (y(x)) \eta(x) \,\Bbb dx$$.

I think I can solve it as follows: use the Taylor approximation of $$g\left(y(x)+\alpha \eta (x)\right)$$ to get: $$g\left(y(x)+\alpha \eta (x)\right)-g(y(x))=g'(y(x))\cdot \alpha \eta(x) +O(\alpha^2\eta(x)^2)$$

Then the first variation of $$J$$ becomes: $$\lim_{\alpha\to 0}\left(\frac{\displaystyle \int_0^1 \left( \alpha g'(y(x))\eta(x)+O(\alpha^2\eta^2(x))\right)\,\Bbb dx} \alpha \right)= \lim_{\alpha\to 0}\left({\int_0^1 \left( g'(y(x))\eta(x)+O(\alpha\eta^2(x))\right)\,\Bbb dx} \right)=\int_0^1 g'(y(x))\eta(x)\,\Bbb dx$$

The answer is correct, but I don’t feel entirely comfortable with the derivation. Specifically, it seems to me that I am assuming that $$g(x)$$ is analytic, even though this is not an assumption, since otherwise we cannot assume that it is equal to its Taylor series.

So is my use of this Taylor expansion correct for non-analytic $$g(x)$$, and if so why? otherwise, how would one prove the result for non-analytic $$g(x)$$?

• A continuously-differentiable function $g$ needn't have error term $O(\alpha^{2} \eta(x)^{2})$, but it does have an error term $o(\alpha\eta(x))$, which is enough for your purposes. Commented May 21, 2017 at 12:52
• What is the difference between $O(x)$ and $o(x)$? (i.e. lower- vs upper-case "o")? do those symbols $O$, and $o$ have different names? then I can look them up. Commented May 21, 2017 at 13:43
• They're often called big-oh and little-oh notation. :) Little-oh means "vanishingly small compared to": To say the error term is $o(\alpha\eta(x))$ means$$\lim_{\alpha \to 0} \frac{g(y(x) + \alpha\eta(x)) - g(y(x)) - g'(y(x))\cdot\alpha\eta(x)}{\alpha} = 0.$$ Commented May 21, 2017 at 13:49
• Thank you. I have been studying the definitions of little-oh and big-oh since yesterday. A follow up question: Where should I look in order to understand why a $C^1$ function has an error term $o(\alpha \eta(x))$? Could you give me the name of a concept/theory/something, so that if I study that, I understand why it is the case? Commented May 22, 2017 at 10:45

If $g$ is continuously-differentiable on some interval containing a point $x_{0}$, the fundamental theorem of calculus gives \begin{align*} g(x_{0} + \alpha) &= g(x_{0}) + \int_{x_{0}}^{x_{0}+\alpha} g'(t)\, dt \\ &= g(x_{0}) + \int_{0}^{\alpha} g'(x_{0} + t)\, dt \\ &= g(x_{0}) + \int_{0}^{\alpha} [g'(x_{0}) + \underbrace{g'(x_{0} + t) - g'(x_{0})}_{o(1)}]\, dt \\ &= g(x_{0}) + g'(x_{0})\alpha + o(\alpha) \end{align*} for $|\alpha|$ small.
• I don't understand the last step. Why can we conclude from the fact that $g'(x_0+t)-g'(x_0)=o(1)$, i.e. from the fact that $\lim_{t\to 0} \left |\frac{g'(x_0+t)-g'(x_0)}{1} \right | =0$, that this means $\int_0^\alpha [g'(x_0+t)-g'(x_0)]dt =o(\alpha)$? Commented May 22, 2017 at 18:25
• If an integrand is bounded in absolute value by $m$, its integral over an interval of length $|\alpha|$ is bounded by $m|\alpha|$. :) That is, we're using both the smallness of the integrand and the shortness of the interval. Commented May 22, 2017 at 18:58