If you are a physics student or an engineer, you've probably already came about through your transformers.
If we attract Transformers are very important in several fields of physics because they can tell you
what a periodic function consists of in terms of individual oscillations.
So this is correct, for example, for acoustics.
So when you have a sound and many instruments are playing at the same time, you will have a superposition
of several periodic sine functions.
And by calculating the full you transform off the sound, you can figure out the individual frequencies
of the sound.
And also, this is correct.
For example, in electronics where you have different frequencies of your voltage in the AC scenario,
they can use to fully transform also to decompose the individual periodic functions.
So let's start with an example.
Of course, we need the first num num nampai and then also we need integrals.
This is something I can tell you already.
So here are decided to use our integral trapezoidal methods because this is some very typical integration
method and we will use this one in this particular lecture here as well.
So first of all, I want to show you the superimposed function of three oscillations.
So I create a time list, has an empty bottle in space, and we plot in the range from zero to 50 seconds
with a step size of 500 one.
So step size of zero point one second for the plotting.
And then we have here three individual frequencies, which I have chosen.
Let's use something like this frequency to will be zero point three and frequency three will be three
point five.
And now we can calculate a whitelist list, which will be two values.
And this will be a superposition of periodic functions with these frequencies.
So, for example, we can use now as zero point five times and predict cosine t list times frequency
one.
And then similarly, we use plus another amplitude 2.0 times and P Dot Cosine.
We could also use to sign function.
It wouldn't really matter.
T list times frequency two.
And then the last one will be 1.0 times and putative cosine t list times frequency three.
And now our data will be the composition out of these two arrays and three.
And then, as I just said, composition T list and why list.
And we will plot the data by using multiple live and calling data zero and data one.
So this is really nothing new, of course, and this is what we'll get.
We have to time on the x axis and we have to value of the signal at the y axis.
This could, for example, be some sound that is recorded, which is the superposition of three individual
frequencies.
And now let's see.
This is our dataset that we have that we have measured and we want to figure out what are these frequencies
of these individual oscillations.
So say we forget about these numbers and we only have this data set here.
How do we figure out what are the frequencies?
Of course, we could now go ahead and fit individual cosine functions, and we, as I said, we could
also change the face here, for example, at just a number.
Change this one to sign.
And the signal will look a bit different then, but the frequencies will be the same in this case.
So for fitting the signal, we would first need to figure out that these are three individual frequencies.
And then we would have to fit the three frequency parameters and the three faces, which would be which
could be different for the three individual oscillations.
So this would be quite difficult.
And I can tell you that actually we are going to do this later on in one of the exercises.
And one of the later sections of this course, but it's actually much easier to just call the four year
transform.
Just as a test before we do this, I can show you that we can just call our integral trapezoidal methods.
Sorry, a typo here trapezoidal.
And then just call our data.
This is why I have written it down like this so that we could not just integrated and the integral basically
of this function with respect to the x axis is eleven point three seven three.
But that doesn't help us at all figuring out what are the frequencies for this we need to fully transform.
And the four year transform is based on an integral part.
It's a bit different.
We do not just integrate over data, but we need an additional factor.