I'm trying to derive the Taylor formula:
$$f(x+p) = f(x) + \nabla f(x+tp)^Tp$$
For that I think tha I just need to use the formula for one variable taylor expansion and follow like here: https://math.stackexchange.com/a/222217/166180. This answer kinda explains the formula I need but for an infinite expansion. I need a finite expansion which guarantees there's a $t$ in which the expansion is exact.
I couldn't find a specific taylor theorem like this, so I'm trying to derive this forula and I think it has to do with the mean value theorem:
$$f'(c) = \frac{f(x)-f(a)}{x-a}$$
for some $c\in(a,x)$
so $f'(c)x-f'(c)a = f(x)-f(a) \implies f(x) = f(a) + f'(c)x -f'(c)a$
It kinda looks like something I want.
UPDATE:
Take $a=0$ to get
$f(x) = f(0) + f'(c)x$
Call $f$ as $\Phi$ to get:
$$(1) = \Phi(t) = \Phi(0) + \Phi'(c)t$$
for some $c\in(0,t)$
If we take $\Phi(t) = \phi(x + pt)$ so
$$\Phi'(c) = \lim_{a\to c}\frac{\phi(x+ct)-\phi(x+at)}{c-a} = \ ?$$
I need $\Phi'(c)$ to finish $(1)$ by writing everything in terms of $\phi$ and hopefully achieve the formula with the gradient.
PS: how would I achieve the second order expansion
$$f(x+p) = f(x) + \nabla f(x)^Tp + \frac{1}{2}p^T\nabla^2f(x+tp)p$$
?
I can't think of a second order version of the mean value theorem.