Single Variable Optimisation

Golden section procedure written in fortran by W Morton, 2/94 to 4/01. JavaScript translation by JWP July 01.
Lower bound of x: Upper bound of x:
Enter objective function in x:
Function minimum: at x

The objective function should be typed in the box provided using `x' as the variable.

The expression must use JavaScript syntax which accepts the usual operators except exponentiation (neither `^' nor `**', see below). The usual functions exp, sqrt, sin, cos etc. are available; log is natural log.

To raise to a power use pow(x,n) .