Let us consider a function y=f{x} an open interval (a,b).For finding maxima or minima we find critical points where either 
or the function is not continous.Suppose we find 4 critical points i.e. x1 ,x2 ,a and b.
These critical point includes the end points.Now if we get local maxima from x1 and a & local minima from x2 and b.
Now absolute maxima and minima only exits if we get the ponts from x1 or x2 .
No absolute maxima and minimaexists if point is from open interval i.e. a or b.