Solving Equations (Finding Zeros)
Solving Equations (Finding Zeros)
We will look at ways of solving equations using computers | either symbolically or numerically. There are many kinds of equations: Equations in one real variable, with one or several solutions. Sets of equations in several real variables. Equations with variables that are integers, or are complex. Di erential equations, others... We will look at equations in one real variable. We can always rewrite such an equation as f (x) = 0 So we can also see our problem as that of nding the zeros of a function.
> solve(sin(x+1)=1,x);
nothing printed
The null response indicates that Maple couldn't nd any solutions, but a solution does exist!
Since the second derivative is negative, the point where the derivative is zero is a maximum, rather than a minimum.
This is a very robust procedure | nothing much can go wrong. However, we'll nd only one zero this way! There could be more. It's also not very fast.
We can build a rst-degree model of a function using the function's value and derivative at one point. Repeating this procedure, always building a model based on the last point, gives the method of Newton-Raphson iteration.
We get the next guess, x +1, from the previous guess, x , as follows: x +1 = x f (x ) = f 0(x )
i i i i i i
If we start close enough, however, it does converge for this example. We might also have problems if the derivative is zero at the solution.
Other Methods
A huge number of other methods are possible, using higher-degree models of the function based on various pieces of information. For example: We could build a second-degree model based on the last three function values (Muller's method). We could build a second-degree model based on the function value, the rst derivative, and the second derivative at the last point. We could build a third-degree model based on the function values and derivatives at the last two points.
After the n iterations, guessing the mid-point would give an error of no more than
n
I 2 = 2