• Join over 1.2 million students every month
  • Accelerate your learning by 29%
  • Unlimited access from just £6.99 per month
Page
  1. 1
    1
  2. 2
    2
  3. 3
    3
  4. 4
    4
  5. 5
    5
  6. 6
    6
  7. 7
    7
  8. 8
    8
  9. 9
    9
  10. 10
    10
  11. 11
    11
  12. 12
    12
  13. 13
    13
  14. 14
    14
  15. 15
    15
  16. 16
    16

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:

image08.png

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.

image09.png

So if we zoom in a little bit further, from this graph we can tell where the solution lies, somewhere between 0 and 10

image20.png

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:image28.png

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.

...read more.

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:

image14.png

If I plot y = g(x) against y = x, it looks like this:image15.png

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.

image16.png

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 + 4image17.png

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:

image18.png

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:

image19.png

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’.

image21.pngimage21.png

When we substitute in x = -1, we get image22.pngimage22.png . 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

image23.png

image24.png

image25.png

image26.png

This is the tangent drawn:

From the equation, we can work out where the line crosses the X axis by making image27.pngimage27.png

equal to 0:

image29.png

image30.png

image31.png

image32.pngimage32.png -0.58824

image33.png

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 – image34.pngimage34.png

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 +3image35.png

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.image36.png

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 3image38.png

X0

5.63158

X1

5.57818

X2

5.57709

X3

5.57709

...read more.

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.

...read more.

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

See related essaysSee related essays

Related AS and A Level Core & Pure Mathematics essays

  1. OCR MEI C3 Coursework - Numerical Methods

    -0.00339 2.64527 x6 -1.76245 -0.00001 2.62496 x7 -1.76244 0.00000 2.62488 x8 -1.76244 0.00000 2.62488 x=2.62488 (5d.p.) Failure of the Newton-Raphson method The method fails for the same function if x1=0 xn f(xn) f'(xn) x1 0 0.60317 -0.14172 x2 4.25600 1.05148 -0.02495 x3 46.40573 1.00046 -0.00002 x4 Value could not be

  2. Methods of Advanced Mathematics (C3) Coursework.

    0.927512 -2.41 1.052479 -2.4 1.176 -2.5 -0.125 -2.499 -0.11126 -2.498 -0.09753 -2.497 -0.08382 -2.496 -0.07012 -2.495 -0.05644 -2.494 -0.04277 -2.493 -0.02912 -2.492 -0.01548 -2.491 -0.00186 -2.49 0.011751 From this I can see that the route lies between -2.491 and -2.490�0.0005 and is found at 0.011751 � 0.0000005.

  1. Numerical Methods Coursework

    Below is the formula which is involved in the calculation. Formula application This was done on a spreadsheet on Microsoft excel. Various algorithms were used to get approximations. The copy of the spreadsheet where the formula was also displayed was also shown.

  2. Numerical Methods coursework

    to estimate the area. Dependent on the amount of rectangles (n) used the general formula is: 3. Simpson's Rule Simpson's Rule is a weighted average of and . The normal average is exactly in the middle of and . But in this rules the average is twice as close to as it is to .

  1. Am going to use numerical methods to solve equations that can't be solved algebraically

    4 I am now going to find the root lies in the interval [0, 1] Taking x=1 as my starting point: X1= 1 X2= 0.75 X3= 0.559326171 X4= 0.513685659 X5= 0.508941846 X6= 0.508536519 X7= 0.50850258 X8= 0.508499743 X9= 0.508499506 X10= 0.508499486 X11= 0.508499484 X12= 0.508499484 In this case the interaction has converged quickly for which 1 was looking for.

  2. Borders Coursework

    0 4 8 12 16 20 24 28 32 Total 1 5 13 25 41 61 85 113 145 Working out to show the equation (nth term) for the Extra Squares used. 0 4 8 12 16 20 24 28 32 +4 +4 +4 +4 +4 +4 +4 +4 Therefore the first part of the equation is 4n.

  1. Fixed point iteration: Rearrangement method explained

    Hence -1 < g?(x) < 1. If I was to zoom into the point of intersection: I can see that the gradient of g(x) is below 1 because it is not as steep as y = x at any point through the intersection.

  2. 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)

  • Over 160,000 pieces
    of student written work
  • Annotated by
    experienced teachers
  • Ideas and feedback to
    improve your own work