Share to: share facebook share twitter share wa share telegram print page

牛顿法

牛顿法(英語:Newton's method)又称为牛顿-拉弗森方法(英語:Newton-Raphson method),它是一种在实数域和复数域上近似求解方程的方法。方法使用函数泰勒级数的前面几项来寻找方程的根。

起源

牛顿法最初由艾萨克·牛頓在《流数法》(Method of Fluxions,1671年完成,在牛顿去世后於1736年公开发表)中提出。约瑟夫·鮑易也曾于1690年在Analysis Aequationum中提出此方法。

方法说明

蓝线表示方程而红线表示切线。可以看出更靠近所要求的根

首先,选择一个接近函数零点,计算相应的和切线斜率(这里表示函数导数)。然后我们计算穿过点并且斜率为的直线和轴的交点的坐标,也就是求如下方程的解:

我们将新求得的点的坐标命名为,通常会比更接近方程的解。因此我们现在可以利用开始下一轮迭代。迭代公式可化简为如下所示:

已有证明牛顿迭代法的二次收敛[1]必须满足以下条件:
; 对于所有,其中为区间[αr, α + r],且在区间其中内,即 的;
对于所有是连续的;
足够接近根 α

然而当处有m重根时,这时牛顿法会降为线性收敛,虽然使用牛顿法也可以继续算下去,但收敛速度会减慢。[2]

其它例子

第一个例子

求方程的根。令,两边求导,得。由于,则,即,可知方程的根位于之间。我们从开始。

第二个例子

牛顿法亦可发挥与泰勒展开式,对于函式展开的功能。

次方根。

而a的m次方根,亦是x的解,

以牛顿法来迭代:

(或

應用

求解最值問題

牛頓法也被用於求函數的極值。由於函數取極值的點處的導數值為零,故可用牛頓法求導函數的零點,其疊代式為

求拐点的公式以此类推

電腦程式

可以用程式寫出牛頓法:

例題: 求x

用Python:

from math import pow
def f(x):
    y = pow(x,3)-(10*x*x)+x+1
    return y
def dx(x):
    y = (3*x*x)-(20*x)+1
    return y
x = 1
for i in range(1000):
    x = x - (f(x)/dx(x))
print(x)

用C語言:

#include <stdio.h>
#include <math.h>
double x = 1.0;
double f(double x){
    double y = pow(x,3)-(10*x*x)+x+1;
    return y;}
double dx(double x){
    double y = (3*x*x)-(20*x)+1;
    return y;}
int main (){
    for(int i=0;i<1000;i++){
    x = x - (f(x)/dx(x));}
    printf(" %f",x);
    return 0;
}

只要修改f(x)和dx(x)函數就可以解其他方程式

註解

  1. ^ 存档副本 (PDF). [2018-06-26]. (原始内容存档 (PDF)于2021-04-24). 
  2. ^ 张宏伟,金光日,施吉林,董波 (编). 计算机科学计算 2013年第2版. 北京: 高等教育出版社. 2005: 138. ISBN 9787040365955. 

外部連結

Read other articles:

هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (يناير 2020) إن حيادية وصحة هذه المقالة محلُّ خلافٍ. ناقش هذه المسألة في صفحة نقاش المقالة، ولا تُزِل هذا القالب من غير توافقٍ على ذلك. (نقاش) مقدمة هذه المقالة بحاجة لإعاد...

Those Awful HatsFilm lengkapSutradara D. W. Griffith ProduserDitulis oleh D. W. Griffith PemeranMack SennettSinematograferG. W. BitzerTanggal rilis 25 Januari 1909 (1909-01-25) DurasiDi bawah 3 menit[1]Negara Amerika Serikat BahasaFilm bisu dengan antar judul Inggris Cuplikan akhir. Those Awful Hats adalah sebuah film komedi pendek Amerika Serikat tahun 1909 garapan D.W. Griffith dan menampilkan Mack Sennett. Sebuah cetakan dari film tersebut disimpan dalam arsip film Perpustakaa...

Estação de South Ruislip Edifício da estaçãoEdifício da estação Transportes: Metropolitano de Londres Linhas: Central Line Local: South Ruislip (Borough londrino de Hillingdon, Londres) Zona tarifária: Travelcard Zone 5 Número deplataformas: 2 Inaugurada em: 1908 (Great Western and Great Central Joint Railway) South Ruislip é uma estação servida pela Central Line do Metropolitano de Londres e pela Chiltern Railways em South Ruislip no noroeste de Londres. A estação é controlad...

Questa voce sull'argomento geografia della Francia è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. La mappa delle 8 ZEAT della Métropole fino al 2016. La mappa delle 8 ZEAT della Métropole, dal 2016 esse non sono cambiate, ma le loro delimitazioni corrispondono più con quelle delle regioni. Una zona di studio e di amministrazione del territorio (abbreviata ZEAT, francese: Zone d'études et d'aménagement du territoire) è una macroripartizione stati...

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Oktober 2022. Beliau adalah Al-Asla' bin Syarik bin 'Auf At-Tamimi Al-A'raji (Bahasa Arab : الأسلع بن شريك بن عوف التميمي الأعرجي), salah satu sahabat Nabi yang termasuk sebagai pelayan/khadim dari Nabi sendiri, bertugas untuk men...

Diocesan bishop in the Church of England Bishop of BristolBishopricanglican Incumbent:Vivienne FaullLocationEcclesiastical provinceCanterburyResidenceBishop's House, WinterbourneInformationEstablished1542 (and 1897)DioceseBristolCathedralBristol Cathedral Christianity portal The Bishop of Bristol heads the Church of England Diocese of Bristol in the Province of Canterbury, in England. The present diocese covers parts of the counties of Somerset and Gloucestershire together with a small area o...

United Nations resolution adopted in 2010 UN Security CouncilResolution 1933UNOCI personnel in Côte d'IvoireDate30 June 2010Meeting no.6,350CodeS/RES/1933 (Document)SubjectThe situation in Côte d'IvoireVoting summary15 voted forNone voted againstNone abstainedResultAdoptedSecurity Council compositionPermanent members China France Russia United Kingdom United StatesNon-permanent members Austria Bosnia–Herzegovina Brazil Gabon Japan...

Protein-coding gene in the species Homo sapiens RARAAvailable structuresPDBOrtholog search: PDBe RCSB List of PDB id codes1DKF, 1DSZ, 3A9E, 3KMR, 3KMZ, 4DQM, 5K13IdentifiersAliasesRARA, NR1B1, RAR, retinoic acid receptor alpha, RARalphaExternal IDsOMIM: 180240 MGI: 97856 HomoloGene: 20262 GeneCards: RARA Gene location (Human)Chr.Chromosome 17 (human)[1]Band17q21.2Start40,309,180 bp[1]End40,357,643 bp[1]Gene location (Mouse)Chr.Chromosome 11 (mouse)[2]Band11 D&#...

Torricelli language branch of Papua New Guinea OneWest WapeiGeographicdistributionnorth-central Sandaun Province, Papua New GuineaLinguistic classificationTorricelliOneSubdivisions One Seta Seti Glottologwest2580The Torricelli languages as classified by Foley (2018) The One or West Wapei languages constitute a branch of the Torricelli language family. They are spoken in north-central Sandaun Province, Papua New Guinea. Languages Foley (2018) lists:[1] One, Seta, Seti Vocabulary compar...

South Carolina's gun law Gun laws in South CarolinaConstitutionConstitution sectionsArticle I, Section 20Synopsis A well regulated militia being necessary to the security of a free State, the right of the people to keep and bear arms shall not be infringed. As, in times of peace, armies are dangerous to liberty, they shall not be maintained without the consent of the General Assembly. The military power of the State shall always be held in subordination to the civil authority and be governed ...

Société française du tunnel routier du Fréjus Création 1962 Dates clés Janvier 1974 : co-concessionnaire du tunnel du FréjusAvril 1993 : concessionnaire de l'autoroute de la Maurienne Fondateurs Pierre Dumas et collectivités territoriales Forme juridique Société anonyme d'économie mixte locale à conseil d'administration Siège social Modane France Direction Thierry Repentin (président)Didier Simonnet (directeur général)[R 1] Actionnaires État Français Activité...

Aspect of the history of humanism Part of a series onHumanismLeonardo da Vinci's Vitruvian Man (c. 1490) History Renaissance humanism in Northern Europe in France Humanist Manifesto Forms Buddhist Christian Existential Integral Jewish Marxist Neo- Pan- Personism Rationalist Religious Secular Super- Theistic Trans- Transcendental Universal Organizations Humanist International Humanists International American Humanist Association Humanists UK Humanistischer Verband Deutschlands Humanist S...

Railway station in Shropshire, England KnightonWelsh: TrefyclawddGeneral informationLocationKnighton, Shropshire CouncilEnglandCoordinates52°20′42″N 3°02′31″W / 52.345°N 3.042°W / 52.345; -3.042Grid referenceSO291723Managed byTransport for WalesPlatforms2Other informationStation codeKNIClassificationDfT category F1Key dates1861Knighton Railway station opened1865Present station openedPassengers2017/18 21,4402018/19 21,8922019/20 20,9882020/21 1,1182021/22 9,...

  Службовий список статей, створений для координації робіт з розвитку теми.  Це попередження не встановлюється на інформаційні списки і глосарії. Список інституцій Міністерства культури України (2019 рік) Міністерство культури України Державне агентство Україн...

Socket used as part of a pivot or hinge For the fish, see Gudgeon (fish). For the submarines, see USS Gudgeon. This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Gudgeon – news · newspapers · books · scholar · JSTOR (September 2022) (Learn how and when to remove this template message) Gudgeon with a pintle A gu...

Species of plant Andrachne telephioides Scientific classification Kingdom: Plantae Clade: Tracheophytes Clade: Angiosperms Clade: Eudicots Clade: Rosids Order: Malpighiales Family: Phyllanthaceae Genus: Andrachne Species: A. telephioides Binomial name Andrachne telephioidesL. Andrachne telephioides is a species of shrub in the family Phyllanthaceae. They have a self-supporting growth form and simple, broad leaves. Individuals can grow to 12 cm.[1][2] Sources  Th...

Recreational voyages along the Turkish Riviera This article contains content that is written like an advertisement. Please help improve it by removing promotional content and inappropriate external links, and by adding encyclopedic content written from a neutral point of view. (May 2021) (Learn how and when to remove this template message) Traditional two-masted gulet schooner visiting a cove in Gökova as part of the Blue Voyage The Isle of Kekova is among the popular destinations of the Blu...

Chinese dictionary of orthography ZitongZitong title page in clerical scriptChinese nameChinese字通Literal meaningcharacter masteryTranscriptionsStandard MandarinHanyu PinyinZìtōngWade–GilesTzu-t'ungYue: CantoneseJyutpingZi4tung1Southern MinHokkien POJJīthongMiddle ChineseMiddle ChineseDzithuwngKorean nameHangul字通Hanja자통TranscriptionsMcCune–ReischauerChat'ongJapanese nameKanji字通HiraganaじつうTranscriptionsRevised HepburnJitsū The (1254) Zitong 字通 or Mastery of Cha...

Dutch palaeontologist, botanist and geologist (1924–2010) Thomas van der HammenBorn(1924-09-27)27 September 1924Schiedam, NetherlandsDied12 March 2010(2010-03-12) (aged 85)Chía, Cundinamarca, ColombiaNationalityDutchAlma materLeiden UniversityKnown forGeology, palaeontologySpouseAnita MaloChildrenCornelis, María ClaraAwardsPremio a la vida y obra, fondo para la protección del medio ambiente, 1995Scientific careerFieldsGeology, palaeontology of ColombiaThesisLate-glacial fl...

Largest intermittent lake on Titan Nakuru LacunaCassini view of Titan's north polar seas and lakes in the near infrared.Feature typeLacusCoordinates65°49′N 94°00′W / 65.81°N 94°W / 65.81; -94Diameter175 km Nakuru Lacuna is the largest intermittent lake on Titan.[1] It is located at 65.81°N and 94°W[2] on Titan's surface and is 175 km in length. The lake is composed of liquid ethane and methane,[3] and was detected by the Cassini–Huyg...

Kembali kehalaman sebelumnya