Fourier series of a function in the interval [-pi/2,pi/2]

I have to show that $ frac { cos x} {3} + frac { cos 3 x} {1 cdot 3 cdot 5} – frac { cos 5 x} {3 cdot 5 cdot 7} + frac { cos 7 x} {5 cdot 7 cdot 9} – cdots = frac { pi} {8} cos ^ {2} x $ on the interval $ (- pi / 2, pi / 2) $, I tried to find the Fourier coefficient $ a_n $ with the formula $ a_n = (2 / ( pi / 2)) int_0 ^ { pi / 2} ( pi / 8) cos ^ 2 (x) cdot cos (k pi x / ( pi / 2 )) $, but in the end always something useless. How do I do it?

Implementation of 3Blue1Browns Description of the Fourier transform in Python + numpy

I have implemented the description of the 3Blue1Brown Fourier transform in Python + numpy for irregular and unsorted data as described here.

import numpy as np
import matplotlib.pyplot as plt

def polarToRectangular(radii, angles):
    return radii * np.exp(1j * angles)

def frequencyGenerator(time, steps = 100):
    𝛿 = time.max() - time.min()
    M = np.arange(1, steps + 1)(:, np.newaxis)
    return M / 𝛿

def easyFourierTransform(time, values, frequency = None, steps = 100):
    if frequency is None:            
        ft = frequencyGenerator(time, steps)
        frequency = ft.reshape(ft.shape(0))
    else:
        ft = frequency(:, np.newaxis)

    # sorting the inputs
    order = np.argsort(time)
    ts = np.array(time)(order)
    Xs = np.array(values)(order)

    𝜃 = (ts - time.min()) * 2 * np.pi * ft
    Y = polarToRectangular(Xs, 𝜃)(:, :-1) * np.diff(ts)
    amplitude = np.abs(Y.sum(axis=1))
    return frequency, amplitude

I think maybe I can suggest adding this to numpy / scypy. However, I am not sure if this little piece of code is qualified for upstream addition. I was wondering if you could help me to know the following:

  • Is this code correct? Is there indeed the Fourier transform back? I want to make sure that there are no logical errors.
  • Is it a high-performance code or is there a way to improve performance?
  • Is formatting good enough? Should I comply with the PEP8 standard or require Numpy / Scipy other best practices?
  • How can I add a write comment? In particular to make sure that the dimensions of the ndarrays are in order.
  • Is this novel or has it been written before? (not necessarily relevant to this forum, but still my question)

I would be glad if you could help me with the above mentioned points. Thank you in advance.

Keywords: uneven, even, uneven, sampled, distributed

Fourier analysis – Determination of frequency components using FFT

The function defined below has three frequencies 2, 4, and 10. How can the Fourier transform (FFT) be used to display these frequencies?

   myfun(t_) = 
 1/(2 Sqrt(
   2)) ((Sqrt)Abs(
     3 + Cos(4 t) - 
      4 Cos(2 t) (-1 + 
         E^(-0.018` t) (Cos(9.99999594999918` t) + 
            0.0009000003645002213` Sin(9.99999594999918` t))^2) + 
      4 E^(-0.018` t) (Cos(9.99999594999918` t) + 
         0.0009000003645002213` Sin(9.99999594999918` t))^2))

nt.number theory – Fourier transform of $ I_Y $, $ Y = { text {numbers with many prime factors} } $

To let $ Y $ Let be the set of integers $ N <n leq 2 N $ with more than $ D log log N $ Prime factors. We can think, say, $ D = ( log log N) ^ {1- epsilon} $,

We have pretty accurate approximations for the size of $ Y $ (I am aware of Chapter II.6 in Tenenbaum's book and the references it contains.) I wonder what work is available there for the Fourier transform $ widehat {1_Y} $ the characteristic function of $ Y $,


I would expect $ widehat {1_Y} $ To have tips on the main arches (ie bows around rations $ a / q $ with a small denominator). That's because $ Y $ is obviously "biased towards divisibility" and should therefore be slightly over-represented in the congruence class $ 0 $ mod $ d $ given for everyone $ d $, relative to other congruence classes mod $ d $,
A back-of-the-envelope calculation suggests that the value at the peak is around $ a / q $ should be roughly proportional $ c ^ { omega (q)} / q $, But what is known?

fa.functional analysis – Characterization of a subset of the Sobolev space $ H ^ k (0.2 pi) $ in Fourier series

To let $ A: = {u in H ^ k (0.2 pi): u ^ {(j)} (0) = u ^ {(j)} (2 pi) mbox {for} j = 0,1, ldots, k-1 } $, from where $ H ^ {k} (0.2 pi) subseteq L ^ 2 (0.2 pi) $ is the Sobolev order room $ k $ on $ (0, 2 pi) $, Can we say that? $ u in A $ iff
$$ sum_ {n = – infty} ^ infty (1 + n ^ 2) ^ k | has {u} (n) | ^ 2 < infty? $$
In the above series $ has {u} (n) $ are the Fourier coefficients of $ u $, We think the answer to this question is positive because we may be able to identify $ A $ with the Sobolev space of the Torus $ H ^ k ( mathbb {T}) $Use this result. But we can not show that there is an isomorphism $ A $ and $ H ^ k ( mathbb {T}) $,

Know a reference for a characterization of $ A $ with Fourier series?

Thank you for any help you can give us.

Fourier analysis – Fourier transform frequency

One possibility is the FourierParameters

  FourierTransform(1, x, w, FourierParameters -> {0, -2*Pi})

Mathematica Graphics

  FourierTransform(Exp(I a x), x, w, FourierParameters -> {0, -2*Pi})

Mathematica Graphics

Compare

funs = {1, DiracDelta(x), Exp(I a x), Cos(a x), Sin(a x)};
result= {#, FourierTransform(#, x, w, FourierParameters -> {0, -2*Pi})}& /@ funs;
Prepend(result, {"f(x)","Fourier transform unitary, ordinary frequency"});
Grid(%, Frame -> All)

Mathematica Graphics

With wikis second column:

Mathematica Graphics

Fourier analysis – spectral solution of elastic waves

As stated in "Wave Propagation in Structures: an FFT-based Spectral Analysis Method" by James F. Doyle:
For the spectral solution of the 1D equation for elastic waves:
$$ widetilde {u} (x, omega) = sum Ce ^ {- i {k_ {n}} x} + De ^ {i {k_ {n}} x}, $$
from where $$ {k_ {n}} = { omega_ {n}} sqrt { rho / E} $$ is the wavenumber. C and D are the indeterminate amplitudes at each frequency. The end of the beam at x = 0 is subjected to a force curve F (t), ie$$ EA frac { partial u (x, t)} { partial x} = F (t) $$
E and A are the modulus of elasticity and the cross-sectional area, respectively. The final solution is the inverse Fourier transform of the following expression:

$$ widetilde {u} (x, omega) = – frac { widetilde {F_ {n}}} {ik_ {n} EA} e ^ {- ik_ {n} x} $$

$ widetilde {F_ {n}} $ is the Fourier transform of the applied force F (t).

The numeric example for the above problem is as follows:

Rod:
diameter=1 inch
density=0.00247 lb/ci
E=10.6e6 lb/si
Pulse, F(t):
0.000000 0
0.001000 0
0.001100 1000
0.001300 0
0.001500 0
(sec) (N)

I wrote the following code in MatLab:

clear all
close all
clc

d=1.0; %inch
A=pi/4*d^2;
rho=0.000247; %lb/inch3
E=10.6e6; %psi
%transform parameters:
n=2^15;
dt=5e-6;
fs=1/dt;
time_fcn = (0:n-1)/fs;
frequency = (0:n-1)*(fs/n);
omega=2*pi*frequency;
F=zeros(1,numel(time_fcn));
nn=find(time_fcn>=0.0011 & time_fcn<=0.0013);
F(nn)=-5e6*(time_fcn(nn)-0.0013);
plot(time_fcn,F)
Fn=fft(F);
plot(omega,Fn)
k=omega*sqrt(0.000247/10.6e6);
A=-Fn(2:numel(omega))./(1i*k(2:numel(omega))*E*A);
x=0;
G(2:numel(omega))= A.*exp(-1i*k(2:numel(omega))*x);
G(1)=simpsons(F,0,max(time_fcn),numel(time_fcn));
U= ifft(G);
plot(time_fcn*1000,U)

The result must be as follows:
Enter image description here

However, I can not achieve the same result as stated in the above book. Can someone tell me where my mistake is?

Thank you all,

Greetings.

Integration – Improper Fourier Transformation

The most common way to check if the Fourier transformation of a function occurs $ f $ is integrable $ (f in L ^ 1 ( mathbb {R})) $ is by demonstrating that the function $ f $ is integrable and at least doubly differentiable. Now I've come across a weaker state where the Fourier transform is not properly integrable. The statement was as follows:

If $ f: mathbb {R} to mathbb {C} $ is a differentiable, integrable function and even, i. $ f (x) = f (-x) $, then the Fourier transformation $ has {f}: mathbb {R} to mathbb {C} $ will be a wrong integral, i. $ has {f} chi _ {(c, d)} $ is integrable for everyone $ c <d $ and the limit $$ lim_ {c to – infty} lim_ {d to + infty} int_c ^ d has {f} $$
will exist. In addition, there would be a formula for this impermissible integral in terms of $ f $?

Can someone give me a hint for this problem? I have no idea how to start?