Solving an Equation in a Single Unknown
This QuickSheet can be used to find a solution to the equation
for a function f(x) you specify using the built-in root function.
Enter a function f(x):
Enter a guess value for the solution, and modify until the solver is converging appropriately. It is helpful to graph the function to find a value that is reasonably close to the root as a starting guess.
Note: For a complex solution, input a complex guess value.
Another solution can be found by using bracketing within the root function:
Note: In the case of complex roots, only the real part of the root is shown on the plot.
Finding Multiple Roots
For an expression with multiple roots, it's possible to solve for additional roots by dividing out known roots and reusing the same guess value.
For more accurate roots, reduce the value of TOL. The root function is set with a maximum TOL of 10-5, because this value is speedy for most evaluations, and larger values produce poor convergence. If your equation is a polynomial, you can find all roots at once using the
polyroots
function.
Units and the Root Function
You may also use units with the root function:
Enter a guess value for the solution. If you are searching for a root with units, use units in the guess.
Change the value of st to find different rise times at which the particular voltage is reached.
Solving Tolerance
You can change the accuracy of root function solutions by changing TOL for your worksheet. From before
Now reduce the value of TOL (increase the tolerance) from its default value of
.
Reducing TOL to excessively small values may increase calculation time and can also cause the solver not to converge, if the convergence criteria of the value of the function at the root, and the change between successive solutions never meet the specified tolerance. Values smaller than 10-12 are probably not meaningful.