0
$\begingroup$

This is my first question on this community. I am a applied scientist, not a mathematician.

I have the following simplified problem:

Let $u: [0,1] \rightarrow \mathbb{R}_+$ a real valued function and $k\in \mathbb{R}$. The function $u(\cdot)$ is decreasing and may be continuous or not. Let $x^*(k)$ the value that satisfies $$ u\left(x^*(k)\right) = k. $$

I need to get the numerical value $x^*(k)$ for any arbitrary $u(\cdot)$, using a computational Rscript.

Intuitively, I have decided to follow this procedure: I define a deviation $e(x) = k - u(x)$. Valued at $x^*(k)$, $e\left(x^*(k)\right) = 0$. Then, $x^*(k)$ minimizes the squared deviation or the absolute value deviation. $$ x^*(k) = \arg \min_{x\in [0,1]} e(x)^2. $$

The code is not the problem. I wrote a script that return the graph of function $x^*(k)$ using any decreasing function $u$, i.e. $u=ae^{-bx}$, $u=a - bx^2$, ..., or other more complicated examples.

Now, I want to known:

  1. What is the mathematical/theoretical name of this procedure?
  2. In which bibliography can I learn about that?

Thanks.

$\endgroup$
4
  • $\begingroup$ There are quite a few ways to approach this but generally-speaking your problem is not one that can be solved algorithmically. Provided your function $u$ isn't too unreasonable, you have a lot of methods at your disposal. Using a mid-point method on the intervals where $u$ is continuous would be one. How is your function $u$ defined? $\endgroup$ Commented Mar 1, 2016 at 23:50
  • $\begingroup$ I edited my question with more details about $u$ definition. $\endgroup$
    – fnd
    Commented Mar 2, 2016 at 4:32
  • $\begingroup$ Thanks! I will change to regula falsi methods. Now I known its names!!. $\endgroup$
    – fnd
    Commented Mar 2, 2016 at 19:08
  • $\begingroup$ Start from en.wikipedia.org/wiki/Root-finding_algorithm, or (even better) from any undergraduate numerical analysis book. $\endgroup$ Commented Mar 4, 2016 at 18:22

1 Answer 1

2
$\begingroup$

squaring a function to find its zeroes is generally no good idea; first you can't exploit sign changes of the function values to conclude that a certain intervall must contain a zero (or discontinuity with sign change for left and right limit); another problem is that numeric precision gets worse because the slopes vanish at the zeros of the squared function.

Worst case scenario is that a sign transition may not result in a zero of the squared function, e.g. $$ f(x) = \begin{cases} -\sqrt{-(x-0.5)}, & x < 0.5 \\ +\sqrt{+(x-0.5)}+2k, & x \ge 0.5 \end{cases} $$ squaring yields $$ (f(x)-k)^2=abs(x-0.5)+k $$

the original transition from $0$ to $2k$ doesn't generate a zero and applying a derivative-based method like Newton-Raphson produces a ping pong between $0.5-k$ and $0.5+k$.

The Numerical Recipes book is probably the best resource to recommend to you.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .