System of nonlinear equations solver
This online calculator attempts to find the numeric solution to a system of nonlinear equations using the method of coordinate descent
This content is licensed under Creative Commons Attribution/Share-Alike License 3.0 (Unported). That means you may freely redistribute or modify this content under the same license conditions and must attribute the original author by placing a hyperlink from your site to this work https://planetcalc.com/9911/. Also, please do not modify any references to the original work (if any) contained in this content.
Equations are specified using formulas, which can involve mathematical operations, constants and mathematical functions, one formula per line. The syntax of the formulas is described below the calculator. Description of the coordinate descent optimization algorithm can also be found there.
Formula Syntax
Multiple variables (denoted as x1, x2, etc.), the number pi ( pi), exponent (e), and the following mathematical operators are allowed in a formula:
+ - addition
- - subtraction
* - multiplication
/ - division
^ - increase in degree
Also you can use the following functions:
sqrt - square root
rootN - N th root, e.g. root3(x) - cube root
exp - exponential function
lb - binary logarithm ( base 2 )
lg - decimal logarithm ( base 10 )
ln - natural logarithm ( base e)
logB - logarithm to the base B , e.g. log7(x) - logarithm to the base 7
sin - sine
cos - cosine
tan - tangent
cot - cotangent
sec - secant
cosec - cosecant
arcsin - arcsine
arccos - arccosine
arctan - arctangent
arccotan - arccotangent
arcsec - arcsecant
arccosec - arccosecant
versin - versine
vercos - coversine
haversin - haversine
exsec - exsecant
excsc - excosecant
sh - hyperbolic sine
ch - hyperbolic cosine
tanh - hyperbolic tangent
coth - hyperbolic cotangent
sech - hyperbolic secant
csch - hyperbolic cosecant
abs - absolute value (modulus)
sgn - signum
Solving Systems of Nonlinear Equations
The calculator above uses a numerical method to find a solution to a system of nonlinear equations. Here are a few definitions to make it clearer.
A nonlinear equation is an equation of the form , where is some nonlinear function. A nonlinear function is anything other than the form .
Nonlinear equations come in algebraic and transcendental forms. The general form of algebraic equations is . Transcendental equations use functions like exponent, sine, logarithm, etc.
Methods for solving such equations are divided into exact, when you can find an analytical solution, i.e., when you can write down the solution as a formula (e.g., the formula for finding the roots of a quadratic equation) and iterative (or numerical). It is known1 that there is no analytic solution for algebraic equations with the degree higher than 4. In the general case there is no analytical solution for transcendental equations either, thus for most cases the solution can only be found by numerical methods. For numerical methods, the accuracy is predetermined, and the roots of the equation are searched for with the given accuracy.
A system of nonlinear equations is a system of the form
.
The solution of such a system is a vector X of dimension n.
Numerical methods for solving systems of nonlinear equations are, for example, the method of simple iterations (or Jacobi method) and Newton method. The method of simple iterations requires transformation of the original equations and calculation of the norm of the Jacobi matrix, while Newton's method (also iterative) requires calculation of the inverse Jacobi matrix. Thus, at each iteration step, one has to perform quite a lot of calculations. However, there is another family of methods for solving systems of nonlinear equations, the so-called optimization methods, one of which, the coordinate descent method, is used in the calculator above.
The idea behind optimization methods is to replace the initial root-finding problem with an optimization problem. A functional F is created from the initial system of nonlinear equations:
and the minimization problem is solved
It can be seen that unlike the solution of the system of equations, the solution to the minimization problem will be found in any case, even if it is not equal to zero ("stuck" in the local minimum). There are quite a lot of optimization methods, here we use probably one of the simplest methods - the method of coordinate descent.
Algorithm of the method:
- The initial accuracy ε is set
- An initial approximation X₀ is chosen, e.g., the zero vector. If there are multiple roots, the choice of initial approximation actually determines which root will be found.
- A new local minimum is sought at one of the coordinates
- A new vector Xᵢ is formed
- The termination condition is checked. If
then the solution with the required accuracy is found, otherwise another coordinate is chosen and the local minimum is searched again (transition to step 3).
-
Abel's theorem on the insolubility of equations in radicals ↩
Comments