# maths pure

MEI PURE 2 COURSEWORK

SOLUTION OF EQUATIONS BY NUMERICAL METHODS

. Change of Sign Method

This method makes use of the fact f(x) changes sign at a root of an equation. f(x) must be a continuous function i.e. it must not have any asymptotes or other breaks in it. Once an interval in which f(x) changes sign is located, we know that that interval contains a root. It is best to sketch the diagram of f(x) first so that we can see how many roots the equation has and their approximate positions.

Decimal Search

The equation that will be investigated here is f(x) = 4x3+5, a diagram of which is shown below.

From the graph we can see that there is only one root. Zooming in, as shown below, we can also see that this root lies between X=-1 and X=-2

Taking increments in x of 0.1 within the interval [-2, -1] and working out the value of the function

f(x) = 4x3+5 for each one and then seeing where the sign changes will enable the narrowing down of the interval.

x

-2

-1.9

-1.8

-1.7

-1.6

-1.5

-1.4

-1.3

-1.2

-1.1

-1.0

f(x)

-27

-22.4

-18.3

-14.7

-11.4

-8.5

-6.0

-3.8

-1.9

-0.3

The values calculated in the table above have only been given to 1 decimal place as we are only looking for a change in sign at this stage. We can see that there is a sign change, and therefore a root, in the interval?? [-1.1, -1.0] since the function is continuous. Having narrowed down the interval, we can now continue with increments of 0.01 within the interval [-1.1, -1.0].

x

-1.1

-1.09

-1.08

-1.07

-1.06

-1.05

-1.04

-1.03

-1.02

-1.01

-1.0

f(x)

-0.3

-0.2

-0.04

0.1

This has further narrowed down the interval within which the root lies. The interval has been narrowed down to [-1.08, -1.07]. Continuing to find the third decimal value of the root:

x

-1.08

-1.079

-1.078

-1.077

-1.076

-1.075

-1.074

-1.073

-1.072

-1.071

-1.07

f(x)

-0.04

-0.03

-0.01

0.003

The above calculations show us that the root lies in the interval [-1.078, -1.077]. From this we can conclude that the root to f(x) = 4x3+5 is ?1.0775 +/- 0.0005.

Error Bounds

The change of sign method automatically provide bounds, the two ends of the interval, within which a root lies and hence allowing us to calculate the maximum possible error in a result. From the calculations above, the solution to the function f(x) = 4x3+5 was found to be in the interval [-1.078, -1.077], which allowed for the answer to be quoted as ?1.0775 +/- 0.0005, 0.0005 being half the interval between the error bounds.

Limitations of Decimal Search

The decimal search, an example of a change of sign method, will not work when the curve of a given function touches, but does not cross, the x-axis. In such a case there is no change of sign, and so the method is doomed to failure. An example of this may be the function f(x) = (x-1)(x+2)2.

The graph of f(x) = (x-1)(x+2)2 is illustrated below. As can be seen the curve only touches the point

x = -2 and does not cross the x-axis. x = -2 is clearly ...