# Thread: Approximating a drawing with a function

1. Hey Guys

Assume someone draws some arbitrary function on an x-y plane on graph paper.

Is there a way someone can create an actual mathematical function to match the drawing with a great deal of accuracy?

For example, if someone draws a parabola then it can be reasonably appoximated with a function. However, if the drawing looks more strange, then it would be difficult to easily come up with the function.

Maybe there is a way to write the function as a sum of terms. One could keep adding more terms to decrease or increase the value of the function over some specific part.  2.

3. If it is a single valued function, one can specify the values at a set of points and fit a polynomial to those points.  4. Originally Posted by ScubaDiver
Hey Guys

Assume someone draws some arbitrary function on an x-y plane on graph paper.

Is there a way someone can create an actual mathematical function to match the drawing with a great deal of accuracy?

For example, if someone draws a parabola then it can be reasonably appoximated with a function. However, if the drawing looks more strange, then it would be difficult to easily come up with the function.

Maybe there is a way to write the function as a sum of terms. One could keep adding more terms to decrease or increase the value of the function over some specific part.
1. The graph IS the function

2. If you mean to approximate the given function with some member of a given class of functions, there are lots of ways to do that:
a. A least squares fit of a [polynomial of given degree.
b. Splines passing through any given finite set of points on the graph.
c. Fourieer series approximations by a sum of sinusoids.
d. Approximation by sums of other orthogonal functions
and many more.

A lot depends on your specific application.  5. Well there are of course way to approximate functions.
For example, a fourier series can be used to approximate a square wave.

However, I want to know if it is possible to approximate a function that exhibits nearly every type of behavior

Say, it is periodic over some interval, and then it slowly transforms into a straight line, then it looks like a a square wave over some interval, then it has an asymptote at a few places.

Can something really bizarre be approximated with a great deal of accuracy if one is given a detailed drawing of the funciton on graph paper.  6. Yes, there are ways to approximate any function to within an arbitrary degree of precision using simpler pieces. The question is just how many pieces you want to use, since rougher functions and higher precision need more (sometimes a lot more) pieces.

(Caveat: I suspect that there may actually be some mild restrictions on the type of functions that can be so approximated, since something like: is still a well defined function.)  Well there are of course way to approximate functions.
For example, a fourier series can be used to approximate a square wave.

However, I want to know if it is possible to approximate a function that exhibits nearly every type of behavior

Say, it is periodic over some interval, and then it slowly transforms into a straight line, then it looks like a a square wave over some interval, then it has an asymptote at a few places.

Can something really bizarre be approximated with a great deal of accuracy if one is given a detailed drawing of the funciton on graph paper.[/quote]

yes

See my earlier post.

BTW a Fourier series is not usually a very good approximation to a square wave -- Google "Gibbs phenomenon  Bookmarks
 Posting Permissions
 You may not post new threads You may not post replies You may not post attachments You may not edit your posts   BB code is On Smilies are On [IMG] code is On [VIDEO] code is On HTML code is Off Trackbacks are Off Pingbacks are Off Refbacks are On Terms of Use Agreement