- The Modern C# Challenge
- Rod Stephens
- 233字
- 2021-08-13 15:23:59
23. Newton's method
Binary subdivision uses intervals to quickly converge on an equation's root. Newton's method, which is also called the Newton-Raphson method, uses a different technique to converge even more quickly.
The method starts with a value (x). As long as F(x) is not close enough to zero, the method uses the derivative of the function to find the slope F'(x). It then follows the tangent line at that point to the new point x' where the line intersects the X axis. The value x' becomes the method's next guess for the root. The program continues calculating new values until F(x) is close enough to 0.
Finding the point of intersection between the tangent line and the X axis is easier than you might think. If you start with the value xi, you simply use the following equation to find the next value, xi+1:
Here, F is the function and F' is its derivative.
Write a program that uses Newton's method to find roots for equations. Make the equation and its derivative delegate parameters to the main method so you can easily pass different equations to the method. Use the program to find the roots for the following equations:
In case you don't remember your calculus, the derivatives of those functions are the following:
For extra credit, make the program draw the equations and their roots.
- 奧妙的數(shù)學(xué)問(wèn)答
- Blockchain for Business 2019
- 數(shù)學(xué)可以很有趣:科學(xué)新悅讀文叢(套裝全5冊(cè))
- 數(shù)學(xué)建模與數(shù)學(xué)規(guī)劃:方法、案例及編程實(shí)戰(zhàn)(Python+COPT/Gurobi實(shí)現(xiàn))
- The Modern C# Challenge
- 數(shù)理邏輯
- 數(shù)字乾坤
- 隨機(jī)數(shù)學(xué)及其應(yīng)用
- CAE分析大系:ANSYS疑難問(wèn)題實(shí)例詳解
- 迷人的數(shù)學(xué)(全2冊(cè))
- 圖解數(shù)學(xué)思維訓(xùn)練課:建立孩子的數(shù)學(xué)模型思維(多步計(jì)算應(yīng)用訓(xùn)練課)
- 數(shù)學(xué)多大點(diǎn)事兒
- 說(shuō)不盡的圓周率
- 你沒(méi)想到的數(shù)學(xué)
- 基于ANSYS的信號(hào)和電源完整性設(shè)計(jì)與分析(第2版)