Can a polynomial model any continuous function?

In summary: You will have to find a way around that using the fact that you are dealing with a physical model to provide an appropriate compactification.In summary, the conversation discusses the possibility of fitting a polynomial to any continuous function and the limitations of using a degree ∞ polynomial. It also mentions the Stone-Weierstrass theorem, which states that any continuous function on a closed interval can be approximated by a polynomial function. The conversation then shifts to discussing the use of a neural network to find a function that maps input vectors to output vectors. It is noted that in this case, the domain is not compact and alternative methods may need to be used.
  • #1
CraigH
222
1
Mathematics news on Phys.org
  • #2
You might look at the Stone-Weierstrss theorem, which says that any continuous function on a closed interval can be approximated by a polynomial function. I'm not sure about the general case offhand, but I strongly suspect that a bump function would provide a counterexample.
 
  • Like
Likes 1 person
  • #3
CraigH said:
If I could use any polynomial up to degree ∞, then can I get a close fit to any continuous function?

There is no such thing as "polynomial up to degree ∞". Polynomials must have finite degree. What you are thinking of is Taylor series. And the answer to that question is no: there are smooth functions which are not analytic.

Edit: I just noticed you said "close fit" and not equal. Disregard what I said above.

So is it also true that you can fit a polynomial to any function if you use enough exponents?

The Stone-Weierstrass theorem states that given a continuous function ##f : [a,b] \rightarrow \mathbb{R}## and an ##\epsilon > 0## there exists a polynomial p(x) with the property
##|f(x)-p(x)|<\epsilon## for all ##x\in [a,b]##.

That is, provided you are willing to specify a fixed error, there always is a polynomial that is close enough. Note how the theorem says nothing about exponents.
 
Last edited:
  • Like
Likes 1 person
  • #4
Thankyou both for your answers, they have been very helpful. The reason I needed to know this is I am programming a neural network, which will take an input vector in ℝ[itex]^{6}[/itex] (or a higher dimension) and find a function that will map this input to a vector in ℝ[itex]^{3}[/itex].
I just wanted to make sure that this function can be a polynomial, as I have to pre define the form of this function and its degree. The neural network will use a learning algorithm and hopefully find coefficients that will create a function that correctly maps the input to the output.
Thanks again, this website never fails to provide help!
 
  • #5
Also, I might as well ask before this thread closes:
Do you know a general "rule of thumb" for how many exponents I will need? I've searched all over the web and there are no papers or resources that I can find, apart from this how-to-choose-the-degree...

each of the elements in the input vector is related to the output vector by the inverses square law. Each element in the input vector represents the reading of a sensor. These sensors will be placed around a radioactive source. The closer the source is to a sensor the larger its value will be. This value is inversely proportional to the square of the distance from the radiation.
With an array of these sensors there will be a function that maps the input from all of the sensors to a specific location in 3d space. hence a 6+ dimensional input vector and a 3 dimensional output vector.

There is probably an analytical solution to this problem that I could calculate, however a machine learning approach will be better as the readings on the sensors won't actually be exactly proportional, and a machine learning approach allows for other insights into the source.

So my question, for this problem, what is an approximate number of exponents I might need? I know this is a very specific question and its a bit off topic for this forum, but I really have no clue where to start. Do these things usually have a range of 4 to 10 exponents? 10 to 100? I'm going to use trial and error to find the best function but I just don't know the range these things usually are in.
 
  • #6
Use the lowest degree possible. Note that if you have n points a n-1 deg polynomial can be cooked up to hit every point EXACTLY... however what happens between the points will not be what you want.

Also be aware that you cannot extrapolate polynomial fits, you must stay within the defined range. Outside of fit range anything can happen. Most likely it will not be what you want.
 
  • #7
CraigH said:
Thankyou both for your answers, they have been very helpful. The reason I needed to know this is I am programming a neural network, which will take an input vector in ℝ[itex]^{6}[/itex] (or a higher dimension) and find a function that will map this input to a vector in ℝ[itex]^{3}[/itex].

One of the requirements of Stone-Weierstrauss is that the domain is compact, which ##\mathbb{R}^6## fails.
 

1. Can a polynomial model any continuous function?

Yes, a polynomial can model any continuous function. This is because polynomials are infinitely differentiable and can approximate any curve to any desired degree of accuracy.

2. How does a polynomial represent a continuous function?

A polynomial represents a continuous function by using a finite number of terms to approximate the function. Each term in the polynomial is a power of the independent variable, multiplied by a coefficient. By adding more terms and increasing the degree of the polynomial, the approximation becomes more accurate.

3. Are there any limitations to using a polynomial to model a continuous function?

Yes, there are some limitations to using a polynomial to model a continuous function. For example, polynomials may not be able to accurately model functions with sharp corners or discontinuities. Additionally, as the degree of the polynomial increases, it may become more complex and difficult to work with.

4. What is the degree of a polynomial and how does it affect the accuracy of the model?

The degree of a polynomial is the highest power of the independent variable in the polynomial expression. As the degree of a polynomial increases, the accuracy of the model also increases. However, using a higher degree polynomial also means using more terms, which can make the model more complex and harder to interpret.

5. Is a polynomial the only type of function that can model a continuous function?

No, a polynomial is not the only type of function that can model a continuous function. Other types of functions, such as trigonometric functions or exponential functions, can also be used to model continuous functions. The choice of function depends on the specific application and the desired level of accuracy.

Similar threads

Replies
8
Views
1K
  • Precalculus Mathematics Homework Help
Replies
14
Views
746
Replies
4
Views
1K
Replies
2
Views
1K
Replies
5
Views
3K
  • Linear and Abstract Algebra
Replies
8
Views
993
  • General Math
Replies
3
Views
946
  • Set Theory, Logic, Probability, Statistics
Replies
22
Views
2K
Replies
3
Views
2K
Back
Top