Mechanics of the second derivative test? I am trying to understand why $f'(x)=0$ and $f''(x)>0 $ together imply a local minimum, and why $f'(x)=0$ and $f''(x)<0$ together imply local maximum.
I am new to calculus and don't know multivariable calculus, so please give the reasoning or proof in terms of single-variable calculus. An intuitive explanation is preferred but a rigorous proof is also fine.
 A: *

*$f'(\alpha)=0$ means that the curve has a horizontal slope at
$\alpha$: as $x$ is increasing, at $\alpha,\,f(x)$'s value is
neither in the midst of increasing nor in the midst of decreasing.
This is what is meant by $\alpha$ being a "stationary" point of $f.$
(This includes the special case where the curve is a horizontal line
all around $\alpha$ instead of merely momentarily stationary.)

*$f''(\alpha)=\frac{\mathrm d}{\mathrm dx}f'(x)\bigg|_{x=\alpha}.$
So, $f''(\alpha)$ being positive means that, as $x$ is increasing,
at $\alpha,\,f$'s gradient is in the midst of increasing.

#1 and #2 occurring in concert must then mean that at $\alpha,$ $f$'s curve's slope is horizontal and҂ turning upwards. Which means local minimum.
The local-maximum case is analogous.
҂$f$'s gradient is in the midst of increasing from negative to positive
A: Think about what it means for a function $f$ if $f(x) = 0$ and $f'(x) > 0$ - the function is increasing, meaning that if we go slightly to the left of $x$ we have values less than $f(x)$, and if we go slightly to the right of $x$ we have values greater than $f(x)$. But then since $f(x) = 0$, that means that we must have negative values on the left and positive values on the right, like in the diagram below:

So then what happens if $f'(x) = 0$ and $f''(x) > 0$? Then we must have that $f'(x)$ is increasing, and so $f'$ is negative to the left of $x$ and positive to the right. But if $f'$ is positive, $f$ must be sloping upwards, and if $f'$ is negative, $f$ must be sloping downwards. So $f$ is going down to the left of $x$, and going up to the right of $x$, meaning that $f(x)$ must be smaller than the values around it, i.e. we have a local minimum.
As you can see in the following image - the green tangent is flat representing $f(x) = 0$, the blue tangent on the left is decreasing representing $f'(x) < 0$, and the orange tangent on the right is increasing representing $f'(x) > 0$.

A: Here are two intuitive reasons which explain why the derivative of single-variable functions is an important concept and mathematical tool. We let $f$ denote a real-valued function on the open interval $(a,b)$.

*

*The derivative is the "instantaneous rate of change" of a function at a point. When one spends a bit of time thinking about the perhaps paradoxical phrase "instantaneous rate of change" they soon become confused. So I like to think of this phrase as capturing the following ideas. If the derivative $f'$ exists and is always positive on $(a,b)$, then $f$ must be strictly increasing. If the derivative $f'$ exists and is always negative on $(a,b)$, then $f$ must be strictly decreasing. If the derivative $f'$ exists and is always zero on $(a,b)$, then $f$ is a constant function.

*The derivative $f'(x)$ is the slope of the tangent line to the graph of $f$ at the point $f(x)$.

Further explanation of these concepts with very helpful illustrations can be found in many online sources, one of which being Paul's Online Math Notes. Using these two concepts, we can arrive at some intuition for the statement you are asking about.
Let $x$ be a point in $(a,b)$. Suppose $f'(x) = 0$. Via point 2., this means that the tangent line to the graph of $f$ at $f(x)$ is horizontal. Drawing some sketches of (continuous, differenitable) functions graphs along with tangent lines, one may convince themselves that the tangent line is horizontal only at the points which are local minimums, maximums, or saddle points (consider $f(x)=x^3$ at $x=0$).
Now we wish to distinguish between mins, maxs, and saddle points using the tool of derivatives. But we know by point 1. that a positive derivative implies a strictly increasing function while a negative derivative implies a strictly decreasing function. Using point 2., one can see that the derivative f' is always strictly decreasing really close to maximums (tangent lines go from positively sloped to horizontal to negatively sloped) and strictly increasing really close to minimums (tangent lines go from negatively sloped to horizontal to positively sloped). Since the second derivative $f''$ is the derivative of $f'$, the fact $f''(x) > 0$ should tell us that $f'$ is strictly increasing near $x$ while $f''(x) < 0$ should tell us that $f'$ is strictly decreasing near $x$. Hence, if $f'(x) = 0$ and $f''(x) < 0$, then $x$ must be an extremum where the slopes are strictly decreasing and so a maximum. If $f'(x) = 0$ and $f''(x) > 0$, then $x$ must be an extremum where the slopes are strictly increasing and so a minimum.
I hope this helps and best of luck with your studies! Also, I know of a reasonably quick/overkill proof using Taylor's theorem, (although Taylor's theorem can be proved using essentially the mean value theorem or Rolle's theorem).

Let $f: (a,b) \to \mathbb{R}$ be a function and $x$ be a point in $(a,b)$. Suppose $f'$ exists in an open interval about $x$ and that $f''(x)$ exists. Furthermore, let $f'(x) = 0$ while $f''(x) > 0$. Fix $0 < \varepsilon < \frac{1}{2}f''(x)$. By Taylor's theorem, there exists $\delta >0$ such that $$|f(x+h)-f(x)-f'(x)h-\frac{1}{2}f''(x)h^2| < \varepsilon |h|^2$$ whenever $|h| < \delta$. So, $$f(x+h)-f(x) \ge f'(x)h+\frac{1}{2}f''(x)h^2-\varepsilon |h|^2 = ( \frac{1}{2}f''(x) -\varepsilon)|h|^2 > 0$$ whenever $0 < |h| < \delta$. Therefore, $f(u) > f(x)$ for all $u$ in $(x-\delta,x+\delta)$ meaning $x$ is a (strict) local minimum of $f$. Replacing $f$ with $-f$ gives the result for maxima.

edit1: geez I'm a slow typer; so I apologize for any ideas that are repeated in my answer when it comes to general intuition.
edit2: added the case of saddle points as suggested by a comment, thank you.
