This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Numerical Root Finding

NSolve gives you a general way to find numerical approximations to the solutions of polynomial equations. Finding numerical solutions to more general equations, however, can be much more difficult, as discussed in "Equations in One Variable". FindRoot gives you a way to search for a numerical root of a function or a numerical solution to an arbitrary equation, or set of equations.
FindRoot[f,{x,x0}]search for a numerical root of f, starting with x=x0
FindRoot[lhsrhs,{x,x0}]search for a numerical solution to the equation lhsrhs, starting with x=x0
search for a simultaneous numerical root of all the fi
search for a numerical solution to the simultaneous equations eqni

Numerical root finding.

The curves for cos (x) and x intersect at one point.
Click for copyable input
This finds a numerical approximation to the value of x at which the intersection occurs. The 0 tells FindRoot what value of x to try first.
Click for copyable input
In trying to find a solution to your equation, FindRoot starts at the point you specify, and then progressively tries to get closer and closer to a solution. Even if your equations have several solutions, FindRoot always returns the first solution it finds. Which solution this is will depend on what starting point you chose. If you start sufficiently close to a particular solution, FindRoot will usually return that solution.
The function sin (x) has an infinite number of roots of the form x=n. If you start sufficiently close to a particular root, FindRoot will give you that root.
Click for copyable input
If you start with x=6, you get a numerical approximation to the root x=2.
Click for copyable input
If you want FindRoot to search for complex solutions, then you have to give a complex starting value.
Click for copyable input
This finds a zero of the Riemann zeta function.
Click for copyable input
This finds a solution to a set of simultaneous equations.
Click for copyable input
The variables used by FindRoot can have values that are lists. This allows you to find roots of functions that take vectors as arguments.
This is a way to solve a linear equation for the variable x.
Click for copyable input
This finds a normalized eigenvector x and eigenvalue a.
Click for copyable input