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

# Solving Equations Numerically

Extracts from this document...

Introduction

Josh Wakeford 12B1

05/04/03

Pure 2 Coursework: Solving Equations Numerically

Many cubic equations can be solved algebraically; however, many cannot, which means we have to give approximate answers.  Graphs, like the one seen below, cannot be solved algebraically and have to be solved some other way.  So, how can we solve these graphs to any degree of accuracy, and in the most efficient way possible?  This problem comes up a lot in real life, as many equations in real life will not be able to be solved algebraically, and so other methods have to be used.

There are a number of methods that can be used here, and in this coursework, I am going to describe a trio of good methods that all have their advantages and disadvantages.

Interval Estimation – Change of Sign Method

Now, as are looking for the values of x when the graph crosses the x-axis, we know that when there is a root, f(x) will change sign, so assuming that the graph does not have any asymptotes or other breaks in it, we know that once we have located a interval with a root in it, f(x) will change sign. For example, in the diagram to the left, we know that there is a root between 1 and 2.

Decimal Search

Middle

1.  We then draw a tangent of the curve.  I.e. we draw the tangent of the curve at the point (x1,f(x1)).

As the equation of a straight line can be written

y-y1 = m(x-x1);

the equation of the tangent must be

y-f(x1) = f’(x1)(x-x1).

Where the tangent cuts the x axis, we will call the point (x2,0), so:

0-f(x1) = f’(x1)(x2-x1).

We can rearrange this to give:

x2 = x1-(f(x1)/f’(x1))

Which gives us the Newton-Raphson iteration formula, which is:

xn+1 = xn-(f(xn)/f’(xn))

When we use our cubic equation with this formula, we can values which will start to converge at a very quick rate, this makes using this formula a lot quicker than using the decimal search with the change of sign method which was explained earlier.

The method with which this is done is illustrated graphically on the next page.  Also, on the next page, is the way in which it is possible to find all three roots to the equation.

If we plot this method of obtaining the roots in a table, we get the following: x f(x) f'(x) x' -2 6.8 20 -2.34000000000000 -2.34000000000000 -2.58359200000000 32.94040000000000 -2.26156767980960 -2.26156767980960 -0.01675654070199 29.77062765342460 -2.26100482500865 -2.26100482500865 0.00075737613753 29.74828054340280 -2.26103028450156 -2.26103028450156 -0.00003455148215 29.74929124239710 -2.26102912307953 -2.26102912307953 0.00000157557904 29.74924513564450 -2.26102917604151 -2.26102917604151 -0.00000007184920 29.74924723815710 -2.26102917362635 -2.26102917362635 0.00000000327645 29.74924714227880 -2.26102917373649 -2.26102917373649 -0.00000000014942 29.74924714665100 -2.26102917373146 -2.26102917373146 0.00000000000682 29.74924714645160 -2.26102917373169 -2.26102917373169 -0.00000000000033 29.74924714646070 -2.26102917373168 -2.26102917373168 0.00000000000003 29.74924714646030 -2.26102917373168 -2.26102917373168 -0.00000000000001 29.74924714646030 -2.26102917373168

Where f(x) is applying the function to the value just found.  Where f(x) = 0 is where the difference between the tangent crossing the x-axis and the graph crossing the x-axis are the same.  The closest we managed to get in this case was 0.00000000000001, which is probably close enough.

So the root is -2.26102917373168 ± 0.000000000000005.

The other two roots are found in these following tables:

 x f(x) f'(x) x' 0 2 -14 0.14285714285714 0.14285714285714 0.01282798833819 -13.67346938775510 0.14379530916844 0.14379530916844 -0.00007910411767 -13.67011087238190 0.14378952252060 0.14378952252060 0.00000049930572 -13.67013163639910 0.14378955904590 0.14378955904590 -0.00000000315117 -13.67013150533860 0.14378955881538 0.14378955881538 0.00000000001989 -13.67013150616570 0.14378955881684 0.14378955881684 -0.00000000000013 -13.67013150616050 0.14378955881683 0.14378955881683 0.00000000000000 -13.67013150616050 0.14378955881683

The root found in this table is 0.143789558815385 ± 0.000000000000005.

 x f(x) f'(x) x' 5 312 216 3.55555555555556 3.55555555555556 89.59835390946500 103.33333333333300 2.68847471127041 2.68847471127041 24.10298233491410 53.73954116953500 2.23995985962932 2.23995985962932 5.36050535730701 33.39674141438490 2.07945002752342 2.07945002752342 0.72784915149579 26.99646178022800 2.05248911844500 2.05248911844500 0.04732869754988 25.96689335046130 2.05066646307722 2.05066646307722 0.00230660109554 25.89776294818390 2.05057739742703 2.05057739742703 0.00010973435526 25.89438636297440 2.05057315966083 2.05057315966083 0.00000521425557 25.89422570775330 2.05057295829333 2.05057295829333 0.00000024775204 25.89421807384790 2.05057294872547 2.05057294872547 0.00000001177175 25.89421771112760 2.05057294827086 2.05057294827086 0.00000000055932 25.89421769389320 2.05057294824926 2.05057294824926 0.00000000002657 25.89421769307440 2.05057294824824 2.05057294824824 0.00000000000126 25.89421769303550 2.05057294824819 2.05057294824819 0.00000000000006 25.89421769303360 2.05057294824819 2.05057294824818 -0.00000000000017 25.89421769303330 2.05057294824819

Conclusion

However, to do this at any real speed, you need to have access to a powerful computer program, or be able to do large sums quite fast.  It is easy to do if you have a computer program like Excel or Autograph, but otherwise one of the other methods might be easier.

The Change of Sign method is not particularly fast.  It does get to a root, but you need to produce whole tables of data for each decimal place you obtain, and this is really quite a slow process.  On the plus side, it is possible to do this without any special hardware or software, a calculator and a piece of paper are enough to get to a few decimal places with this method, and if you have the time and patience, you can find many more decimal places.

The x = g(x) method is also slower than Newton Raphson in most cases.  It can be quite fast, but it often depends on where you start from, however, assuming you choose a reasonable value, you get quite a good rate of convergance.  This method is possible without a computer, but would be very time consuming, and it might be quicker to use the Change of Sign Method.

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

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.  ## C3 Coursework - different methods of solving equations.

5 star(s)

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.

2. ## Numerical solutions of equations

0=x5+4x2-2 f'(x) = 5x4+8x The iterative formula for the Newton-Raphson method is: xn+1=xn- f(xn) f'(xn) So my iterative formula is: xn+1=xn- xn5+4xn2-2 5xn4+8xn I think that a good starting value for x1 would be 1.2 x1 = 1.2 x2 = 0.887083 x3 = 0.720596 x4 = 0.682450 x5 = 0.680772

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

To find U2, this value must be substituted into the equation of the curve, g(x). This produces the value -3.301927 which can be seen on the y-axis. To find U3, this new value must be substituted into the equation of the curve.

2. ## Solving Equations. Three numerical methods are discussed in this investigation. There are advantages and ...

3.61711E-13 -1.66593 -2.17123E-13 0.688892183 5 0.688892183 0 -1.66593 0 0.688892183 6 0.688892183 0 -1.66593 0 0.688892183 , Rearrange into form n xn g(xn) g'(xn) 1 0.500000 0.812500 -0.625 2 0.812500 0.608032 -0.63477 3 0.608032 0.742693 -0.66151 4 0.742693 0.653240 -0.658 5 0.653240 0.712654 -0.6664 6 0.712654 0.673094 -0.66349 7 0.673094

1. ## Numerical solution of equations, Interval bisection---change of sign methods, Fixed point iteration ---the Newton-Raphson ...

First of all, for one root of f(x) = 0. We then can draw a tangent to the curve y=f(x) at the point (x1, f(x1)). The point which the tangent cuts the x axis gives the next approximation for the root.

2. ## Different methods of solving equations compared. From the Excel tables of each method, we ...

and hence find the intersection points of y=x and g(x). The corresponding x values are the roots of f(x)=0. Equation 3: Rearrange the equation, let � � Use Autograph to draw the graphs of and. We can see from the graph that the method leads us to one root efficiently.

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

The x co-ordinate of this new point becomes x3 These steps will repeat and new points are generated nearer and nearer to the point of interception of y=x and y=g(x) which is the root of equation of f(x) =0 Examining g?(x)

2. ## Evaluating Three Methods of Solving Equations.

The reason this method works is represented by this graph: After taking an x-value you find g(x) of that value. You then use this g(x)-value again as the new x and continue along in this manner whilst converging upon the root. • Over 160,000 pieces
of student written work
• Annotated by
experienced teachers
• Ideas and feedback to 