Universitas : UIN Maulana Malik Ibrahim Malang Prodi : Teknik Informatika Fakultas : Sains dan Teknologi Dosen : Prof. Dr. SUHARTONO, M.Kom

A function is a mechanism for turning any given input into an output. Zero finding is about going the other way: given an output value, find the corresponding input. As an example, consider the exponential function \(e^x\). Given a specific input, say \(x=2.135\) you can easily compute the corresponding output:

exp(2.135)
## [1] 8.457047
## [1] 8.457047

But suppose the information you have at hand is in the form of an output from the function, say \(e^{x_0} = 4.93\). We don’t (yet) know \(x_0\) but, whatever it might be, we know that \(e^{x_0}\) will produce the value 4.93.

How do you find the specific inputk \(x_0\) that will produce that output? The answer typically presented in high school is to apply another function, \(\ln()\), to the output:

log(4.93)
## [1] 1.595339
## [1] 1.595339

To confirm that the result 1.595339 is correct, apply the exponential function to it and check that the output is the same as the original, given output 4.93.

exp(1.595339)
## [1] 4.93
## [1] 4.93

This process works because we happen to have a function at hand, the logarithm, that is perfectly set up to “undo” the action of the exponential function. In high school, you learned a handful of function/inverse pairs: \(exp()\) and \(log()\) as you’ve just seen, \(sin()\) and \(arcsin()\), square and square root, etc.

Another situation that is usually addressed in high school is inverting low-order polynomial functions. For instance, suppose your modeling function is \(g(x) \equiv 1.7 - 0.85 x + 0.063 x^2\) and you seek the \(x_0\) such that \(g(x_0) = 3\). High school students are taught to approach such problems in a process using the quadratic formula. to apply the quadratic formula, you need to place the problem into a standard format, not

\(1.7 - 0.85 x + 0.063 x^2 = 3\)

but

\(0.063\, x^2 - 0.85\, x - 1.4 = 0\)

The name “zero-finding” can be a little misleading. The objective is find \(x_0\) such that \(h(x_0)=b\). In this sense, “b-finding” would be a more appropriate name. Instead of chasing after honey as “b-finding” suggests, we reformat the problem into finding \(x_0\) such that \(h(x_0)-b = 0\).In other words, we look for zeros of the function \(h(x)-b\).

One reason that low-order polynomials are popular in modeling is that such operations are straightforward.

If none of the high-school approaches are suited to your modeling function, as is often the case, you can still carry out the zero-finding operation.