
-----------------------------------
randint
Fri Dec 23, 2011 7:58 pm

Local Minimum and Local Maximum of A Cubic Function v.3
-----------------------------------
This is the completely new, "fixed" version of the program to find local minimum and maximum of a cubic function. It can accurately calculate, using the rules of calculus, the local minimum and maximum (if they exist).

import java.io.*;
import java.text.*;
public class localmaxmin
{
    public static void main (String args
Method used to find the local minimum/maximum of any polynomial function:
1. Find the derivative
2. Find the roots (x-intercepts) of this derivative
3. Substitute the roots into the original function, these are local minima and maxima
4. Find the second derivative
5. Substitute the roots into the second derivative, if the answer is positive, it is a minimum, if it's negative, it's a maximum, if it is 0, it is a point of inflection (curve turns from up to down or vice versa.
