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

2. Best shape for gutter and further alegbra - using Excel to solve some mathematical ...

Then I varied base a which also varied w-a. Base a was varied by 1 unit each time. Below is a snapshot of the excel spreadsheet showing the optimum values obtained with varying a and ?. Highlighted in red is the maximum area which would give the maximum volume for this cross section.

1. Pure 2 coursework - Decimal Search Method

x f(x) -4 -113.46 -3 -53.04 -2 -17.22 -1 0 0 4.62 1 2.64 2 0.06 3 2.88 4 17.1 5 48.72 From the table, it would appear that there is only one root between the values for x of -4 to 5.

2. Change of Sign Method.

In this case, using the method of decimal search has caused an incorrect conclusion to be reached. This is because the curve touches the x-axis between x=1 and x=2, therefore there is no change of sign and consequently all change of sign methods are doomed to failure.

1. Investigating the Quadratic Function

If a value is added to 'x' the parabola moves to the left and the value on the x-axis is negative. To prove this I am going to use the function in graph F: The graph shows the x value to be -3 whereas the value being added to x is +3.

2. Mathematical equations can be solved in many ways; however some equations cannot be solved ...

Using decimal search I obtained the root x=0.310. I shall now solve it using this rearrangement: ==> =0 ==> ==> ==> ==> The tables shows that the sequence is converging towards the root and finds the root at x=0.310.

1. x� + 10x + 16 = 0 (x+2)(x+8) x = -2 or -8 4.) x� + 12x + 27= 0 (x+9)(x+3) x= -9 or - 3 5.) x�+14x +40 = 0 (x+4)(x+10) x=-4 or-10 6.) x�+ 15x + 36 = 0 (x+12)(x+3) x= -12 or - 3 7.)

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 