1
$\begingroup$

Assuming that:

  1. $f'(x)$ tells me how far away $x$ is from the maxima; as $x$ approaches maxima then $f'(x)$ approaches $0$.

  2. $f''(x)$ tells me how fast $x$ is approaching the maxima; the more negative the second derivative is the faster I'm approaching the maxima.

Can I make a "smart" guess on when, at what $x$, it's likely to reach maxima?

$\endgroup$
0

1 Answer 1

2
$\begingroup$

Suppose that you made the computations at $x=a$. So, using Taylor $$f(x)=f(a)+(x-a) f'(a)+\frac{1}{2} (x-a)^2 f''(a)+O\left((x-a)^3\right)$$ Ignoring higher order terms, then $$f(x)\approx f(a)+(x-a) f'(a)+\frac{1}{2} (x-a)^2 f''(a)$$ So, since you want the extremum, $$f'(x)\approx f'(a)+ (x-a) f''(a)=0$$ which gives $$x_*=a-\frac{f'(a)}{f''(a)}\qquad , \qquad f(x_*)=f(a)-\frac{f'(a)^2}{2 f''(a)}$$ For sure, $a$ must not be too far away.

For illustration purposed, let us consider function $f(x)=x^\pi-x^e$ and assume $a=1$. This would give $$f(a)=0\qquad , \qquad f'(a)=\pi-e\qquad , \qquad f''(a)=(\pi -1) \pi -(e-1) e$$ then $$x_*=1-\frac{1}{e+\pi-1 }\approx 0.794233$$ while the exact maximum takes place at $$x=e^{-\frac{\log (\pi )-1}{\pi -e}}\approx 0.710419$$

Let us repeat the process using $a=0.794233$; this will lead to $x_*=0.721358$.

$\endgroup$
2
  • $\begingroup$ This is, incidentally, applying Newton's method to find the root of $f'$. $\endgroup$ Aug 1, 2016 at 3:29
  • $\begingroup$ @WillieWong. It is exactly that ! Cheers :-) $\endgroup$ Aug 1, 2016 at 3:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .