Secant method

The first two iterations of the secant method. The red curve shows the function f, and the blue lines are the secants. For this particular case, the secant method will not converge to the visible root.

In numerical analysis, the secant method is a root-finding algorithm that uses a succession of roots of secant lines to better approximate a root of a function f. The secant method can be thought of as a finite-difference approximation of Newton's method. However, the secant method predates Newton's method by over 3000 years.[1]

The method

For finding a zero of a function f, the secant method is defined by the recurrence relation.

As can be seen from this formula, two initial values x0 and x1 are required. Ideally, they should be chosen close to the desired zero.

Derivation of the method

Starting with initial values x0 and x1, we construct a line through the points (x0, f(x0)) and (x1, f(x1)), as shown in the picture above. In slope–intercept form, the equation of this line is

The root of this linear function, that is the value of x such that y = 0 is

We then use this new value of x as x2 and repeat the process, using x1 and x2 instead of x0 and x1. We continue this process, solving for x3, x4, etc., until we reach a sufficiently high level of precision (a sufficiently small difference between xn and xn−1):

Convergence

The iterates of the secant method converge to a root of if the initial values and are sufficiently close to the root. The order of convergence is , where

is the golden ratio. In particular, the convergence is super linear, but not quite quadratic.

This result only holds under some technical conditions, namely that be twice continuously differentiable and the root in question be simple (i.e., with multiplicity 1).

If the initial values are not close enough to the root, then there is no guarantee that the secant method converges. There is no general definition of "close enough", but the criterion has to do with how "wiggly" the function is on the interval . For example, if is differentiable on that interval and there is a point where on the interval, then the algorithm may not converge.

Comparison with other root-finding methods

The secant method does not require that the root remain bracketed, like the bisection method does, and hence it does not always converge. The false position method (or regula falsi) uses the same formula as the secant method. However, it does not apply the formula on and , like the secant method, but on and on the last iterate such that and have a different sign. This means that the false position method always converges; however, only with a linear order of convergence. Bracketing with a super-linear order of convergence as the secant method can be attained with improvements to the false position method (see Regula falsi § Improvements in regula falsi) such as the ITP method or Illinois method.

The recurrence formula of the secant method can be derived from the formula for Newton's method

by using the finite-difference approximation, for a small :

The secant method can be interpreted as a method in which the derivative is replaced by an approximation and is thus a quasi-Newton method.

If we compare Newton's method with the secant method, we see that Newton's method converges faster (order 2 against φ ≈ 1.6). However, Newton's method requires the evaluation of both and its derivative at every step, while the secant method only requires the evaluation of . Therefore, the secant method may occasionally be faster in practice. For instance, if we assume that evaluating takes as much time as evaluating its derivative and we neglect all other costs, we can do two steps of the secant method (decreasing the logarithm of the error by a factor φ2 ≈ 2.6) for the same cost as one step of Newton's method (decreasing the logarithm of the error by a factor 2), so the secant method is faster. If, however, we consider parallel processing for the evaluation of the derivative, Newton's method proves its worth, being faster in time, though still spending more steps.

Generalization

Broyden's method is a generalization of the secant method to more than one dimension.

The following graph shows the function f in red and the last secant line in bold blue. In the graph, the x intercept of the secant line seems to be a good approximation of the root of f.

Computational example

Below, the secant method is implemented in the Python programming language.

It is then applied to find a root of the function f(x) = x2 − 612 with initial points and

def secant_method(f, x0, x1, iterations):
    """Return the root calculated using the secant method."""
    for i in range(iterations):
        x2 = x1 - f(x1) * (x1 - x0) / float(f(x1) - f(x0))
        x0, x1 = x1, x2
        # Apply a stopping criterion here (see below)
    return x2

def f_example(x):
    return x ** 2 - 612

root = secant_method(f_example, 10, 30, 5)

print(f"Root: {root}")  # Root: 24.738633748750722

It is very important to have a good stopping criterion above, otherwise, due to limited numerical precision of floating point numbers, the algorithm can return inaccurate results if running for too many iterations. For example, the loop above can stop when one of these is reached first: abs(x0 - x1) < tol, or abs(x0/x1-1) < tol, or abs(f(x1)) < tol. [2]

Notes

  1. ^ Papakonstantinou, Joanna; Tapia, Richard (2013). "Origin and evolution of the secant method in one dimension". American Mathematical Monthly. 120 (6): 500–518. doi:10.4169/amer.math.monthly.120.06.500. JSTOR 10.4169/amer.math.monthly.120.06.500. S2CID 17645996 – via JSTOR.
  2. ^ "MATLAB TUTORIAL for the First Course. Part 1.3: Secant Methods".

See also

References

Read other articles:

Houari Boumédienneهواري بومدينHouari Boumediene Presiden Aljazair ke-4Masa jabatan19 Juni 1965 – 27 Desember 1978 PendahuluAhmed Ben BellaPenggantiRabah Bitat Informasi pribadiLahir23 Agustus 1932dekat Héliopolis, Provinsi Guelma, AljazairMeninggal27 Desember 1978(1978-12-27) (umur 46)Aljir, AljazairPartai politikDewan Revolusioner (Aljazair)Sunting kotak info • L • B Houari Boumédienne (nama resminya Mohamed Ben Brahim Boukharouba) (23 Agustus 1932 …

Feeder LRT Musi Emas Koridor 3 melewati jalan Kol. Sai Husin Feeder LRT Musi Emas merupakan layanan pengumpan modern pertama di kota Palembang. Feeder ini hadir untuk melayani masyarakat yang berada di wilayah pemukiman padat maupun di pinggir kota agar dapat menjangkau transportasi umum yang lebih besar, terutama LRT Sumatera Selatan. Sesuai dengan namanya, Feeder ini diprioritaskan agar dapat meningkatkan jumlah pengguna LRT. Sejarah Feeder LRT diperkenalkan pada acara Gerakan Nasional Kembali…

Elang sulawesi Individu anak di Cagar Alam Tangkoko, Sulawesi Utara Status konservasi Risiko Rendah (IUCN 3.1)[1] Klasifikasi ilmiah Kerajaan: Animalia Filum: Chordata Kelas: Aves Ordo: Accipitriformes Famili: Accipitridae Genus: Nisaetus Spesies: N. lanceolatus[2] Nama binomial Nisaetus lanceolatusTemminck & Schlegel, 1844 Sinonim Spizaetus lanceolatus Elang sulawesi (Nisaetus lanceolatus) adalah spesies burung pemangsa dalam famili Accipitridae. Burung ini endemik…

Bendera Kerajaan Konawe Kerajaan Konawe adalah kerajaan yang pernah berdiri di Kabupaten Konawe. Penduduknya adalah Suku Tolaki.[1] Raja-rajanya bergelar Mokole. Masa kejayaannya dicapai pada masa pemerintahan Mokole Tebawo.[2] Pusat pemerintahan Kerajaan Konawe adalah di Kecamatan Unaaha, Kabupaten Konawe.[3] Kerajaan ini menggunakan sistem pemerintahan yang disebut Siwole Mbatohu dan Pitu Dula Batu.[4] Masyarakat Kerajaan Konawe bekerja sebagai petani padi dan c…

Measure of prices in different countries Purchasing power parity (PPP)[1] is a measure of the price of specific goods in different countries and is used to compare the absolute purchasing power of the countries' currencies. PPP is effectively the ratio of the price of a basket of goods at one location divided by the price of the basket of goods at a different location. The PPP inflation and exchange rate may differ from the market exchange rate because of tariffs, and other transaction c…

Dewan Perwakilan Rakyat Daerah Kota PayakumbuhDewan Perwakilan RakyatKota Payakumbuh2019-2024JenisJenisUnikameral SejarahSesi baru dimulai2 September 2019PimpinanKetuaHamdi Agus, S.T. (PKS) sejak 8 Oktober 2019 Wakil Ketua IWulan Denura, S.St. (Gerindra) sejak 8 Oktober 2019 Wakil Ketua IIArmen Faindal, S.H. (Demokrat) sejak 8 Oktober 2019 KomposisiAnggota25Partai & kursi  PDI-P (1)   NasDem (2)   PKB (1)   Demokrat (3)   PAN (2) …

Institut national du service publicLogo de l'Institut national du service public.HistoireFondation 1er janvier 2022StatutType École d'applicationForme juridique Établissement public administratifPrésident Ferdinand Mélin-Soucramanien (depuis 2022)Directeur Maryvonne Le Brignonen (depuis 2022)Membre de Conférence des grandes écolesSite web insp.gouv.frChiffres-clésBudget 45,6 millions d’euros (2022)LocalisationPays FranceLocalisation Strasbourg, Parismodifier - modifier le code - modifie…

Pour les articles homonymes, voir Sentinelle. Cet article concerne un événement en cours. Ces informations peuvent manquer de recul, changer à mesure que l’événement progresse ou ne pas prendre en compte des développements récents. Le titre lui-même peut être provisoire. N’hésitez pas à l’améliorer en veillant à citer vos sources.La dernière modification de cette page a été faite le 27 mars 2024 à 17:58. Opération Sentinelle Pendant le plan Vigipirate Emblème de l'opéra…

العلاقات الأردنية الناوروية الأردن ناورو   الأردن   ناورو تعديل مصدري - تعديل   العلاقات الأردنية الناوروية هي العلاقات الثنائية التي تجمع بين الأردن وناورو.[1][2][3][4][5] مقارنة بين البلدين هذه مقارنة عامة ومرجعية للدولتين: وجه المقارنة الأردن …

Questa voce o sezione sull'argomento partigiani non cita le fonti necessarie o quelle presenti sono insufficienti. Puoi migliorare questa voce aggiungendo citazioni da fonti attendibili secondo le linee guida sull'uso delle fonti. Segui i suggerimenti del progetto di riferimento. Brigata MaiellaDistintivo da braccio Descrizione generaleAttiva1943-1945 Nazione Italia Servizio Regio Esercito[1] RuoloUnità di partigiani inquadrata nella VIII Armata britannica Dimensione1360 nell'…

Kabinet Indonesia Bersatu IIKabinet Pemerintahan IndonesiaDibentuk22 Oktober 2009Diselesaikan20 Oktober 2014Struktur pemerintahanKepala negaraSusilo Bambang YudhoyonoKepala pemerintahanSusilo Bambang YudhoyonoWakil kepala pemerintahanBoedionoJumlah menteri34Jumlah wakil menteri17Partai anggotaPartai DemokratPartai Golongan KaryaPartai Keadilan SejahteraPartai Amanat NasionalPartai Persatuan PembangunanPartai Kebangkitan BangsaIndependenSejarahPendahuluKabinet Indonesia BersatuPenggantiKabinet Ke…

В другом языковом разделе есть более полная статья The History of Tom Jones, a Foundling (англ.). Вы можете помочь проекту, расширив текущую статью с помощью перевода История Тома Джонса, найдёнышаангл. The History of Tom Jones, a Foundling Жанр роман воспитания и плутовской роман Автор Генри Филд…

Heritage-listed building in Sydney, Australia 93–97 Macquarie Street, SydneySandstone portico of the former Health Department building, now part of the Sir Stamford Hotel, Circular Quay.Location93–97 Macquarie Street, Sydney central business district, City of Sydney, New South Wales, AustraliaCoordinates33°51′44″S 151°12′46″E / 33.8621°S 151.2128°E / -33.8621; 151.2128Built1896–1898ArchitectWalter Liberty VernonNSW Government ArchitectArchitectural style…

Aircraft used by presidents and prime ministers 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: Air transports of heads of state and government – news · newspapers · books · scholar · JSTOR (February 2019) (Learn how and when to remove this template message) Air transports for heads of state and government are,…

Pour les articles homonymes, voir Sauzay. le Sauzay La rivière Sauzay à La Chapelle-Saint-André. L'arrondissement de Clamecy dans le département de la Nièvre le Sauzay sur OpenStreetMap. Caractéristiques Longueur 25,2 km [1] Bassin 199 km2 [1] Bassin collecteur la Seine Débit moyen 0,97 m3/s (Corvol-l'Orgueilleux) [2] Régime pluvial Cours Source source · Localisation Oudan · Altitude 257 m · Coordonnées 47° 20′ 50″ N, 3° 20′ 58″&…

Синелобый амазон Научная классификация Домен:ЭукариотыЦарство:ЖивотныеПодцарство:ЭуметазоиБез ранга:Двусторонне-симметричныеБез ранга:ВторичноротыеТип:ХордовыеПодтип:ПозвоночныеИнфратип:ЧелюстноротыеНадкласс:ЧетвероногиеКлада:АмниотыКлада:ЗавропсидыКласс:Птиц…

Louang Namtha ຫລວງນໍ້າທາDistrik & munisipalitasDistrik NamthaLouang NamthaLetak di LaosKoordinat: 20°57′N 101°24′E / 20.950°N 101.400°E / 20.950; 101.400NegaraLaosWilayah administrasiProvinsi Louang NamthaPopulasi (2015) • Total28.551 • AgamaBuddhaZona waktuUTC+7 (ICT) Koordinat: 20°57′N 101°24′E / 20.950°N 101.400°E / 20.950; 101.400 Louang Namtha (bahasa Laos: ມ. ຫລວງ…

Questa voce o sezione sull'argomento edizioni di competizioni calcistiche non cita le fonti necessarie o quelle presenti sono insufficienti. Puoi migliorare questa voce aggiungendo citazioni da fonti attendibili secondo le linee guida sull'uso delle fonti. Segui i suggerimenti del progetto di riferimento. Türkiye 1.Lig 1999-2000 Competizione Türkiye 1.Lig Sport Calcio Edizione 42ª Organizzatore TFF Luogo  Turchia Partecipanti 18 Formula 1 girone all'italiana Risultati Vincitore …

Antolín Alcaraz Informasi pribadiNama lengkap Antolín Alcaraz ViverosTanggal lahir 30 Juli 1982 (umur 41)Tempat lahir San Roque González, ParaguayTinggi 187 m (613 ft 6 in)[1]Posisi bermain Bek TengahInformasi klubKlub saat ini LibertadNomor 5Karier senior*Tahun Tim Tampil (Gol)2000–2001 Teniente Fariña 2001–2002 Racing Club 0 (0)2002 → Fiorentina (pinjaman) 0 (0)2003–2007 Beira-Mar 112 (5)2007–2010 Club Brugge 68 (5)2010–2013 Wigan Athletic 68 (3)2013…

A.S. Byatt (2007) Dame Antonia Susan Duffy, nata Antonia Susan Drabble (Sheffield, 24 agosto 1936 – Londra, 16 novembre 2023[1]), è stata una scrittrice e critica letteraria britannica, meglio nota con il nome di Antonia Susan (o semplicemente A. S.) Byatt. L'opera per la quale è maggiormente conosciuta è il romanzo del 1990 Possessione. Una storia romantica. Indice 1 Biografia 2 Romanzi 3 Racconti 4 Critica letteraria 5 Opere 5.1 Romanzi 5.2 Racconti brevi 5.2.1 Edizioni originali …

Kembali kehalaman sebelumnya