mmcdara

7891 Reputation

22 Badges

9 years, 54 days

MaplePrimes Activity


These are replies submitted by mmcdara

@C_R 

About the other tool you refer to.
A simple suggestion: did you look to the TimeSeriesAnalysis package? 
Maybe you will find some interested features like GetPeriod.

About the curve you display.
There is a huge difference between the Fourier transform of a function and the Fourier transform of a this same function regularly sampled.
For instance the function f : t --> f(t)=cos(t) defined over R cannot be sampled in the real world, that is resumed by a collection (tn, f(tn))  of points, that for three reasons:

  1. f(t) is not observable before some the timen let's say t=0, you decide to observe it.
  2. The observation of f(t) is necessarily finite.
  3. The sampling itself chnages the nature of the function.

The point 2 (point 1 is more technical) can be mathematically modeled this way:

  • Let WT(t) the function equal to 1 from t=0 to t=T and 0 elsewhere. This function denotes the observation window.
    The observed function can be written FT(t) = f(t) WT(t).
    So its Fourier transform is equal to the Fourier transform of  f(t) convoluted to the one of WT(t) : it is then clear that the original and observed functions have different Fourier transform... unless T is infinite.
     
  • The theory of Fourier transform says that an unbounded function has a bounded Fourier transform and that an unbounded function has a bounded Fourier transform.
    So, here, the Fourier transform of  f(t) is bounded, but the one of FT(t) is not.

About point 3:

  • The (regular) sampling process is modeled while using the Dirac Comb distribution Shap(t) where p is the sampling period.
    The sampled observed function writes FT,p(t) = FT(t) Shap(t) and thus its Fourier transform is equal to the convolution product of the Fourier transforms of FT(t) and Shap(t).
    One can prove that this later is anothr Dirac comp (with period 1/p) and that iots action on the Fourier transform of FT(t) corresponds to a periodization (with period 1/p) of this later.
    This is another reason why the true function and its sampling cannot have identical Fourier transforms (and thus autocorrelation functions).

Windowing_and_Sampling.mw illustrates how windowing and sampling modify the (real part of the) Fourier transform of a simple periodic signal.

The same way,  Windowing_and_Sampling_2.mw illustrates how windowing and sampling modify the (real part of the) Fourier transform of a simple periodic signal.

EDITED : The same worksheet as previously, augmented by a quick talk about the Nyquist-Shannon sampling theorem (reference wherein) Windowing_and_Sampling_2_Shannon.mw. This theorem is at thes same time quite obvious to demonstrate (inFrench we use the term condition instead of theorem) and extremely important from a practical point of view.
It often explains why the FFT of a function/signal, sampled with an arbitrary period, gives something which does not seem correct.

It is hard to operate on complex analytical expressions as no closed form of their Fourier transform may exist (which is why the FFT does exist).
So their autocorrelation function, which requires taking the inverse Fourier transform of the module of these Fourier transform is even more challenging to obtain.

Whatever, the purpose of these three worksheets is to show what happens when you compute the FFT of a limited portion of a signal. The red curves in the last plots can be interpreted as interpolations of the output of this FFT.
Note that the FFT computes only the part of the Fourier transform induced by the sampling period.

About the term "chaos".
I'm not sure a universal and consensual definition of what chaos is nor what chaotic means does exist.
It is generally admited that a dynamic regime is chaotic if its power spectrum contains a continuous part, a wide band, and possibly separatedand well defined rays (those latter being the signature of some almost periodic component).

To conclude this answer, forgive me if I've rehashed things you may already know.

Last updates: a few new materials
Windowing_and_Sampling_2_Shannon.mw
Sampling_period_1.mw
Sampling_period_2.mw
Aperiodic_Fourier_vs_FFT.mw
Periodic_Fourier_vs_FFT.mw

@acer 

To be honest, efficiency has never been one of my concerns when I opened this thread.
Until now, I'd been mainly interested in Monte Carlo integration methods (I recently asked a question about those), but the subject of efficiency came up thanks to your comment.
That's what led me to reread the help pages more carefully and discover that the method used by the default method could fork over into 1D integration.

Ultimately, this thread has probably taught me a lot more than I anticipated, and your comments, especially this last one, have had a lot to do with it.

Many thanks again.

Translated with DeepL.com (free version)

@acer 

You will find in this integration_order_effect_explained.mw  worksheet  the explanation (IMO) of the integration order effect you mentioned in your last comment.

Thanks for having put your finger on it.
I had never observed this myself before because I rarely use the default method in multiple integrations, forcind evalf/Int to use what I want it to use.

@acer 

Thank you acer, this is really helpfull.

You wrote: "I don't see the need to wrap it in a black-box..."
Agree, put out of context this is absolutely useless.
In a few words I'm using this stuff to explain aspects of the Monte-Carlo integration method in a post I'm working on. So I will aske you to be a little bit patient to understand why I integrate this characteristic function over the black-box domain instead of simply foing this

evalf[20](Int(1/(1+sinh(2*x)*ln(x)^2),x=0.8..3));

Thanks a lot, again 

@acer 

For a very simple reason: I had the head to the grindstone and I didn't even realized that I'd unnecessarily complicated the expression the characteristic function.

Good point for you.

It's likely you sent your comment as I was updated my question.
I still face difficulties for multi dimensional integration:  Integration_issue.mw

kernelopts(version)
Maple 2015.2, APPLE UNIVERSAL OSX, Dec 20 2015, Build ID 1097895

restart;
J := (a, b) -> int(cos(cos(x)),x=a..b):
J(0, 2*Pi):
JL := J(0, Pi):
JR := J(Pi, 2*Pi):
JR := IntegrationTools:-Change(JR, x=t+Pi, t):
J(0, 2*Pi) = JL + JR;
      int(cos(cos(x)), x = 0 .. 2 Pi) = 2 Pi BesselJ(0, 1)

Bessel.mw


... like every time you publish what you do with MapleSim.

Congrats!

@Kitonum 

By simple curiosity I googled your image and found this demonstration (I think it's russian: while I don'tI understand it mathematical formulas are universal).
demo
(more complex and far less astute than yours)

@brian bovril 

I didn't know about this sitouts/byes stuff before your initial question and I don't think I correctly understand it.
I feel this is something which can be quite common in some american league (perhaps?) but there doesn't seem to me there is something equivalent in some other countries, for instance in France where I live.

So I don't want to bother you any longer with this, but what is done in the attached seems to be fair... nevertheless I feel it is not what you are looking for?
Is_that_unfair.mw

@brian bovril 

You speak about optimal or perfect solution but you never define what those terms mean.

Let's take another problem: soccer championships in any european country.

You have , let's say 10 teams, each of one must play twice against any other (once at home and once at its opponent's home).
A round consists in 5 games (for instance [1, 2],[3, 4], [5, 6], ..., [9, 10]). Not all the games are necessarily played the same  day and some game may be delayed, for instance played later during the same week.
As each team plays 2*9=18 games it takes 18 rounds to complete the championship.
The championship is fair in the sense that all teams play the same number of games and meet twice any competitors in two different places.
Optimality could occur to minimize the global cost of displacements this championship requires, or to minimize the sum of the travels from game to game to spare the tiredness of the the teammates, and so on.

In your tournament you don't seem to care about fairness, do you?

Assuming only one game is delayed each round and delayed up to the end of the 18th round.
0ne might say that each week there are two byes.
To maintain the fairness of this chamionship those 18 pairs should contain exactly two occurrences of each team and, to go even further, if one pair is [A, B} (meaning B plays at home), there must be the 
pait [B, A] too.
So, in some sense one might say there are 18 weeks where only 4 games are played and three special weeks where 5 games will take place... plus an extra one with only three games.

This would be quite a complex championship to organize as it lasts 22 weeks instead of 18 (maybe it reduces the whole tiredness of the teammates and could be claimed optimal)

@vv 

Without loss of generality one can assume b >= a.
I demonstrated this result by hand, proving that (a+1)*(a+2)*...*(a*b) was divisible by c^a for any c is in {1, ..., b}. Then I used a pigeon hole principle to prove that (a+1)*(a+2)*...*(a*b) was divisible by (2^a)*(3^a)*...*(b^a) ... but it is a very cumbersome proof.

What a great idea to use the Legendre's formula.

Thanks.

This is only a comment to complete (maybe?) @Ronan's answer, so please: do not convert it into an answer.

Let P any of the 3 canonical planes. 
The radius of the circle which figures the intersection of the sphere S and P only depends on the radius R of S and on the distance of S center to plane P.
The coordinates of the center of the intersecting circle are even trivial to find.

For instance, if P=(0, x, y), then the radius of the intersecting plane depends on R and on the z coordinate of S center.
Using Pythagore's theorem this radius is sqrt(5^2 - 4^2) = 3.
The coordinates of the intersecting circle are those of S center where the ramaining corrdinate (z) is set to 0, so (3, 7, 0).

Of course one can use package geom3d to adress the problem and get rid of any reasoning, but it looks like a sledgehammer do kill a fly.
So, what were uou expecting for while asking such a trivial question?

@paulmcquad

Here is a variant of my previous worksheet where the intervals x belongs to are displayed in the usual mathematical form (for instance [2, 3) ).

Note that you can easily change what procedure rel returns (last line before end proc) to get exactly what you asked for in your question.

Enhanced_convert_2.mw

Examples :

@salim-barzani 

I'm probably slow on the uptake and maybe a bit obtuse. 
So I don't think I can help you any longer, and suggest you wait for someone else to help you more efficiently.

Good luck

I don't really understand the connection between the text in your question and the code you deliver.

Whatever, at the very end your code ends with 

odetest(W2, F2);        
                          0

A result which would satisfy a lot of people as it means that solution W2 satisfies ode F2.

What seems to worry you is that the guess function in W2 is equal to the  constant e[0]. Isn'it ?
So, if the result you get doesn't suit you I believe you face a methodology issue.

I feel it is up to you to fix this before coming back to us

G-factoring_mmcdara_1.mw

First 8 9 10 11 12 13 14 Last Page 10 of 154