C++ - Array Math -
i trying equation c++
root[0] = root [0] - f(root[0])/ root[0] - root[1] * root[0] - root[2] * root[0] - root[3]
in examples there 3, changes user input.
the program trying solve polynomial equations enough information.
i have got top of equation work here came with:
complex<double> top, bottom; top = (complex<double>)coefficientarray[1] * (pow (rootarray[0], degree)); rootarray[0] = rootarray[0] - (top/bottom);
solving linear
equations alot faster using:
- the coefficient matrix
- an unknown variable matrix (to solve)
- the answer matrix
to find roots of higher grade equations -with approximation error- should use the
newton-raphson
method.
Comments
Post a Comment