Is there any type of function that when graphed would show a curve which intersects the x axis multiple times, with each point being an arbitrary distance from the last?

I mean, not like a trig function where each intersect is the same distance from the last. (2,0); (4,0); (6,0); (8,0). And not like a spiral where the distance gets bigger and bigger (or smaller) (2,0); (4,0); (8,0); (16,0);

But for example, some curve which intersects x-axis at (2,0); (6,0); (14,0); (15,0); (20,0); (122,0)...

Does that type function exist?

If so, is it possible to solve/get the equation, given only those intersect points?

I wouldn't need the exact equation of any particular curve. Just the equation of any curve that happens to intersect x-axis at whatever given arbitrary x values. Is that at least that possible to do?

  • 4
    $\begingroup$ Are you looking for something more complicated than just... $y=(x-x_0)(x-x_1)...(x-x_N)$? $\endgroup$ – Costis Jun 16 '12 at 5:37
  • $\begingroup$ Yes. If I'm given a list of points along the x-axis. Now how can I get an equation to describe a curve (any curve) which touches or crosses the x-axis at those points? $\endgroup$ – monkey blot Jun 16 '12 at 19:50
  • 1
    $\begingroup$ It would, by the way, be an interesting question to ask whether a polynomial with randomly chosen coefficients has randomly distributed zeros (and, given the pdf for the coefficients, what is the pdf for the zeros). Same for Fourier sine or cosine series with randomly chosen coefficients. $\endgroup$ – Wolfgang Bangerth Jun 16 '12 at 22:24
  • 2
    $\begingroup$ If you have the points, the equation in my first comment does exactly what you want. As Prof. Bangerth mentioned in his answer below, however, if the number of zeros becomes too large, it may become unstable to evaluate the polynomial in this way. $\endgroup$ – Costis Jun 17 '12 at 1:48

If the number of zeros you're interested in is relatively small (say, less than 20), then use a random number generator to draw these zeros $x_i$ and then use the function $f(x)=\prod_i (x-x_i)$ -- and voila, you have a function that is zero at a collection of random points $x_i$.

If the number $N$ of zeros becomes large, then a high order polynomial becomes instable to evaluate, and you'll probably want to use a different approach. For example, you could put a low-order polynomial through each set of $n \ll N$ adjacent random zeros and connect them in a $C^1$ way as you would do with splines, for example.

  • $\begingroup$ I need an equation such that, someone else could look at the equation alone, without also seeing the points I used to produce the equation, but then be able to use that equation to get those same points.... to tell me where the line crosses x within the range I specify. $\endgroup$ – monkey blot Jun 27 '12 at 11:09
  • $\begingroup$ Well, if you give someone the function as constructed in my post above, then they will be able to compute the zeros of this function, and that will give them the points you used. $\endgroup$ – Wolfgang Bangerth Jun 27 '12 at 17:49

For a set zero points $x_i$ you can always find a function which is zero in all the points, but there is not just one function which fullfills this. This is obvious because any solution which is zero at any point can be multiplied with an arbitrary constant.

Different approaches exist, depending on ease of implementation and desired properties of the function (smoothness, boundedness, oscillatory behavior and so on). Polynomial interpolation and Splines would be the best starting points.

  • 1
    $\begingroup$ it's not just a constant, you can multiply any function with a function which is 0 at those points, and it would still be 0 at those points (unless if that function tends to infinity at one or more of those points and then it's more complicated.) $\endgroup$ – Costis Jun 16 '12 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.