To find the local maximum or minimum of a function, first find its critical points by setting the first derivative to zero. Then, use the second derivative test: if $f''(x)<0$ at a critical point, it's a local maximum; if $f''(x)>0$, it's a local minimum.