- Level: AS and A Level
- Subject: Maths
- Word count: 3460
C3 Coursework - different methods of solving equations.
Extracts from this document...
Introduction
C3 Coursework – Numerical Solutions
Decimal Search
There a numerous ways to solve a problem and in finding the unknown. Some methods give you the exact and precise answer but usually are harder and more complex. The Decimal search method enables you to get a very close approximate to the real solution but more easily.
The way this method works is by looking between two numerical values (for example 1 and 2) and then
As a demonstration in applying this method, I will be attempting to solve this equation using the Decimal Search method and going through the method step by step:
Below is what this function looks when plotted on a graph:
We know that the solution for F(x) = 0 is the point on the X axis where the sign changes from a positive to a negative.
So if we zoom in a little bit further, from this graph we can tell where the solution lies, somewhere between 0 and 10
Now that we know the solution is roughly between these two values, I will use excel to solve the problem with firstly taking increments in x, the size of 1. So when I substitute the incremented values of x between -10 and 0 into the equation, I get the following results:
x | F(x) |
-1 | 20 |
-2 | 19 |
-3 | 10 |
-4 | -13 |
-5 | -56 |
-6 | -125 |
-7 | -226 |
-8 | -365 |
-9 | -548 |
You can tell that the sign changed between -3 and -4. So I set these as my initial values. The fact that the solution lies between -3 and -4 can also be seen in the graph:
So next, I check with increments of 0.1 in x. I again substitute the values in to the equation and tabulate the results and look for where the sign change occurs.
Middle
-1.965331019
6
-1.965331019
-1.962905362
7
-1.962905362
-1.962101813
8
-1.962101813
-1.961835541
9
-1.961835541
-1.961747297
10
-1.961747297
-1.961718052
11
-1.961718052
-1.961708359
12
-1.961708359
-1.961705147
13
-1.961705147
-1.961704082
14
-1.961704082
-1.961703730
15
-1.961703730
-1.961703613
16
-1.961703613
-1.961703574
17
-1.961703574
-1.961703561
18
-1.961703561
-1.961703557
19
-1.961703557
-1.961703555
20
-1.961703555
-1.961703555
This shows that after every iteration, I get closer and closer towards the root. After 19 iterations, I found the root of the equation as from then on, it repeats. So the root of the equation x=G(x) against y = x graph.
Failure of Rearrangement method
There are situations where this method doesn’t work. When I re-arrange f(x) into a different x = g(x), it does not converge to the point when I go through the iterations. E.g. I re- arranged f(x) to:
If I plot y = g(x) against y = x, it looks like this:
Looking at this, it implies that the root is between -1 and 0 When I do the iterations starting at the point -1, it turns out like below. The green line is my original equation showing my real root and this clearly shows that the root that is being implied by the y = g(x) graph is wrong. The iterations are also wrong as they diverge away from the point as well.
If you differentiate the y = g(x) function and substitute x for the approximation of the root. If that g’(x) < -1 or g’(x) > 1, then we know that the function will not converge to the root but will diverge away.
e.g. Let us take a the last g(x) function possible from my f(x) function.
x= x5 + 6x2 + 4 → g(x) = x5 + 6x2 + 4
g’(x) = 5x4 + 12x
From this graph, you can se that the starting x value for the iteration would be -2
G’(x) = 5(-2)4 + 12(-4)
G’(x) = 32 → 32 > 1 there fore this function should either overflow or diverge away. Here is the proof:
Newton Raphson method
This method works by plotting the f(x) on a graph and visually looking at between what two points the root is (in single units such as 1 or 5 or 9). Then we draw a tangent at that point on the graph. E.g. if the root is between 1 and 2, then you draw a tangent at x= 1 point on the graph. Then we look at where the tangent crosses the X axis and that value will be the new x value on the graph for a tangent. This repeats until we find the root of the equation, (when x value starts repeating or reached enough significant levels). I will attempt to solve f(x) = y = x³−6x²+2x+2
Here’s y = f(x) plotted:
From the graph, we can tell that roots are between (-1 and 0), (0 and 1) and (5 and 6). So we draw a tangent at x=-1 point on the graph. To do this, we need to find the gradient at that point. To get this, we need to find Y’.
When we substitute in x = -1, we get . So gradient at that point is 17.
The Equation of the tangent at x = 1 and with grad -7 can be found using the formula below as we know that when x = -1, y = -7 by substituting (-1) in the f(x) : (-1)3-6(-x)2+2(-1) + 2 = -7
This is the tangent drawn:
From the equation, we can work out where the line crosses the X axis by making
equal to 0:
-0.58824
So now, our X1 value is -0.58824 instead of 0. We can generalise this into the formula:
So, now using the formula, we can work out the next X value:
X1+1 =-0.58824 - f(X-0.5882)/f’(X -0.5882)
X2 = 0.58824 –
X2 = 0.44402
This summarised and finalised in a table from the Software Autograph:
After the fifth iteration, we started repeating the value of X, this means that we have found a root for the equation Y = x2 - 6x +3
From the table above, you can tell that the root has been achieved completely after 7 iterations as the ∆x is 0. But after the 4th iteration, we have reached a point where the x value started repeating due to the fact that this was to 4 decimal places. This is not accurate enough as I want it to be to 5 decimal places. So I used the formula to work out the values in excel. Here are those results:
X0 | -0.58824 |
X1 | -0.44402 |
X2 | -0.42401 |
X3 | -0.42362 |
X4 | -0.42362 |
After the fourth iteration, we reach the root -0.42362 ± 0.00005
I used use the same method to work out the other two roots. Here are the results for the both these roots. I used excel to work these out.
Root number 2:
X0 | 0.85714 |
X1 | 0.84660 |
X2 | 0.84653 |
X3 | 0.84653 |
Root number 2 is 0.84653 ± 0.00005
Root number 3
X0 | 5.63158 |
X1 | 5.57818 |
X2 | 5.57709 |
X3 | 5.57709 |
Conclusion
Newton Raphson
This method involves working out the gradient function of the graph which is relatively easy even if the equation is complicated. This is the only hard part of the method as the iterative part of the method is very simple with the use of the formula. If automated software/computer is used then it becomes even easier. Regarding the speed the convergence, this is by far the fastest to converge to the root and it is also the method which fails the least out of the three different methods. With the use of excel, it is every easy to write down the formula of the method in one cell and dragging it down as many cells as you wish to (the number of iterations) and it is very easy to use. With the use of AutoGraph Software, It is even easier as you don’t even have to work out the gradient function. All you need to do is just enter y = f(x) formula and then select the graph and select the Newton Raphson iteration and then selecting you X0 point and click as many times as you want on the arrow (each click = an iteration). This makes it much easier than excel but it is again less accurate as it only gives the root to 3 decimal places where as excel can be configured to as many decimal places as needed.
Overall, all the methods and both the software I used have circumstances where once of them is better than other and circumstances where one completely fails or is much longer. But with ever growing technology, there might already be software that solves the roots of an equation after entering the formula in. But whichever bit of software you use, it is hands down the easier way of finding the roots of an equation.
This student written piece of work is one of many that can be found in our AS and A Level Core & Pure Mathematics section.
Found what you're looking for?
- Start learning 29% faster today
- 150,000+ documents available
- Just £6.99 a month
Here's what a teacher thought of this essay
An excellent piece of work with no errors giving clear explanations of the use of decimal search, iterations and Newton-Raphson numerical methods to solve equations. 5 stars
Marked by teacher Mick Macve 18/03/2012