Notices
Results 1 to 6 of 6

Thread: Approximating a drawing with a function

  1. #1 Approximating a drawing with a function 
    Forum Freshman ScubaDiver's Avatar
    Join Date
    Feb 2010
    Posts
    37
    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.


    Reply With Quote  
     

  2.  
     

  3. #2  
    Forum Professor
    Join Date
    Jul 2008
    Location
    New York State
    Posts
    1,213
    If it is a single valued function, one can specify the values at a set of points and fit a polynomial to those points.


    Reply With Quote  
     

  4. #3 Re: Approximating a drawing with a function 
    . DrRocket's Avatar
    Join Date
    Aug 2008
    Posts
    5,486
    Quote 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.
    Reply With Quote  
     

  5. #4  
    Forum Freshman ScubaDiver's Avatar
    Join Date
    Feb 2010
    Posts
    37
    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.
    Reply With Quote  
     

  6. #5  
    Forum Radioactive Isotope MagiMaster's Avatar
    Join Date
    Jul 2006
    Posts
    3,440
    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.)
    Reply With Quote  
     

  7. #6  
    . DrRocket's Avatar
    Join Date
    Aug 2008
    Posts
    5,486
    [quote+"ScubaDiver"]
    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
    Reply With Quote  
     

Bookmarks
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
  •