Lesson 6 of 18
Critical Points
Critical Points
A critical point is where or is undefined. Critical points are candidates for local maxima and minima.
Finding Critical Points Numerically
We use bisection on : if and (or vice versa), by the Intermediate Value Theorem there must be a zero of between and .
Classifying Critical Points
Once we find where :
| Second derivative | Classification |
|---|---|
| Local minimum (concave up) | |
| Local maximum (concave down) | |
| Inconclusive (use first derivative test) |
Example
For :
- →
- → local minimum
- is the minimum value
Global Extrema
On a closed interval , the global max/min occurs either at a critical point or at an endpoint. Evaluate at all critical points and both endpoints, take the largest/smallest.
Your Task
Implement double critical_point(double (*f)(double), double a, double b, int n, double h) that uses bisection on to find a critical point in . Run bisection steps; is the step for numerical differentiation.
TCC compiler loading...
Loading...
Click "Run" to execute your code.