3

I was reading about some root-finding algorithms and wondered if there is a way to find functions specifically with n zeros, for example: finding a function (or a set of functions) that has 378 zeros. Is that possible?

Red Banana
  • 23,956
  • 20
  • 91
  • 192

2 Answers2

11

$$f(x)=\prod_{k=1}^{378}(x-k)$$

Brian M. Scott
  • 616,228
  • Can you provide a little more about it? – Red Banana Apr 26 '13 at 13:16
  • 1
    @Gustavo: If $a_1,\dots,a_n$ is any finite set of real numbers, $$f(x)=\prod_{k=1}^n(x-a_k)$$ is a polynomial of degree $n$ whose roots are precisely the numbers $a_1,\dots,a_n$. – Brian M. Scott Apr 26 '13 at 13:17
  • Everytime I think I'm going to ask something mathematically challenging, there comes Brian and answer it in 0,004sec. Haha – Red Banana Apr 26 '13 at 13:21
7

Brian has given the obvious answer, but it occurs to me that there are probably a lot of other ways to answer the question. For example, consider $$f_k(x) = \sin x + \frac xk.$$

Since $-1\le\sin x\le 1$, all the zeroes of this function lie between $-k$ and $k$. In this interval, $\sin x$ has $2\left\lfloor \frac k\pi\right\rfloor+1$ zeroes. Adding the $\frac xk$ term moves those zeroes around, but does not eliminate them.

graph of sin(x) + x/6pi

So by adjusting $k$ suitably, you can find a function in this family with any odd number of zeroes; for even numbers of zeroes use $\cos x + \frac xk$ instead.

MJD
  • 65,394
  • 39
  • 298
  • 580