Actually, the question is settled by reading the definition you provided carefully:
A function $f$ has local maximum value at point $c$ within its domain $D$ if $f(x)\leq f(c)$ for all $x$ in its domain lying in some open interval containing $c$.
I.e., the points $x$ for which the condition must hold are required to both be in the open interval and in $D$.
To see that $(1,1)$ is a local maximum, consider the open interval $(0, 2)$. If $x \in (0, 2)$ and $x$ is also in the domain $[1,\infty)$, then $1 \le x < 2$. Now $g(x) = x^2-4x + 4 = (2 - x)^2$. So $g(1) = (2 - 1)^2 = 1^2 = 1$, but if $x > 1$, then $0 < 2 - x < 1$, so $0 < (2-x)^2 = g(x) < 1$. So for $x$ in the open interval $(0,2)$ and also in the domain $[1,\infty)$, we have that $g(x) \le g(1)$.
Just like $f'(x_0)=0$ doesn't mean $x_0$ is a point of maximum or minimum, $f''(x_0)$ doesn't mean $x_0$ is a point of inflection.
The usual example for the first case is $f(x)=x^3$: $f'(0)=0$, but $0$ is a point of inflection and neither a point of maximum nor a point of minimum.
The condition that $f''(x_0)=0$ when $x_0$ is a point of inflection is only necessary and not sufficient (for points where the second derivative exists).
Your function is essentially the same as $f(x)=x^4$, which obviously has a minimum at $0$.
For “well behaved” functions (more precisely, analytic, but the condition can be relaxed), a point of inflection is where the first derivative changes from increasing to decreasing or conversely: so they're the points where the first derivative has a maximum or minimum.
For $f(x)=x^4$, we have $f'(x)=4x^3$, and this function has neither a maximum nor a minimum at $0$.
When you're looking for the points of inflection, you certainly find the points where the second derivative vanishes. Among them there are the inflection points and you have to check for the sign of the second derivative at either side of the point.
A different method is to look at the lowest $n$ such that $f^{(n)}(x_0)\ne0$: if $n$ is even the point $x_0$ is either a maximum or a minimum; if $n$ is odd the point $x_0$ is a point of inflection (assuming $f''(x_0)=0$ to begin with).
However, this method might not be conclusive. Consider
$$
f(x)=\begin{cases}
0 & x=0 \\
\exp(-1/x^2) & x\ne0
\end{cases}
$$
Then $f^{(n)}(0)=0$ for every $n$; $0$ is obviously a point of minimum.
The function
$$
F(x)=\int_{0}^x f(t)\,dt
$$
has the same property: $F^{(n)}(0)=0$ for all $n$, and $F$ has a point of inflection at $0$.
On the other hand, the function
$$
f(x)=\begin{cases}
0 & x=0 \\
x^4\sin(1/x) & x\ne0
\end{cases}
$$
has $f''(0)=0$, but the second derivative takes positive and negative values in every left and right neighborhood of $0$, so $0$ is not a point of inflection, but it's not a point of maximum or minimum either.
There can be other points of inflection, though: the function $f(x)=\sqrt[3]{x}$ has an inflection at $0$, where it is not differentiable.
Best Answer
For $a$ to be a stationary point, $f'(a)=0$.
The second derivative of the function represents the gradient of the gradient, and therefore can be used to find whether the gradient is increasing or decreasing.
If $f''(a)>0$, then this says the gradient is increasing. It can only "increase" from
When the gradient increases from a negative value to a positive value, it means that it should have been zero at some point in between.
Now, if the gradient goes from negative to positive, then the curve changes its nature from decreasing to increasing. This happens only in the immediate neighborhood of a local minimum, if you think about it.
See what I mean?
Your textbook is a little incomplete. When they say the gradient has "increased", they mean the gradient's sign has changed in the neighborhood of $a$. That is from $a-h$ to $a+h$, where $h=\lim_{x\rightarrow 0, x>0}x$
Image credit: this website