Drawing Graphs with f(x): A Beginner's Guide

Click For Summary

Discussion Overview

The discussion revolves around how to create a mathematical function that can accurately represent a graph derived from the sound of a 12 Hole Ocarina playing the note "e". Participants explore methods for graphing, manipulating functions, and approximating complex signals, including the use of piecewise definitions and Fourier decomposition.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant proposes a piecewise function to represent the graph but expresses uncertainty about its correctness.
  • Another participant questions whether the graph is based on measured data or a simulation, noting the difficulty in defining a function that replicates a graph using elementary functions.
  • A participant identifies the graph as representing a musical note and suggests that it may not be possible to create a perfect mathematical function from it.
  • Some participants discuss the presence of harmonics in the sound and suggest that a spectral decomposition could reveal additional frequency components.
  • One suggestion involves using spline routines or ordinate samples to visually manipulate the graph, indicating that some software can assist in this process.
  • Another participant mentions breaking down the curve into segments defined by simple functions as a common engineering approach.
  • There is a reiteration of the idea that Fourier decomposition could provide insight into reconstructing the original signal from the recording.
  • One participant expresses confusion regarding the explanation of harmonics and spectral decomposition, indicating a lack of understanding.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the feasibility of creating a function to represent the graph accurately. Multiple competing views regarding the methods of approximation and representation remain, with some participants advocating for piecewise definitions and others for spectral analysis.

Contextual Notes

The discussion highlights limitations in defining functions based on real-world data, particularly in the context of musical notes, and the challenges of achieving mathematical precision in such representations.

btb4198
Messages
570
Reaction score
10
function.png
How do I make a function that can draw this same graph ? Also, if i want to increase the frequency of the function, how do i do that ?
so I am thinking f(x) = sin(x) for -1<= f(x) =0.5; f(x) = e^(x)/10 for f(x)= <=1 ; f(x) = cos(x) for f(x) >=0.5
f(x) = -cos(x)
um... i do not think this is right.
help
 
Physics news on Phys.org
Is this the graph of something you measured? Or is it the graph of something you simulated?

In either case, given a graph on a certain interval (say, a time interval) it is in general not possible to define a function in terms of elementary functions (such as polynomials, harmonics, exponentials, etc.) that replicates said graph, even when you allow for piecewise definition.

In a sense, the graph itself is the definition of the function you are looking for.
 
hi, so that is graph of an 12 Hole Ocarina playing the note e.
wait I can't make a function out of it ?
 
btb4198 said:
hi, so that is graph of an 12 Hole Ocarina playing the note e.
wait I can't make a function out of it ?
Nice. From your graph you can see that there is a harmonic in the background (probably its frequency corresponds to your "e"), but there is something else on top of it that reflects the fact that you are close to producing an "e", but you do not manage to do that with mathematical perfection.

Probably a spectral decomposition would show a peak at the "e" frequency, but in addition there will be some much smaller mini-peaks around it.
 
If you just want to draw the graph and manipulate it in a visual sense then use ordinate samples and a spline routine . Some spread sheets can do this but it is not difficult to write a program .
 
A method commonly used in engineering computation is to break down the curve of interest into a sequence of segments where each segment can be defined with a simple function .
 
Nidum said:
A method commonly used in engineering computation is to break down the curve of interest into a sequence of segments where each segment can be defined with a simple function .
I think that is what the OP was trying to do.

Because it appears this is the recording of a real musical instrument playing an "e", to me it would provide most insight to Fourier decompose the recording, keep as many modes as one likes and use these to reconstruct an approximation to the original signal.

The OP could do both: direct approximation using piecewise definition (using e.g. splines, as Nidum suggested) and a spectral approximation, and compare.
 
Krylov said:
I think that is what the OP was trying to do.

Because it appears this is the recording of a real musical instrument playing an "e", to me it would provide most insight to Fourier decompose the recording, keep as many modes as one likes and use these to reconstruct an approximation to the original signal.

The OP could do both: direct approximation using piecewise definition (using e.g. splines, as Nidum suggested) and a spectral approximation, and compare.
Function2.png
 
I was trying to do the
Krylov said:
Nice. From your graph you can see that there is a harmonic in the background (probably its frequency corresponds to your "e"), but there is something else on top of it that reflects the fact that you are close to producing an "e", but you do not manage to do that with mathematical perfection.

Probably a spectral decomposition would show a peak at the "e" frequency, but in addition there will be some much smaller mini-peaks around it.
sorry,
I am not understanding what you are saying here...
 

Similar threads

  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 8 ·
Replies
8
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 36 ·
2
Replies
36
Views
6K
  • · Replies 11 ·
Replies
11
Views
2K