org.apache.commons.math3.analysis.solvers
Class MullerSolverTest

java.lang.Object
  extended by org.apache.commons.math3.analysis.solvers.MullerSolverTest

public final class MullerSolverTest
extends Object

Test case for Muller solver.

Muller's method converges almost quadratically near roots, but it can be very slow in regions far away from zeros. Test runs show that for reasonably good initial values, for a default absolute accuracy of 1E-6, it generally takes 5 to 10 iterations for the solver to converge.

Tests for the exponential function illustrate the situations where Muller solver performs poorly.

Version:
$Id: MullerSolverTest.java 1374632 2012-08-18 18:11:11Z luc $

Constructor Summary
MullerSolverTest()
           
 
Method Summary
 void testExpm1Function()
          Test of solver for the exponential function.
 void testParameters()
          Test of parameters for the solver.
 void testQuinticFunction()
          Test of solver for the quintic function.
 void testSinFunction()
          Test of solver for the sine function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MullerSolverTest

public MullerSolverTest()
Method Detail

testSinFunction

public void testSinFunction()
Test of solver for the sine function.


testQuinticFunction

public void testQuinticFunction()
Test of solver for the quintic function.


testExpm1Function

public void testExpm1Function()
Test of solver for the exponential function.

It takes 10 to 15 iterations for the last two tests to converge. In fact, if not for the bisection alternative, the solver would exceed the default maximal iteration of 100.


testParameters

public void testParameters()
Test of parameters for the solver.



Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.