Saturday, August 8, 2020

Introduction to Introductions to Fourier Series -1


Most Introductions to Fourier Series, Fourier Transform, Fourier Analysis are not written for common ordinary people. Some or a lot of 'high-level' (by common ordinary people standard) mathematical background knowledge is required to understand them. One of the hard parts at the introduction stage is Fourier coefficients. In most Introductions I have tried Fourier coefficients are given without derivation, reasoning or proof, just given. Plus Fourier coefficients do not look like ordinary (simple) coefficients. They are very long and these are functions as well. And Fourier Coefficients are different from Fourier Series, of course. Fourier Coefficients are in integral form while Fourier Series is in series form. Your understanding of Fourier Transform, Laplace Transform (if you try) will be widen and deepened because these are developments of Fourier Series.
 
Wiki's Fourier Series (as of 05-Aug-2011) says in Definition:

"

Fourier's formula for 2
π-periodic functions using sines and cosines
 
For a periodic function ƒ(x) that is integrable on [−π, π], the numbers

a_n = \frac{1}{\pi}\int_{-\pi}^\pi f(x) \cos(nx)\, dx, \quad n \ge 0

and

b_n = \frac{1}{\pi}\int_{-\pi}^\pi f(x) \sin(nx)\, dx, \quad n \ge 1

are called the Fourier coefficients of ƒ. One introduces the partial sums of the Fourier series for ƒ, often denoted by

(S_N f)(x) = \frac{a_0}{2} + \sum_{n=1}^N \, [a_n \cos(nx) + b_n \sin(nx)], \quad N \ge 0.

The partial sums for ƒ are trigonometric polynomials. One expects that the functions SN ƒ approximate the function ƒ, and that the approximation improves as N tends to infinity. The infinite sum

\frac{a_0}{2} + \sum_{n=1}^\infty \, [a_n \cos(nx) + b_n \sin(nx)]


is called the Fourier series of ƒ.

"

This part is not found any more now in Wiki. Probably those who already know Fourier Series can understand this but those who are new to Fourier Series do not understand this. The point is < ƒ(x) is a periodic function>. Or in one word "periodicity". This is crucial and please do not forget this. The above explanation is very general or too general for those who do not know Fourier Series but want to know it.
 
While most Introductions are like this:

Fourier series
of ƒ(x) =

\frac{a_0}{2} + \sum_{n=1}^\infty \, [a_n \cos(nx) + b_n \sin(nx)]

and the coefficients are given as

a_n = \frac{1}{\pi}\int_{-\pi}^\pi f(x) \cos(nx)\, dx, \quad n \ge 0

and

b_n = \frac{1}{\pi}\int_{-\pi}^\pi f(x) \sin(nx)\, dx, \quad n \ge 1


Fourier coefficients are not so simple and may have several meanings including very profound ones depending on how how deep you see and understand them. So Fourier coefficients must be explained in some way, not just given.
 (Again ƒ(x) must be a periodic function.)


First - what is periodic function ? (we will see this later.)

Second - What is a coefficient? Coefficient is one of the basic math backgrounds.

From <All about Circuits>

"

<https://www.allaboutcircuits.com/technical-articles/the-fourier-coefficients/>


Learn About Fourier Coefficients 

January 05, 2016 by Donald Krambeck 


Never understood Fourier series coefficients? Now you will.


It says


"

f(t)=av+∞∑n= ancos(nω0t)+bnsin(nω0t)     (1.1) Fourier series representation of a periodic function


Where is the integer sequence 1,2,3,...

In Eq. 1.1, av, an, and bn are known as Fourier coefficients and can be found from f(t).
The term ω0 (or 2πT) represents the fundamental frequency of the periodic function f(t).
The integral multiples of ω0, i.e. 2ω0,3ω0,4ω0 and so on, are known as the harmonic frequencies of f(t). Thus nω0 is the nth harmonic term of f(t)

"


Underline made by ACT.

So the Fourier coefficients can be said inter-related with the original periodic function  f(t).


<x> is general while <t> usually stands for time. But sometimes, especially for generalized <x> may be better to use, not necessarily time. But at the introduction stage generalized <x> (not time) is seldom seen.

Basic math background

"
Coefficient
 

From Wikipedia, the free encyclopedia (as of 05-Aug-2011)


In mathematics, a coefficient is a multiplicative factor in some term of an expression (or of a series); it is usually a number, but in any case does not involve any variables of the expression. For instance in

7x2 − 3xy + 1.5 + y

the first three terms respectively have the coefficients 7, −3, and 1.5 (in the third term there are no variables, so the coefficient is the term itself; it is called the constant term or constant coefficient of this expression). The final term does not have any explicitly written coefficient, but is usually considered to have coefficient 1, since multiplying by that factor would not change the term. Often coefficients are numbers as in this example, although they could be parameters of the problem, as a, b, and c in

ax2 + bx + c

when it is understood that these are not considered as variables.

"

So let's apply this definition to the Fourier Series.

Fourier series of ƒ(x) =

\frac{a_0}{2} + \sum_{n=1}^\infty \, [a_n \cos(nx) + b_n \sin(nx)] 

an, bn  are coefficients.
ao - no variable attached, so the coefficient is the term itself or the coefficient to 1(one).
In this case (n=0), ƒ(x) = ao /2 (summation part starts with n =1). But why <1/2> ? (1/2 is a coefficient of ao but fixed (constant).


an, bn - multiplicative factors. cos(nx) is multiplied by an and sin(nx) is multiplied by bn.

In another word, an is a scale (or magnitude) factor of cos(nx) and bn is a scale factor (or magnitude) of sin (nx).

n of nx is a multiplicative factor. x (variable) is multiplied by n. The point is n is an integer (. . . . -4, -3, -2, -1, 0, 1, 2, 3, 4 . . . .)

As cos(x) and sin(x) are period functions so n is considered as a frequency multiplicative factor.

<x> here is very general. More explicitly

As cos(2πfnx) and sin(2πfnx)  or 

cos(ω0nt) and sin(ω0nt) 

are period functions. 2πfn and ω0n can be regarded as as coefficient of variable <x>, <t>.

Also <n> (integer)  is considered as a angular frequency (multiplicative) factor of 2π, ω0.


Please note ω = 2πf and 

f = frequency: how many times (number) / second. 

t = time: how long or how many (number) seconds

ω0nt = 2πf x n x t 
 
2π x<how many times (number) / second>x  n  x <how many (number) seconds>

therefore  

The unit second disappearedand the only numbers remain.

=  2π x<how many times (number (1))>x  n  x  <how many (number (2))>


This may be the key to Fourier Transform. Time (t) and Frequency (f,ω) co-exists and at the same time Time disappeared. Without time noFrequency.

Back to coefficient. Coefficient is

1) scale (or magnitude) factor
2) multiplicative factor

Some other writings use

3) weighing  (factor)

4) magnitude - this is used when explaining Fourier series, amplitude-phase form

5) then, amplitude (more engineering)


But Fourier coefficients are very long like above and have functions (the original periodic function f(x) and trigonometric functions (which are are typical periodic functions) and these two are multiplied first then integrated.




The last two 4) magnitude and 5) amplitude - we will return to this later when we see the exponential form of Fourier Series. Also this form shows trigonometric function (featuring Magnitude and Phase Difference, which is the principal thing (concept) to understand Fourier Series.
Coefficient itself is not difficult to understand as above - no explanation is required. But the concept is important and people use this concept unconsciously or consciously (good practice for your brain for analysis and synthesis). Actually Fourier Series itself is the work of analysis and synthesis.


Another form of  Fourier Series.

(wiki - recent)

Fourier series, amplitude-phase form







An is a coefficient.

This form shows trigonometric function (featuring Amplitude (Magnitude) and Phase Difference, which is the principal thing (concept) to understand Fourier Series.
Coefficient itself is not difficult to understand as above - no explanation is required. But the concept is important and people use this concept unconsciously or consciously (good practice for your brain for analysis and synthesis). Actually Fourier Series itself is the work of analysis and synthesis.


-------

Basic and useful things to know - continued

Basic property of sine and cosine functions

From:
https://www.math.purdue.edu/academic/files/courses/2014fall/MA16021/FourierSeries%28nopauses%29.pdf

Intuitively, periodic functions have repetitive behavior. A periodic function can be defined on an interval, then copied and pasted so that it repeats itself.

Examples

sin x and cos x are periodic with period 2π.

If L is a fixed number, then sin (2πx/L ) and cos(2πx/L ) have period L. Sine and cosine are the most basic periodic functions!

sin x (odd) cos x (even)

The product of two odd functions is even: x sin x is even 

The product of two even functions is even: cos x2  cos x is even

The product of an even function and an odd function is odd: sin x cos x is odd

Multiplication must follow the trigonometric rules.

To find a Fourier series, it is sufficient to calculate the integrals that give the coefficients an, and bn and plug them in to the big series formula, equation (2.1) above.

Typically, f(x) will be piecewise defined.

Big advantage that Fourier series have over Taylor series: the function f(x) can have discontinuities!
Useful identities for Fourier series: as n is an integer, then

sin(nπ) = 0

e.g. sin(1π ) = sin(2π) = sin(3π) = sin(20π) = 0

                      n
cos(nπ ) = (-1)   =

1 when n is even
-1 when n is odd

e.g.

cos(0π) = cos(2π) = cos(3π) = 1;
cos(1π) = cos(3π) = cos(5π) = -1

These are not so difficult to understand either. But some more Trigonometric formulae (including transformation formulae) are required, which will be shown when necessary.


------

Basic and useful things to know - further continued

The next step is then what Fourier coefficients are.

If you a novice in math like me, understanding step by spec (from one step to the next step) may be a good way to proceed.

Now we are familiar with the following equations:

Fourier series of ƒ(x) =

\frac{a_0}{2} + \sum_{n=1}^\infty \, [a_n \cos(nx) + b_n \sin(nx)]

and the coefficients are given as 

a_n = \frac{1}{\pi}\int_{-\pi}^\pi f(x) \cos(nx)\, dx, \quad n \ge 0

and

b_n = \frac{1}{\pi}\int_{-\pi}^\pi f(x) \sin(nx)\, dx, \quad n \ge 1



But what do these Fourier coefficients mean? The formulae are an integral of the original function  f(t) which multiplied by a sinusoidal function cos(nx) or sin(nx).
To understand Fourier coefficients an and bn or what an and bn are as well as where an and bn come from we need some more basic knowledge of trigonometry including trigonometric integration of

f(x) sin(nx) dx

<x> is variable and can be abstract - just number but continuous with no unit, or you can think it location on straight line or horizontal axis. If you use more practically time (t)

f(t) sin(nt) dt


Some < Integration Rules> which will be used (or may not be used)

Multiplication by constant. c - constant

∫cf(x) dx    =  c∫f(x) dx

Trigonometry (x in radians)

∫cos(x) dx   =   sin(x) + C

∫sin(x) dx   =   -cos(x) + C

Integration by parts

u v dx = u∫v dx − ∫u' (∫v dx) dx

  • u is the function u(x)

  • v is the function v(x)

  • u' is the derivative of the function u(x)


List of integrals of trigonometric functions (wiki)

{\displaystyle \int x\cos ax\,dx={\frac {\cos ax}{a^{2}}}+{\frac {x\sin ax}{a}}+C}


{\displaystyle \int x\sin ax\,dx={\frac {\sin ax}{a^{2}}}-{\frac {x\cos ax}{a}}+C}


Here x is not a function f(x) but a variable. However these are suggestive.

-----

The point or a difficult or strange part is that the coefficient equation contains the original function
f(x), ( which we are required to find ?).

To find
f(x) we need to know an and bn but an and bn equations have f(x) (in integral) plus f(x) can be regarded as coefficient, or coefficient function, of trigonometric functions. Very complicated or we seem to have been put into a magic box, but this seems absurd, too. (Is it absurd because if we find an or bn then we find f(x) before calculating it by summation.

\frac{a_0}{2} + \sum_{n=1}^\infty \, [a_n \cos(nx) + b_n \sin(nx)]

? )

However, again as far as I checked samples of 
f(x) shown in Introductory articles sample functions are rather simple periodical functions with their visually seen graphs. So f(x) is almost already known. Though not so straightforward and a bit difficult but it is possible to calculate an and bn by using a computer sin, cos calculator, hoping meaningfully.


But,  <It is absurd because if we find
an or bn then we find f(x) before calculating it by summation.>
is an absurd statement.
f(x) is known in time domain. We try to find an equivalent but in a Series form having cosine and sine functions which have <time(t)> and cycle (frequency) variable as a part. This is a kind of transform rather than equation. Again please do not forget f(x) is a periodic function and cosine and sine functions are periodic as well.

How to get them. Some a bit forward introduction writings show Derivation of
an and bn equation.

For instance

1) https://lpsa.swarthmore.edu/Fourier/Series/DerFS.html#Finda_n  (this is a very good article)

How do we find
an?

I cannot copy and past here so please go to the above site.

It says,

"
Without justification we multiply both sides by cos(mω0t)

"
some re-arrangement of the equation and then use

"
the trig(onometric) identity
cos(a)cos(b)=½(cos(a+b)+cos(a-b))

"

This is the point as this is
a transformation from Product form to Summation form.

and then use the property of integration of sine and cosine of n
π.

Another one

2) https://planetmath.org/derivationoffouriercoefficients1 (this is a very good article, too)

Derivation of Fourier Coefficients

A very similar way to the above (actually the same thing)


"
Now, in order to find ak, we
multiply both sides of (2) by cos(ωkt) and we arrive at
"

and then


"
By using orthogonality relationships or by literally evaluating the above integrals, we get the following
"

<Orthogonality relationships> roughly means the property of integration of sine and cosine of n
π.

Please refer to the above articles or some other <Derivation of Fourier Coefficients>, which is not a waste of time or rather crucial to get one step further understanding of Fourier Series, Fourier Transform, Fourier Analysis.

-------

Noe as I indicated we will check <Fourier series, amplitude-phase form>

(wiki)

Fourier series, amplitude-phase form








This is also given but we can now more guessing.  An is a coefficient (mutiplicative factor, magnitude, amplitude).

2πnx
------
   P

is now familiar. P is Period (time for one cycle, usually). 1/P is frequency - how many cycles per unit time (usually second). Calculation wise

                         Number of cycles
Frequency =    ----------------------   
                          one (1 ) sec


Reciprocal

                                                                       
        1                              1                           one (1) sec               
--------------  =    ---------------------   =   -----------------------   =   
Frequency          Number of cycles         Number of cycles        
                          ----------------------
                           one (1) sec


  Number
-----------------    x  sec   =   P (Period), usually, (1/100 )x sec = 0.01 sec, (1/1,000) sec = 0.001 sec, etc
One (1) Cycle


           


ACT


Function of y = x


Function of y = x


 Or " demystifying  y = ln x ".


y = x

BIBLE CALCULUS – LIFE'S LESSONS

y = ex

and

y = ln x


Logarithms


y = ln x is a mirror (reflected) image of  y = ex about y = x. Or you fold this chart (paper) along the line of y = x the red line is exactly on the green line. This is in 3D 180 degree rotation as y = x an axis. Or an ant starts waking from at any point of the red line to go toward the green line and takes the shorted distance to reach a point of the green line (by crossing the line of y = x at 90 degree angle or mathematically walk on the normal line ). This is
inverserelation. This may have a profound meaning. You can easily check this by using for instance

y = x +5 (or y = x + a, for more general)

y = x 2


It helps you to get an idea of ln x = y.

ln x = y

is, by definition

ey = x, which is the exchange of x and y in  ex= y( y = ex).


As a reminder

The mirror or reflected image of Point (x=2, y =5)  about y = x is Point (x=5, y = 2), which is easily found in the above chart of y = x. The function of y = x is great.


Additional insight to Function of y = x and e

I was stuck with following explanation found in
e (mathematical constant)Wiki.

In calculus

The graphs of the functions xax are shown for a = 2 (dotted), a = e (blue), and a = 4 (dashed). They all pass through the point (0,1), but the red line (which has slope 1) is tangent to only ex there.

The value of the natural log function for argument e, i.e. ln(e), equals 1.


The principal motivation for introducing the number
e, particularly in calculus, is to perform differential and integral calculus with exponential functions and logarithms.[16] A general exponential function y = ax has a derivative, given by a limit:

{\displaystyle {\begin{aligned}{\frac {d}{dx}}a^{x}&=\lim _{h\to 0}{\frac {a^{x+h}-a^{x}}{h}}=\lim _{h\to 0}{\frac {a^{x}a^{h}-a^{x}}{h}}\\&=a^{x}\cdot \left(\lim _{h\to 0}{\frac {a^{h}-1}{h}}\right).\end{aligned}}}

The parenthesized limit on the right is independent of the variable x: it depends only on the base a. When the base is set to e, this limit is equal to 1, and so e is symbolically defined by the equation:

{\frac {d}{dx}}e^{x}=e^{x}.




Wiki shows some more other ways to prove this

{\frac {d}{dx}}e^{x}=e^{x}.


This part of the wiki explanation has not changed much in last 10 years so that this is supposed be accepted by public. I read this part many times this time. The last part

When the base is set to e, this limit is equal to 1, and so e is symbolically defined by the equation

Of this part
When the base is set to e, this limit is equal to 1is a kind of jumping to the conclusion unless you know that or why / how the this limit becomes 1. In case of general awhen because h ->0 ,


ah - 1               0 

----------  =    ----
    h                  0

which does not make sense.
symbolicallymeans in a way <damned important>. <defined by the equation. Is this just a definition, or truth ?

Another article (I read this article many times as well)

https://brilliant.org/wiki/derivatives-of-exponential-functions/

Derivatives of Exponential Functions

shows similar explanation but sticks to the general exponential and concludes

 d
---- ax  =  ax ln⁡ a
dx

{\frac {d}{dx}}e^{x}=e^{x}.





is symbolical.

 d
---- ax  =  ax ln⁡ a
dx


is symbolical too and more general since if you replace a with e you can get 

{\frac {d}{dx}}e^{x}=e^{x}.






Some one (https://rip94550.wordpress.com/2010/01/18/calculus-where-did-e-come-from/ and else) show an insight


"

{\displaystyle {\begin{aligned}{\frac {d}{dx}}a^{x}&=\lim _{h\to 0}{\frac {a^{x+h}-a^{x}}{h}}=\lim _{h\to 0}{\frac {a^{x}a^{h}-a^{x}}{h}}\\&=a^{x}\cdot \left(\lim _{h\to 0}{\frac {a^{h}-1}{h}}\right).\end{aligned}}}


This limit is <ln a>.


"

By definition ln e is simply 1.

But what does this mean ?  <ln a> can be seen as "the derivative factor of the general exponential " and is a logarithm with the base e (ln).



 d
---- ax  =  ax ln⁡ a
dx


Where did this come from ?

"
https://www.math24.net/derivatives-exponential-functions/

No(w) we consider the exponential function y=ax with arbitrary base a (a>0,a≠1) and find an expression for its derivative.


As a=eln a, 


then


ax=(eln a)x=ex ln a.


Using the chain rule, we have 


(ax)′=(ex ln a)′=ex ln a⋅(x ln a)′=ex ln a⋅ln a=ax⋅ln a.


Thus


(ax)′=ax ln a.


"


<chain rule> is a special case in this. But this special chain rule is shown in math text books.


But the point I want to make here is the first line

As a = eln a, 


This is almost a definition and also usually found in math text books. So it says " As a = e ln a ".
But remember the following I wrote above.

ey = x, which is the exchange of x and y in  ex= y( y = ex).

This is <reverse relation>.

ex is (natural) exponential function while ln a is (natural, base e ) is (natural) logarithm function.  ln a=e ln a, ln a is a power to e (e to the power ln a). This is in a way < inverse relation>. So intuitively e ln a becomes <a>.

Or if we use verbs
  
In
ex eis "exponetized" by xwhile in ln a ais "logaithmized" or inversely exponentizedby e.

Likewise

in
e ln a eis "exponetized" by ln aby placed at this position. Since ais "logarithmized" with base eby place after ln or inversely exponentizedby e


e ln a becomes <a> after "logarthmized" "logarthmized""logarithimized orinversely exponentizedand then "exponetized" linking with ebye.
 

-----

Wiki
exponential functionsays

"
Letting the number of time intervals per year grow without bound leads to the limit definition of the exponential function,

(ex = {\displaystyle \exp x=\lim _{n\to \infty }\left(1+{\frac {x}{n}}\right)^{n}}

first given by Leonhard Euler.

"

but does not show how Euler found and gave it.

It is closely connected with the following definition / characteristic (one of the definitions / characteristics) :

(e =) \lim _{n\to \infty }\left(1+{\frac {1}{n}}\right)^{n}.

Repeating

(ex = {\displaystyle \exp x=\lim _{n\to \infty }\left(1+{\frac {x}{n}}\right)^{n}}


How to prove this. I found an answer (may be one of the answers) in the following article on the net.

e the EXPONENTIAL - the Magic Number of GROWTH(good article)
https://www.austms.org.au/Modules/Exp/exp.pdf

As this is a pdf file it is difficult to copy / paste this part here. The method is a mathematically tricky one.

The exponent (power) part changes

           n                            n/x       x
(     )     --->  ( (     )      )

          x
( 1 + ---   )
          n

Please note the following tricky part.

           n                          n/x       x
(     )     --->  ( (     )      )

Then  n → ∞ .


               n/x 
 (     )     


This part becomes
eby using

(e =) \lim _{n\to \infty }\left(1+{\frac {1}{n}}\right)^{n}.


then we can get

(ex = {\displaystyle \exp x=\lim _{n\to \infty }\left(1+{\frac {x}{n}}\right)^{n}}


The above is modified (so no copyright infringement but principally the same) and may be difficult to get it. Please go to the original

e the EXPONENTIAL - the Magic Number of GROWTH
https://www.austms.org.au/Modules/Exp/exp.pdf


ACT