Content deleted Content added
→Examples: new section |
|||
Line 75:
Does anyone know when the bisection method was first used? The method seems quite obvious but that doesn't necessarily mean it came before other methods, like secant for example. <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/2.222.44.210|2.222.44.210]] ([[User talk:2.222.44.210|talk]]) 12:36, 2 December 2011 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
== Examples ==
This page could probably benefit from showing a couple examples. I will give a shot at creating one. [[User:Whlitt|Whlitt]] ([[User talk:Whlitt|talk]]) 18:24, 10 September 2012 (UTC)
It may be laid out something like this:
==Examples==
===Finding the root of a polynomial===
Find a root of following formula using the bisection method
:<math> f(x) = x^3 - x - 2 </math>
Find two numbers a and b s.t. f(a) and f(b) have opposite signs.
:Let a = 1 and b = 2.
:<math> f(1) = (1)^3 - (1) - 2 = -2 </math>
:<math> f(2) = (2)^3 - (2) - 2 = +4 </math>
Because the function is continuous, there must be a root within the interval [1, 2].
In the first iteration, we have
<math> a_1 = 1 </math>
<math> b_1 = 2 </math>
<math> p_1 = 1 + \frac{2-1}{2} = 1.5 </math>
<math> f(p_1) = (1.5)^3 - (1.5) - 2 = -0.125 </math>
Because <math> f(p_1) </math> is negative, <math> a = 1 </math> is replaced with <math> a = 1.5 </math> for the next iteration to ensure that f(a) and f(b) have opposite signs. As this continues, the interval between a and b will become increasingly smaller, converging on the root of the function. See this happen in the table below.
{| class="wikitable"
|-
! Iteration !! <math>a_n</math> !! <math>b_n</math> !! <math>p_n</math> !! <math>f(p_n)</math>
|-
| 1|| 1 || 2 || 1.5 || -0.125
|-
| 2|| 1.5|| 2|| 1.75|| 1.6093750
|-
| 3|| Example || Example || Example || Example
|-
| 4|| Example || Example || Example || Example
|-
| 5|| Example || Example || Example || Example
|-
| 6|| Example || Example || Example || Example
|-
| 7 || Example || Example || Example || Example
|-
| 8|| Example || Example || Example || Example
|-
| 9 || Example || Example || Example || Example
|-
| 10|| Example || Example || Example || Example
|}
[[User:Whlitt|Whlitt]] ([[User talk:Whlitt|talk]]) 19:49, 10 September 2012 (UTC)
|