0

Let's define a function as follows:

$$f(x) = c_1 M(a,b,x)+c_2 U(a,b,x)$$

where $M(a,b,x)$ and $U(a,b,x)$ are Kummer and Tricomi functions, both solutions to the confluent hypergeometric equation.

I am now using this function in a code buth sometimes I have to divide $f'(x)$ by $f(x)$ and I noticed under some conditions I divide by zero, which is a remarkable numerical big problem. This said, do you know how I can find all the zeros of this function? Is there a closed form solution for it?

Any help is appreciated!

NSZ
  • 249

1 Answers1

0

There are many ways to overcome such difficulties in numerical calculations. The first suggestion is to write denominator as $f(x)+\epsilon$ for some small $\epsilon$. Now for every point that $f(x)$ is zero, there are two possibilities for $f'(x)$ to be zero or not. If it is zero then you get $0/ \epsilon$ that is zero. Otherwise, there may be an important notable behavior and you let it to be enough sharp by suitable choice of $\epsilon$.

The second suggestion is applicable when you use some alghorithms like Newton-Raphson that needs initial guess. In such situations, it is better to firstly plot the function $f(x)$, and find its approximate zeros that happen where the plot intersects x axis. Then you can choose initial guess not close to a root.