 Login  |   Contact  |   About Us       Tuesday, May 17, 2022  ~ Newton-Raphson ~ Vieta Methods ~ Birge Method A new static method, BirgeVieta is added to the Nonlinear system class (class code not shown):

public static double[] BirgeVieta(double[] a, double x0, int nOrder, int nRoots,
int nIterations, double tolerance)r />
{
double x = x0;
double[] roots = new double[nRoots];
double[] a1 = new double[nOrder + 1];
double[] a2 = new double[nOrder + 1];
double[] a3 = new double[nOrder + 1];
for (int j = 0; j <= nOrder; j++)
a1[j] = a[j];
double delta = 10 * tolerance;
int i = 1, n = nOrder + 1, nroot = 0;
while (i++ < nIterations && n > 1)
{
double x1 = x;
a2[n-1] = a1[n-1];
a3[n-1] = a1[n-1];
for (int j = n - 2; j > 0; j--)
{
a2[j] = a1[j] + x1 * a2[j + 1];
a3[j] = a2[j] + x1 * a3[j + 1];
}
a2 = a1 + x1 * a2;
delta = a2 / a3;
x -= delta;
if (Math.Abs(delta) < tolerance)
{
i = 1;
n--;
roots[nroot] = x;
nroot++;
for (int j = 0; j < n; j++)
{
a1[j] = a2[j + 1];
if (n == 2)
{
n--;
roots[nroot] = -a1;
nroot++;
}
}
}
}
return roots;
}

This method takes coefficients of the polynomial as input:

 double [ ] a = double[n + 1] {a0, a1, a2, ... an}

To use this method, one can also specify an initial guess x0, order of the polynomial, number of roots, maximum number of iterations, and tolerance.   Testing the Birge Vieta Method

Now, one can examine the BirgeVieta method by using it to solve nonlinear equations. To solve the following nonlinear equation:

 f(x) = x3 - 3x + 1

The initial values were set to x0 = 0.0, order of the polynomial = 3, number of roots = 3, tolerance = 0.0001, and the maximum number of iterations = 1000.

In order to test the nonlinear function defined above, a new method TestBirgeVieta() has been added and executed:

 ► static void TestBirgeVieta()            {               double[ ] x = NonlinearSystem.BirgeVieta(new double                             { 1, -3, 0, 1.0 }, 0.0, 3, 3, 1000, 0.0001);               listBox1.Items.Add("root 1 = " +(x.ToString());               listBox2.Items.Add("root 2 = " +(x.ToString());               listBox3.Items.Add("root 3 = " +(x.ToString());               this.Text = "Birge Vieta Method / KeystoneMiningPost";            }

Results are shown in screen above.  Math, Analysis,
expertise..."

EIGENVALUE
SOLUTIONS...

> Rayleigh-Quotient Method

> Cubic Spline Method

 Applied Mathematical Algorithms ComplexFunctions NonLinear Differentiation Integration
 About Us KMP Software Engineering is an independent multidisciplinary engineering consulting company specializing in mathematical algorithms. Areas of Expertise SpecialFunctions VectorsMatrices OptimizationMethods ComplexNumbers Interpolation CurveFitting NonLinearSystems LinearEquations DistributionFunctions NumericalDifferentiation NumericalIntegration DifferentialEquations Smalltalk FiniteBoundary Eigenvalue Graphics UnderstandingMining MiningMastery MineralNews MineralCommodities MineralForum Crystallography Services NumericalModeling WebServices MainframeServices OutsourceServices LINKED IN KMP ARTICLES Brand Login Contact