Demo on graphing

Graphing problem with a polynomial of degree 8

f[x_] := x^8 - 2 x^7 + 2 x^5 -  3 x^4 + 2 x^2 + 5

f'[x]
NSolve[f'[x] ==0, x]

We observe that there are 5 real roots of f'[x]  (i.e.  5 real numbers such that f'[x]  = 0, at x approximately
-.915014 = α,  -.5229 := β,   0,  .7126 := γ,  and  1.5787 := δ.  

f'[x] is never zero on the intervals (-∞, α),   (α, β),  (β, 0),  (0, γ)   and (γ, δ), and (δ, ∞), so on each of these six intervals, f'[x] is either always positive or always negative.   We could just evaluate f'[x] for one value of x in each interval to find the sign of f'[x] on each interval:

f'[-1]
f'[-.7]
f'[-.3]
f'[.5]
f'[1]
f'[2]

We conclude that f'[x] is  neg, pos, neg, pos, neg, pos  on the six  successive intervals  and so f alternates between decreasing and increasing on    on these successive intervals.  Thus  α  is a relative min,  β a relative max,  0  a relative min, γ a relative max, and δ a relative min  

Evaluate the  the function at these five points:

f[x]/.x->-0.9160143005183498`
f[x]/.x->-0.5228997947865586`
f[0]
f[x]/.x->0.712600425800924`
f[x]/. x->1.578700229180031`

Plot[f[x], {x, -1.5, 2}]

f''[x]
NSolve[f''[x] == 0, x]

Note that f''[x] has four real roots.  Each one is between two successive roots of f'[x].  This is exactly as we would expect, because between two successive roots of f'[x],   f'[x]  must have a relative max or min, and here the derivative of f'[x] is zero.  Call the 4 roots of f''[x]   a, b, c, d  respectively.  

We can see from this that all the interesting behavior of the graph of  y = f[x]  happens on the interval
[-1.5,  2],  and we have already plotted the graph on this interval.

We can read off the graph  that f''[x] is positive and the graph is concave up to the left of a = -.78017;
that f''[x] is negative and the graph is concave down on the interval  (a, b),  where b = -.297326,  and so forth.

Each of the points a, b, c, d is the x coordinate of a point of inflection.