3x^2+6x+1.4 x^3+3x^2+1.4x-1 = 0
For root indicated in interval (0,1), results are as follows:
- Graph 5 -
We can express this information as; the root can be taken as 0.37510 with maximum error of + 0.000005. Therefore 0.375095 < X < 0.375105.
To check for the different signs,
f(0.375095) = x^3+3x^2+1.4x-1= -3.76959E-06
f(0.375105) = x^3+3x^2+1.4x-1= 3.69674E-05
- Graph 6 -
For root indicated in interval (-2,-1), results are as follows:
- Graph 7 -
We can express this information as; the root can be taken as -1.26113 with maximum error of + 0.000005. Therefore -1.261125 < X < -1.261135.
To check for the different signs,
f(-1.261125) = x^3+3x^2+1.4x-1= -5.13861E-06
f(-1.261135) = x^3+3x^2+1.4x-1= 8.81572E-06
- Graph 8 -
For root indicated in interval (-3,-2), results are as follows:
- Graph 9 -
We can express this information as; the root can be taken as -2.11397 with maximum error of + 0.000005. Therefore -2.113965 < X < -2.113975.
To check for the different signs,
f(-2.113965) = x^3+3x^2+1.4x-1= 4.75649E-06
f(-2.113975) = x^3+3x^2+1.4x-1= -1.64714E-05
- Graph 10 -
For a graph that does not work using Newton- Raphson method.
Xn+1 = Xn – f (Xn)
f’(Xn)
Where f (X1) = 5x^3-1.5x+0.2
f ’(X) = dy = 15x^2-1.5
dx
The following graph represents y=f(x)
- Graph 11 -
The graph shows me that 5x^3-1.5x+0.2=0 has 3 roots, lying in the intervals (-1,-0.5), (0,0.5)
Therefore Xn+1 = x - (5x^3-1.5x+0.2)
15x^2-1.5
= 15x^3-1.5x-(5x^3-1.5x+0.2)
15x^2-1.5
= 15x^3-1.5x-5x^3+1.5x-0.2
15x^2-1.5
Xn+1 = 10x^3-0.2 => The Newton-Raphson method for eq’n
15x^2-1.5 5x^3-1.5x+0.2=0
Results are as follows:
These results show that for a positive value of X, using the Newton-Raphson method on eq’n 5x^3-1.5x+0.2=0, it finds the root in the interval (-0.6,-0.7).
As shown in Graph 12, a tangent is taken at 0.3 to find the root between he interval (0.2,0.3). But instead finds the root in the interval (-0.6,-0.7).
We can express this information as, the root can be taken as –0.60507 with maximum error of + 0.000005. Therefore -0.605065 < X < -0605075.
To check for the different signs,
f(-0.605065) = 5x^3-1.5x+0.2 = 0.00001
f(-0.605075) = 5x^3-1.5x+0.2 = -0.00002
Rearrangement method
The theory behind this iteration method is as follows.
The situation might be as illustrated in the figure above. The following is examples of graphs of y = x and y = f(x) intersect at the root. The starting point is X0. Travel up to the curve of y = f(x). By travelling horizontally to the line y = x, we find f(X0) = X1. Repeat this process, and we see the terms getting closer to the root.
If the sequence of numbers approaches a fixed value, then that value will be a solution of the original equation. The sequence converges to the solution. If the sequence does not approach a fixed value, then it diverges.
The following rule applies:
g’(1)<1
g’(0)<1
g’(-1)<1
Where if g’(x) < 1 then iteration will work - the root will be converged to but if not < 1, the value diverges away from root or converges to a different root.
I have chosen to solve the equation x1^3-5x2+1 =0 using the rearrangement method.
The graph shows me that x1^3-5x2+1 =0 has a root, lying in the interval (-3,-2) , (0,1) , (2,3)
By making x2 the subject we rearrange x1^3-5x2+1 =0 to get y = (x^3+1) / 5
y = x
Results are as follows.
These results show that when any x value is taken the between 0.20164 and the intersection point of graphs y = (x^3+1) / 5 and y = x, the y value is converged to 0.20164.
These results show that when a higher x value is taken from the intersection point of graphs y = (x^3+1) / 5 and y = x, the y value diverges away to infinity.
This method works when finding the root between the interval (0,1) but fails to find the other two roots.
This can be shown graphically:
By making x1 the subject we rearrange x1^3-5x2+1 =0 to get y = (5x-1)^(1/3)
y = x
Results are as follows:
These results show that when any x value is taken between 0.20164 and the intersection point of graphs y = (5x-1)^(1/3) and y = x , the y value is converged to the intersection point.
These results show that when any higher x value is taken from the intersection point of graphs y = (5x-1)^(1/3) and y = x, the y value is converges back to the intersection point.
This methods works when finding both roots between the intervals (-3,-2) and (2,3). However fails when finding the third root in interval (0,1).
This can be shown graphically:
- Graph 16 –
Comparison of methods
I have chosen to solve the equation x^3-5x+1=0 using both Decimal search and Newton raphson method.
I shall first solve the equation using the Decimal search.
The following graph represents y= f(x):
The graph shows me that x^3-5x+1=0 has three roots, lying in the intervals (-3,-2) , (0, 1) , (2,3).
Within the change of sign methods, decimal search method shall be used to find out an approximate value for roots of x^3-5x+1=0
In this method I first take increments of x of size 0.1 within the interval (-3,-2). I do this until I find a change in sign.
There is a sign change, and therefore a root, in the interval (-2.4,-2.3).
I can now continue with increments of 0.01 within the interval (-2.4,-2.3).
This shows that the root lies in the interval (-2.34,-2.33).
We can express this information as, the root can be taken as -2.335 with maximum error of + 0.005
I shall now solve the same equation using Newton raphson method.
Xn+1 = Xn – f (Xn)
f’(Xn)
Where f (X1) = x^3-5x+1=0
f ’(X) = dy = 3x^2 - 5
dx
The following graph represents y= f(x):
Therefore Xn+1 = x - (x^3-5x+1)
3x^2 - 5
= 3x^3-5x-( x^3-5x+1)
3x^2 - 5
= 3x^3-5x-x^3+5x-1
3x^2 - 5
Xn+1 = 2x^3-1 => The Newton-Raphson method for eq’n
3x^2-5 x^3-5x+1=0
Results are as follows:
- Graph 17 -
We can express this information as, the root can be taken as 2.12842 with maximum error of + 0.000005. Therefore 2.128415 < X < 2.128425.
To check for the different signs,
f(2.128415) = x^3-5x+1= -0.00003
f(2.128425) = x^3-5x+1= 0.00005
- Graph 18 -
Summary
If a < 0, and b > 0, then the root lies in the interval a < x < b. This idea is called a change of sign. We will not be able to find the root exactly, but we will be able to ‘home in’ on the root until we have it to the desired degree of accuracy. This method uses a much longer procedure to find the estimated root.
The Newton Raphson method does not need a change of sign, but instead uses the tangent to the graph at a known point to provide a better estimate for the root of the equation.
If the gradient = 0 at the starting point then no solution can be found by this method because we cannot divide by 0.
This method uses a much quicker procedure to find the root.
This is an alternative method that rearranges the original question into two equations, a straight line and a curve, and then finds where these meet.
Performing this iteration produces two possible results:
1. It diverges (i.e. it gets further and further away from the start). This means the rearrangement has not worked.
2. It converges (i.e. it homes in) to the root, and solves the equation.
This means that the solution may converge and provide you the solution or it may diverge. In this case a solution will not be found.