New answers tagged

10

Note that the expression returned by Sum is correct and equals $x(1-x)$ for $0 \leq x \leq 1$. I assume your question is how to simplify the expression into $x(1-x)$? I was able to hack a solution, and unfortunately I don't think it scales very well to other expressions. But here goes: First, evaluate the sum: sum = 1/6 - Sum[Cos[2 x Pi n]/(Pi n)^2, {n, ...


4

Don't use SetDelayed (i.e., :=) in the definition of ℏ. Rather use Set (i.e, =). ℏ = 1.05457168*10^-34 Then using an example from the documentation FourierTransform[Exp[-x^2] Sin[x], x, ℏ*p] produces a result with no error. Update Another trick one can use is to perform the transform with a variable (say ω) and then perform a substitution after the ...


3

Based on comments from @JasonB and @ciao, the short answer for this problem is NO, there is no formal way to do this in Mathematica. Although x and x[...] are clearly two different variables, Mathematica sometime may trade them as somehow related variables or one variable. I do not know whether this assumption has any potential usage, but it looks like ...


4

You simply need to simplify your result using Simplify (dimensions < 4) or FullSimplify (larger), as appropriate: Inverse@FourierMatrix[3].FourierMatrix[3] // Simplify (* Out: {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}} *) FullSimplify[Inverse@FourierMatrix[7].FourierMatrix[7]] == IdentityMatrix[7] (* Out: True *) As you can see, an identity matrix is obtained ...


2

Although george2079 has answerd your question, I will show the pitfals which can appear with the calculation aj[j] and bj[j]. M0 = 102(*Nm*); kn = 47*1000(*Nm/rad*); Jn = 0.108 (*kg m^2*); δ = 0.23; obr = 4500; τ = Pi/(obr 2 Pi/60); num = 100; M1[t_] = M0 (1 + Sin[ω0 t]) /. ω0 -> 2 Pi/τ; M2[t_] = M0 (1 + Sin[ω0 t - (2 Pi)/3]) /. ω0 -> 2 Pi/τ; ...


6

It turns out your coefficients have finite values for j=1 which you can get at by taking a limit: M0 = 1 \[Tau] = 1 a0 = Simplify[ 2/\[Tau] Integrate[moment[t], {t, 0, \[Tau]}, Assumptions -> {\[Tau] \[Element] Reals, \[Tau] > 0}]] aj[j_] = Assuming[j \[Element] Integers, Simplify[2/\[Tau] Integrate[ Cos[j 2 Pi t/\[Tau]] moment[t], {t, ...


1

Mathematica also has a builtin function called ImagePeriodogram that returns an Image representing the power spectrum of the image. This won't help with phase spectra or reconstructing images, however.


3

The documentation indicates the following: f[t_] = Piecewise[{{1, -Tp/2 <= t <= Tp/2}, {0, t > Tp/2}, {0, t < -Tp/2}}]; FourierTransform[f[t], t, \[Omega], FourierParameters -> {1, 1}, Assumptions -> Tp > 0]


1

You are right István Sikari-Nágl, it is not as easy at all as it looks. f[x_] = Piecewise[{{x + π, -π < x < 0}, {x - π, 0 < x < π}}]; g = FourierSeries[f[x], x, 2] // ExpToTrig (* -2 Sin[x] - Sin[2 x] *) Edit Now I build the periodic function. Column[{ Plot[f[Mod[x,-2 Pi]], {x,-3 Pi, 3 Pi}, Exclusions -> None, ImageSize -> 250], ...


4

f[om_] = FourierTransform[ Cos[2000 Pi t] (3 + 1/2 (3 Cos[20 Pi t + Pi/4] + 2 Sin[60 Pi t] - Cos[100 Pi t])), t, om] The following transforms the above formula in graphics primitives Line[...] : ti00 = Collect[f[om], DiracDelta[_], coeff]; ti01 = ti00 /. coeff[c_] DiracDelta[s_] :> With[{om3 = om /. Last[Solve[s == 0, ...


2

I was too lazy to figure out your normalization, so I wrote down formulae for Fourier series. f[t_] := 3 Cos[2000 Pi t] + 0.5 Cos[2000 Pi t] (3 Cos[20 Pi t + Pi/4] + 2 Sin [60 Pi t] - Cos[100 Pi t]); pl = {#, 1/(Pi) Abs@Integrate[f[t/Pi] E^-(I 2 # t), {t, -Pi, Pi}]} & /@ Range[900, 1100, 10]; ListPlot[#, Filling -> Axis, PlotRange ...


2

This is not an answer. FourierTransform[Cos[Abs[x]], x, ξ, FourierParameters -> {1, -1}] (* π DiracDelta[-1 + ξ] + π DiracDelta[1 + ξ] *) Assuming[x ∈ Reals, FourierTransform[Cos[Abs[x]], x, ξ, FourierParameters -> {1, -1}]] (* π DiracDelta[-1 + ξ] + π DiracDelta[1 + ξ] *) FourierTransform[Cos[x], x, ξ, FourierParameters -> {1, -1}] (* π ...


7

Here's one way: x = RandomReal[{-1, 1}, 16]; num = Length[x]; fftx = Table[Total[Table[x[[k + 1]] Exp[2 Pi I k n/num], {k, 0, num - 1}]], {n, 0, num - 1}]/num; Now you can check the accuracy by taking the difference between fftx and the built in Fourier command. Norm[fftx - Fourier[x, FourierParameters -> {-1, 1}], 1] The ...


4

It is possible, but I don't know that this method is desirable. I notice from your data that the signal doesn't decay to zero at the endpoints, which can lead to a lot of shoulder peaks across the spectrum. You can apply a windowing function to the data prior to taking the Fourier transform, which will have the effect of smoothing the shoulder peaks and of ...


4

There are a couple of minor things that need to be changed. Following Andre's suggestion, here is the first part: f1[x_] := Piecewise[{{1*Abs[x], Abs[x] < 2.5}, {1*Abs[2.5], Abs[x] >= 2.5}}] - 2.5; Plot[f1[x], {x, -10, 10}, Axes -> False, Frame -> True, PlotRange -> All, AspectRatio -> .67, LabelStyle -> Directive[Black, ...



Top 50 recent answers are included