• Join over 1.2 million students every month
• Accelerate your learning by 29%
• Unlimited access from just £6.99 per month

# 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.8466 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

5 star(s)

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

Not the one? Search for your essay title...
• Join over 1.2 million students every month
• Accelerate your learning by 29%
• Unlimited access from just £6.99 per month

# Related AS and A Level Core & Pure Mathematics essays

1.  5 star(s)

Here I have taken the point x = 2. I first get the co-ordinates for both points, which are 2 and 22, and Q, 3 and 32. After this I used the formula: y - x 2 2 = 3^2 - 2^2 = 9-4 = 5 y - x 3

2. ## Determine an appropriate parabolic model that fits the data I collected of whirlybird wing ...

The result was a little too wide. The next function was: Y= -0.035(X-8.5)2+2.33 I changed -0.03 to -0.035. As a gets farther from 0 the parabola becomes thinner. The result was a little too thin. My final function was: Y= -0.033(X-8.5)2+2.33 I changed -0.035 to 0.033.

1. ## MEI numerical Methods

Fixed point iteration: An approximation of the root can be calculated via this method. An equation can have more than one root, in order to find both roots we have to rearrange the equation so it equals x and use fixed point iteration for both equations.

2. ## Decimal Search.

0 24.7 0.1 18.709 0.2 12.844 0.3 7.429 0.4 3.004 0.5 0.325 0.6 0.364 0.7 4.309 0.8 13.564 0.9 29.749 1 54.7 This would indicate that the graph does not cross the axis and therefore has no roots, but if the graph is sketched: This method would therefore appear ineffective.

1. ## Numerical integration coursework

Mid-point Rule The first step is to use the mid-point rule; this will be done by splitting the area under the curve into rectangular strips as shown by the diagram. Thus far using the mid-point rule only gives a good estimate, however obviously as you increase the amount of strips the accuracy of the area increases.

2. ## Newton Raphson Method for Solving 6x3+7x2-9x-7=0

= -0.0808 f '(x2) = -10.6991 x3 = -0.63486 3 x3 = -0.63486 f(x3) = -0.000200809 f '(x3) = -10.63319005 X4 = -0.63488 Solving 6x3+7x2-9x-7=0 for third root f(x) is negative The root lies between -1.6473 and -1.64725 -1.64735 -1.6473 -1.64725 f(-1.64735)= -0.000611049 f(1.6473)=0.00013765 f(-1.64725)=0.001067206 X=-1.6473 (5 sig fig)

1. ## C3 COURSEWORK - comparing methods of solving functions

y= x³+3x²–3 The fact is that f (0) is negative and f (1) is positive, which tells us that the graph must cross along the x axis between 0 and 1. Hence there must be a root in the range [0, 1] F (0.87939)

2. ## Fixed point iteration: Rearrangement method explained

Hence the points converge. The magnitude of g?(x) will affect whether your results will converge or diverge. Now I will show a case where the rearrangement method fails. I will use the same function. In this case g(x) • Over 160,000 pieces
of student written work
• Annotated by
experienced teachers
• Ideas and feedback to 