## 3 Badges

10 years, 342 days

## I seem to miss something here...

I came by this post when searching for a way to plot a amplitude spectrum. This helped me out.

I noticed that the plot showed amplitudes that are to large. They fit when looking at S, however not to f. I would expect amplitudes of 1/Pi for all the components (as shown in the results below where I used a bit messy code to show the same information using the complex fourier coefficient). What am I missing here?

restart

with(plots)

with(DynamicSystems)

T:=2*Pi

f:=(cos(t)+cos(3*t)+cos(4*t))/Pi:

q := proc (n) options operator, arrow; (int(f*exp(-(2*I)*n*Pi*t/T), t = -(1/2)*T .. (1/2)*T))/T end proc;

A := evalf(`<,>`(seq(2*q(n), n = -10 .. 10)));

DiscretePlot(A, -10, 1, style = stem, gridlines = true);

## I seem to miss something here...

I came by this post when searching for a way to plot a amplitude spectrum. This helped me out.

I noticed that the plot showed amplitudes that are to large. They fit when looking at S, however not to f. I would expect amplitudes of 1/Pi for all the components (as shown in the results below where I used a bit messy code to show the same informatie). What am I missing here?

 >
 >
 >
 >
 >
 (1)
 >
 (2)
 >
 >
 >

Download 20140127_MaplePrimes.mw

## 0*infinity...

@Mac Dude Thanks again for your explanation.

By setting phi=0 we sort of narrow the range of the limit (as the constant and cos terms stay in place), right? What happens with the signum(sin(0))*infinity terms as 0*infinity is undefined?

Jan

## Jan Geurts van Kessel...

Thank you Mac Dude (and also Axel) for taking the trouble to help me. For the case in the original question the amplitudes of both sinusoids are equal. After solving the first derivative without using simplify the Maple output was enormuous, but using simplify gave the expected expression (phi=0).

When the amplitudes of both sinusoids differ, the above procedure can be followed again and should also give phi = 0 in the end (meaning that the difference between the two sinusoids is minimal when both phases are equal). However, because of the fact that U[int] is NOT zero for all t at phi=0 this is more difficult to prove (see Maple file below). Even though it is not realy a Maple question I hope you can give me a hint on the best approach for this problem. I'am thinking of finding the function phi(t) for which U[int]=0 and then determine the mean value. Is this even possible?

Thanks!

20131114_Finding_min.mw

 Page 1 of 1
﻿