butiran

scanning method

intro

The simplest way to find a root of an equation is by scanning root candidates from an intial value, e.g. $x = x_a$, with increment $\Delta x$ until sign of the function change from previously ${\rm sign}(f(x_a))$, or if possible until $f(x) = 0$ (Rahmansyah & Ahhad, 2013). It is a typical solution in optics if met the physical limit of a resolution (Rom39, 2015).

example

flowchart

algorithm

  1. Start.
  2. Define $x_a$, $x_b$, $\Delta x$.
  3. Initiate $x = x_a$.
  4. Caculate $s_1 = {\rm sign}(f(x))$.
  5. Caculate $s_2 = {\rm sign}(f(x + \Delta x))$.
  6. If $s_1 s_2 < 0$ go to to Step 11.
  7. Advance $x$ with $\Delta x$.
  8. If $x \le x_b$ go to Step 4.
  9. Display no root found.
  10. Go to Step 13.
  11. Calculate ${\rm root} = x + \frac12 \Delta x$.
  12. Display root value.
  13. End.

code

challenges

refs