How to determine a function f(x) with only knowing input/output?

  • Thread starter Thread starter mtanti
  • Start date Start date
  • Tags Tags
    Function
Click For Summary
Determining an identical function from a black box f(x) based solely on input/output values is theoretically possible, but it depends on the function's properties. If the function is well-behaved and has a finite area under its curve, it can be approximated using methods like Fourier series or polynomial interpolation. However, infinitely many polynomials can fit a finite set of points, leading to different expressions for the same outputs. Challenges arise with discontinuous functions or those involving transcendental numbers, as they may not yield a unique or expressible form. Ultimately, while approximations can be made, identifying the exact function may not always be feasible.
mtanti
Messages
172
Reaction score
0
If I give you a function f(x) as a black box (you can't see the contents of it) and you can try any value of x you want and note the output values, would it be possible to find an identicle function of it?
 
Mathematics news on Phys.org
mtanti said:
If I give you a function f(x) as a black box (you can't see the contents of it) and you can try any value of x you want and note the output values, would it be possible to find an identicle function of it?

It is probably possible by the use of a computer if the graph is not relatively simple such as a sine curve, linear etc. because then you could solve it by yourself by simple plotting the dots and connecting them together.
 
mtanti said:
If I give you a function f(x) as a black box (you can't see the contents of it) and you can try any value of x you want and note the output values, would it be possible to find an identicle function of it?
I think so. I mean no matter how the function looks like, we can always approximate it using Fourier series and write it as a sum of cos() and sin() terms.

edit: on second thought may not always. The function has to be welll-behaved and should enclose a finite area (i.e. the integral from -infnity to infinity converges).
 
Given a finite number, n, of x_{i} and their corresponding f(x_{i}) you can ALWAYS find a polynomial which matches those inputs for outputs, obviously providing you don't give two outputs for the same input. Will it be the same function? Probably not, because infinitely many polynomials will match those points but have different overall expressions.

You can see this is true just by writing f(x) as a general n-1'th order polynomial and then putting in the various values of x and f(x) and you end up with n simultaneous equations which would be a pain to solve for large n, but that's why they invented Mathematica, or PhD students ;)

As you add more and more points, your computed f(x) will get closer and closer to your actual f(x) provided your f(x) is a function which has a power series expansion. If it doesn't, there'll be a problem somewhere like the simultaneous equations end up with incompatible equations.
 
Last edited:
this is just a basic concept of calculus...
as number of base point -> infiinity, the uncertainty -> 0... lol

You can always interpolate all points that you have acquired. But you are doomed if the given f[x] is not even continuous, i.e.,
f[x]= 1 ;for all finite of x you plug in, and = random number in reals ;for all x that you did not try.
 
Last edited:
mtanti: would it be possible to find an identicle function of it?

Well, I don't think so. Suppose we design a function continuous on the rational and algebratic, and throw in a some consistant transcendental values for pi, e, etc. Then let an infinite number of transcendental values be 0, particularly those that do not a nice "closed form," we might identify. So, we would have no way to find this out, or even to express such numbers since they required an infinite number of decimals.

Of course to collect such transcendental numbers, we rely on the axiom of choice.
 
Last edited:
robert Ihnot said:
So, we would have no way to find this out, or even to express such numbers since they required an infinite number of decimals.

but is there a way to identify such expressive irrational numbers such as pi, e, root 2, etc?
 
Why bother?
Once you know the function values to each x, you KNOW what the function is..
 
well knowing the actual function means you can reproduce it... isn't that what signal analysis is all about?
 
  • #10
mtanti: but is there a way to identify such expressive irrational numbers such as pi, e, root 2, etc?

Well, since it was your "black box" function, I was thinking of asking you!

From the standpoint of Physics, I guess they just rely upon approximations. That's the whole theory of Newton's gravity, replaced by Einstein's Relativity. We know these things only to a approximate degree.
 
  • #11
given a general function on the real numbers you cannot, it has uncountably many arguments to define. put some behaviour on it (an analytic function of a complex variable for example, or a differentiable function of reals with a bounded derivative) and things get more possible and more interesting
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
3
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
7
Views
2K
  • · Replies 10 ·
Replies
10
Views
1K
  • · Replies 9 ·
Replies
9
Views
4K