There's nothing like a zero? - Solution
Enter the function y(t)=(1-t)^6
Click on y(t) in the menu and then on the submenu (...) and select 'General'Enter the function as above and click OK.
Change the View settings so that the derivative is not shown
Select the View Icon and from the View window turn off the display Derivative switch.
Change the t-axis and the Sample interval
Click on the settings icon and then the submenu (...) and select 't-axis' and change the range to 0 to 2. After selecting OK then select 'Sample Interval' from the submenu and change the value to 0.001 and press OK.
The graph plotted with plotXpose for 0<=t<=2 with a sampling interval 0.001 is
Perform Zero Finding
Now click on the Mode icon and then the submenu (...) and select 'Zero Find'. Change the Accuracy value (No. of significant figures) to 10 and the Maximum no. of iterations to 100 and press OK.
Click on the t axis near the point t=1.
An example of the output for Newton-Raphson is:
The Newton-Raphson method failed because the derivative value became too small.
The sequence of values found was
( n, t , f(t))
(0, 0.88888889551, 1.88167575022E-006)
(1, 0.90740741293, 6.30169401517E-007)
(2, 0.92283951077, 2.11042457534E-007)
(3, 0.93569959231, 7.06776920218E-008)
(4, 0.94641632692, 2.36698160545E-008)
(5, 0.9553469391, 7.92697350506E-009)
(6, 0.96278911592, 2.65472738804E-009)
(7, 0.96899092993, 8.89062830894E-010)
(8, 0.97415910828, 2.97745343208E-010)
(9, 0.97846592356, 9.97143130064E-011)
(10, 0.9820549363, 3.33941216719E-011)
(11, 0.98504578025, 1.11836237809E-011)
(12, 0.98753815021, 3.74537297619E-012)
(13, 0.98961512518, 1.25431783164E-012)
(14, 0.99134593765, 4.20068503930E-013)
(15, 0.99278828137, 1.40680092033E-013)
(16, 0.99399023448, 4.71134781812E-014)
(17, 0.99499186206, 1.57782085173E-014)
(18, 0.99582655172, 5.28409010807E-015)
(19, 0.99652212643, 1.76963108579E-015)
(20, 0.99710177203, 5.92645870102E-016)
(21, 0.99758481002, 1.98475902785E-016)
(22, 0.99798734169, 6.64691782625E-017)
(23, 0.99832278474, 2.22603933117E-017)
(24, 0.99860232062, 7.45496068021E-018)
(25, 0.99883526718, 2.49665124803E-018)
(26, 0.99902938932, 8.36123451443E-019)
(27, 0.99919115776, 2.80016052143E-019)
(28, 0.9993259648, 9.37768093007E-020)
The sequence of values found was
( n, t , f(t))
(0, 0.88888889551, 1.88167575022E-006)
(1, 0.90740741293, 6.30169401517E-007)
(2, 0.92283951077, 2.11042457534E-007)
(3, 0.93569959231, 7.06776920218E-008)
(4, 0.94641632692, 2.36698160545E-008)
(5, 0.9553469391, 7.92697350506E-009)
(6, 0.96278911592, 2.65472738804E-009)
(7, 0.96899092993, 8.89062830894E-010)
(8, 0.97415910828, 2.97745343208E-010)
(9, 0.97846592356, 9.97143130064E-011)
(10, 0.9820549363, 3.33941216719E-011)
(11, 0.98504578025, 1.11836237809E-011)
(12, 0.98753815021, 3.74537297619E-012)
(13, 0.98961512518, 1.25431783164E-012)
(14, 0.99134593765, 4.20068503930E-013)
(15, 0.99278828137, 1.40680092033E-013)
(16, 0.99399023448, 4.71134781812E-014)
(17, 0.99499186206, 1.57782085173E-014)
(18, 0.99582655172, 5.28409010807E-015)
(19, 0.99652212643, 1.76963108579E-015)
(20, 0.99710177203, 5.92645870102E-016)
(21, 0.99758481002, 1.98475902785E-016)
(22, 0.99798734169, 6.64691782625E-017)
(23, 0.99832278474, 2.22603933117E-017)
(24, 0.99860232062, 7.45496068021E-018)
(25, 0.99883526718, 2.49665124803E-018)
(26, 0.99902938932, 8.36123451443E-019)
(27, 0.99919115776, 2.80016052143E-019)
(28, 0.9993259648, 9.37768093007E-020)
We see that plotXpose has reported a failure to converge to the required accuracy.
This sequence will be saved to your clipboard so if you want to save the sequence that you obtained then simply paste it into a document.
Newton-Raphson method for solving equations
Pages 283 to 286 of Mathematics for Electrical Engineering and Computing explains the Newton-Raphson method for solving equations, which can be expressed using the following algorithm:
- Write the equation in the form f(t)=0
- Take a guess at the solution, t0.
- Calculate tnplus1= tn - f(tn)/f'(tn) until some convergence criterion is satisfied.
Applying Newton-Raphson where f(t) = (1-t)^6
Considering our function f(t) = (1-t)^6, where we want to find a solution to the equation f(t)=0, then f'(t) = -6*(1-t)^5. Step (3) of the Newton Raphson algorithm gives us tnplus1= tn + (1-tn)^6)/(6*(1-tn)^5 , which simplifies to tnplus1= tn + (1-tn)/6 for tn!=1. i.e
tnplus1=1/6+5*tn/6, where tn!=1 (1)
Convergence of Newton-Raphson
Usually, providing a suitable starting value is chosen, Newton-Raphson converges quadratically, i.e. the relative error, between the current approximation and the root, is squared at each step, resulting in the number of accurate digits roughly doubling.Convergence of Newton-Raphson where f(t) = (1-t)^6
We can see that the expression (1) in this case will converge only linearly, because the recurrence relation obtained is a linear function.Even with such a slower convergence rate we might expect that plotXpose would converge to the required root. However plotXpose has ceased the calculation before reaching the required accuracy and reported that the derivative is too small. This result is because the plotXpose app does not perform symbolic manipulations, so the simplification that we were able to do in Step (3) above has not been used. plotXpose is calculating tnplus1= tn - f(tn)/f'(tn) i.e.
tnplus1= tn + (1-tn)^6)/(6*(1-tn)^5
The derivative in the denominator of the second term on the right hand side of the recurrence relation will become smaller than the precision of a double floating-point number, as tn approaches the root of 1. In our example this has happened before we reached the desired level of accuracy for the root, and the value found by plotXpose after 28 iterations is only accurate to 3 significant figures.
The problem of Root Multiplicity
The function we have considered has 6 repeated roots at t=1. The problem we have encountered here may occur wherever there is root multiplicity, i.e. repeated roots. Similar numerical issues can be encountered were a function has roots that are very close together. In such cases alternative, more advanced numerical methods for root finding - beyond the scope of our considerations, may provide a more suitable numerical approach to zero finding.plotXpose app is available on Google Play and App Store
Google Play and the Google Play logo are trademarks of Google LLC.
A version will shortly be available for Windows.
A version will shortly be available for Windows.
plotXpose app is a companion to the book Mathematics for Electrical Engineering and Computing by Mary Attenborough, published by Newnes, 2003.