test_min
test_min,
an Octave code which
defines problems involving the minimization
of a scalar function of a scalar argument.
TEST_MIN can be useful for testing algorithms that
attempt to minimize a scalar function of a scalar argument.
Each problem has an index number, and there are a corresponding
set of routines, with names beginning with the index number, to:
-
evaluate f(x);
-
evaluate f'(x);
-
evaluate f"(x);
-
return the title of the problem;
-
return a starting point;
-
return a starting search interval;
-
return the exact solution;
There is also a "generic" problem interface, whose routines all
begin with "P00". This allows the user to call all possible
problems in a single simple loop, by passing the desired index
number through the generic interface.
The functions can be invoked by an index number, and include:
-
f(x) = ( x - 2 )^2 + 1;
a PNG image;
-
f(x) = x^2 + exp ( -x );
a PNG image;
-
f(x) = x^4 + 2x^2 + x + 3;
a PNG image;
-
f(x) = exp ( x ) + 0.01 / x;
a PNG image;
-
f(x) = exp ( x ) - 2 * x + 0.01 / x - 0.000001 / x^2;
a PNG image;
-
f(x) = 2 - x;
a PNG image;
-
f(x) = ( x + sin ( x ) ) * exp ( -x^2 );
a PNG image;
-
f(x) = 3 * x^2 + 1 + ( log ( ( x - pi )^2 ) ) / pi^4;
a PNG image;
-
f(x) = x^2 - 10 sin ( x^2 - 3x + 2);
a PNG image;
-
f(x) = cos(x)+5*cos(1.6*x)-2*cos(2*x)+5*cos(4.5*x)+7*cos(9*x);
a PNG image;
-
f(x) = 1+|3x-1|;
a PNG image;
-
f(x) = x^2+sin(53*x);
a PNG image;
-
f(x) = 2*x^4-7*x^2+3*x+5;
a PNG image;
-
f(x) = 1.0 / ( ( x - 0.3 )^2 + 0.01 ) + 1.0 / ( ( x - 0.9 )^2 + 0.04 ) - 6.0;
a PNG image;
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the MIT license
Languages:
test_min is available in
a C version and
a C++ version and
a Fortran90 version and
a MATLAB version and
an Octave version and
a Python version.
Related Data and Programs:
local_min,
an Octave code which
finds a local minimum of a scalar function of a scalar variable,
without the use of derivative information,
by Richard Brent.
local_min_rc,
an Octave code which
finds a local minimum of a scalar function of a scalar variable,
without the use of derivative information,
using reverse communication (rc),
by Richard Brent.
-
test_min_test
Reference:
-
Isabel Beichl, Dianne O'Leary, Francis Sullivan,
Monte Carlo Minimization and Counting: One, Two, Too Many,
Computing in Science and Engineering,
Volume 9, Number 1, January/February 2007.
-
Richard Brent,
Algorithms for Minimization without Derivatives,
Dover, 2002,
ISBN: 0-486-41998-3,
LC: QA402.5.B74.
-
David Kahaner, Cleve Moler, Steven Nash,
Numerical Methods and Software,
Prentice Hall, 1989,
ISBN: 0-13-627258-4,
LC: TA345.K34.
-
Arnold Krommer, Christoph Ueberhuber,
Numerical Integration on Advanced Computer Systems,
Springer, 1994,
ISBN: 3540584102,
LC: QA299.3.K76.
-
Dianne O'Leary,
Scientific Computing with Case Studies,
SIAM, 2008,
ISBN13: 978-0-898716-66-5,
LC: QA401.O44.
-
LE Scales,
Introduction to Non-Linear Optimization,
Springer, 1985,
ISBN: 0-387-91252-5,
LC: QA402.5.S33.
Source Code:
-
p00_bisection_test.m,
carries out a simple bisection method.
-
p00_f.m
evaluates the function for any problem.
-
p00_f1.m
evaluates the first derivative for any problem.
-
p00_f1_dif.m
approximates the first derivative via finite differences.
-
p00_f2.m
evaluates the second derivative for any problem.
-
p00_f2_dif.m
approximates the second derivative via finite differences.
-
p00_fmin.m
seeks a minimizer of a scalar function of a scalar variable
using Brent's derivative free method.
-
p00_interval.m
returns a bracketing interval for any problem.
-
p00_prob_num.m
returns the number of problems available.
-
p00_sol.m
returns the solution for any problem.
-
p00_start.m
returns a starting point for optimization for any problem.
-
p00_title.m
returns a title for any problem.
-
p01_f.m
evaluates the objective function for problem 1.
-
p01_f1.m
evaluates the first derivative for problem 1.
-
p01_f2.m
evaluates the second derivative for problem 1.
-
p01_interval.m
returns a starting interval for optimization for problem 1.
-
p01_sol.m
returns the solution for problem 1.
-
p01_start.m
returns a starting point for optimization for problem 1.
-
p01_title.m
returns a title for problem 1.
-
p02_f.m
evaluates the objective function for problem 2.
-
p02_f1.m
evaluates the first derivative for problem 2.
-
p02_f2.m
evaluates the second derivative for problem 2.
-
p02_interval.m
returns a starting interval for optimization for problem 2.
-
p02_sol.m
returns the solution for problem 2.
-
p02_start.m
returns a starting point for optimization for problem 2.
-
p02_title.m
returns a title for problem 2.
-
p03_f.m
evaluates the objective function for problem 3.
-
p03_f1.m
evaluates the first derivative for problem 3.
-
p03_f2.m
evaluates the second derivative for problem 3.
-
p03_interval.m
returns a starting interval for optimization for problem 3.
-
p03_sol.m
returns the solution for problem 3.
-
p03_start.m
returns a starting point for optimization for problem 3.
-
p03_title.m
returns a title for problem 3.
-
p04_f.m
evaluates the objective function for problem 4.
-
p04_f1.m
evaluates the first derivative for problem 4.
-
p04_f2.m
evaluates the second derivative for problem 4.
-
p04_interval.m
returns a starting interval for optimization for problem 4.
-
p04_sol.m
returns the solution for problem 4.
-
p04_start.m
returns a starting point for optimization for problem 4.
-
p04_title.m
returns a title for problem 4.
-
p05_f.m
evaluates the objective function for problem 5.
-
p05_f1.m
evaluates the first derivative for problem 5.
-
p05_f2.m
evaluates the second derivative for problem 5.
-
p05_interval.m
returns a starting interval for optimization for problem 5.
-
p05_sol.m
returns the solution for problem 5.
-
p05_start.m
returns a starting point for optimization for problem 5.
-
p05_title.m
returns a title for problem 5.
-
p06_f.m
evaluates the objective function for problem 6.
-
p06_f1.m
evaluates the first derivative for problem 6.
-
p06_f2.m
evaluates the second derivative for problem 6.
-
p06_interval.m
returns a starting interval for optimization for problem 6.
-
p06_sol.m
returns the solution for problem 6.
-
p06_start.m
returns a starting point for optimization for problem 6.
-
p06_title.m
returns a title for problem 6.
-
p07_f.m
evaluates the objective function for problem 7.
-
p07_f1.m
evaluates the first derivative for problem 7.
-
p07_f2.m
evaluates the second derivative for problem 7.
-
p07_interval.m
returns a starting interval for optimization for problem 7.
-
p07_sol.m
returns the solution for problem 7.
-
p07_start.m
returns a starting point for optimization for problem 7.
-
p07_title.m
returns a title for problem 7.
-
p08_f.m
evaluates the objective function for problem 8.
-
p08_f1.m
evaluates the first derivative for problem 8.
-
p08_f2.m
evaluates the second derivative for problem 8.
-
p08_interval.m
returns a starting interval for optimization for problem 8.
-
p08_sol.m
returns the solution for problem 8.
-
p08_start.m
returns a starting point for optimization for problem 8.
-
p08_title.m
returns a title for problem 8.
-
p09_f.m
evaluates the objective function for problem 9.
-
p09_f1.m
evaluates the first derivative for problem 9.
-
p09_f2.m
evaluates the second derivative for problem 9.
-
p09_interval.m
returns a starting interval for optimization for problem 9.
-
p09_sol.m
returns the solution for problem 9.
-
p09_start.m
returns a starting point for optimization for problem 9.
-
p09_title.m
returns a title for problem 9.
-
p10_f.m
evaluates the objective function for problem 10.
-
p10_f1.m
evaluates the first derivative for problem 10.
-
p10_f2.m
evaluates the second derivative for problem 10.
-
p10_interval.m
returns a starting interval for optimization for problem 10.
-
p10_sol.m
returns the solution for problem 10.
-
p10_start.m
returns a starting point for optimization for problem 10.
-
p10_title.m
returns a title for problem 10.
-
p11_f.m
evaluates the objective function for problem 11.
-
p11_f1.m
evaluates the first derivative for problem 11.
-
p11_f2.m
evaluates the second derivative for problem 11.
-
p11_interval.m
returns a starting interval for optimization for problem 11.
-
p11_sol.m
returns the solution for problem 11.
-
p11_start.m
returns a starting point for optimization for problem 11.
-
p11_title.m
returns a title for problem 11.
-
p12_f.m
evaluates the objective function for problem 12.
-
p12_f1.m
evaluates the first derivative for problem 12.
-
p12_f2.m
evaluates the second derivative for problem 12.
-
p12_interval.m
returns a starting interval for optimization for problem 12.
-
p12_sol.m
returns the solution for problem 12.
-
p12_start.m
returns a starting point for optimization for problem 12.
-
p12_title.m
returns a title for problem 12.
-
p13_f.m
evaluates the objective function for problem 13.
-
p13_f1.m
evaluates the first derivative for problem 13.
-
p13_f2.m
evaluates the second derivative for problem 13.
-
p13_interval.m
returns a starting interval for optimization for problem 13.
-
p13_sol.m
returns the solution for problem 13.
-
p13_start.m
returns a starting point for optimization for problem 13.
-
p13_title.m
returns a title for problem 13.
-
r8_sign.m
returns the sign of an R8.
Last revised on 06 June 2023.