The strategy is to Taylor-expand the displacement [function](/page/Function) $h(x) := f(x) - x$ about the fixed point $p$. Since $f(p) = p$ and $f'(p) = 1$, both the constant and linear terms of $h$ vanish, so the sign of $h(x)$ near $p$ — and hence the direction of the dynamics — is controlled by the first nonvanishing higher-order [derivative](/page/Derivative). When $f''(p) \neq 0$, the displacement is a definite-sign quadratic in $(x - p)$, producing semi-stability. When $f''(p) = 0$, the displacement is cubic, and its sign alternates across $p$, with the direction determined by $\operatorname{sgn}(f'''(p))$.
**Step 1: Taylor expansion of the displacement.**
Define the displacement $h(x) := f(x) - x$. Then $h(p) = f(p) - p = 0$ and $h'(p) = f'(p) - 1 = 0$, so the Taylor expansion about $p$ takes the form
\begin{align*}
h(x) = f(x) - x = \frac{1}{2} f''(p) (x - p)^2 + \frac{1}{6} f'''(p) (x - p)^3 + O((x - p)^4).
\end{align*}
The dynamics of the iteration $x_{n+1} = f(x_n)$ near $p$ are governed entirely by the sign of $h$: if $h(x) > 0$ then $f(x) > x$ and the orbit moves to the right; if $h(x) < 0$ then $f(x) < x$ and the orbit moves to the left.
**Step 2: Case 1 — semi-stability ($f''(p) \neq 0$).**
When $f''(p) \neq 0$, the leading term of $h$ is the quadratic $\frac{1}{2} f''(p)(x - p)^2$. For $x$ sufficiently close to $p$ (with $x \neq p$), this term dominates and $\operatorname{sgn}(h(x)) = \operatorname{sgn}(f''(p))$ regardless of which side of $p$ the point $x$ lies on.
Suppose $f''(p) > 0$. Then $h(x) > 0$ for all $x \neq p$ in a sufficiently small neighbourhood of $p$, meaning $f(x) > x$. Orbits to the left of $p$ satisfy $x_n < f(x_n) = x_{n+1}$, so they increase monotonically toward $p$. Orbits to the right satisfy $x_n < x_{n+1}$, so they move further to the right and away from $p$. Thus $p$ is attracting from the left and repelling from the right — semi-stable.
The case $f''(p) < 0$ is analogous with directions reversed: $h(x) < 0$ near $p$ forces orbits to decrease, attracting from the right and repelling from the left.
**Step 3: Case 2 — the cubic displacement ($f''(p) = 0$, $f'''(p) \neq 0$).**
When $f''(p) = 0$, the expansion reduces to
\begin{align*}
h(x) = \frac{1}{6} f'''(p)(x - p)^3 + O((x - p)^4).
\end{align*}
The cubic leading term changes sign across $p$: for $x$ near $p$,
\begin{align*}
\operatorname{sgn}(h(x)) = \operatorname{sgn}(f'''(p)) \cdot \operatorname{sgn}(x - p).
\end{align*}
If $f'''(p) < 0$: for $x > p$, $h(x) < 0$ so $f(x) < x$ (orbits decrease toward $p$); for $x < p$, $h(x) > 0$ so $f(x) > x$ (orbits increase toward $p$). Both sides are attracted to $p$, giving asymptotic stability.
If $f'''(p) > 0$: the signs are reversed, so orbits move away from $p$ on both sides, giving instability.