0
$\begingroup$

For example, Matrix U is obtained by

U[w1_, w2_, w3_]:= NDSolveValue[
        {u'[t] == - I H[w1, w2, w3, t] . u[t], u[0] == IdentityMatrix[3]},
        u,
        {t, 0, 2 Pi}
    ]

where

H[w1_, w2_, w3_, t_] := {
        {0, Cos[w1 t], Cos[w3 t]},
        {Cos[w1 t], 0, Cos[w2 t]},
        {Cos[w3 t], Cos[w2 t], 0}
    }

then a function defined of U[w1,w2,w3][t] would be like:

f[w1_, w2_, w3_, t_] := Tr[U[w1, w2, w3][t] .
   {{0, 1/3, 1/3}, {1/3, 0, 1/3}, {1/3, 1/3, 0}} .
   ConjugateTranspose[U[w1, w2, w3][t]]]

When I want to do NFourierTransform[f[1, 2, 3, t], t, \[Omega]]

the outcome is justenter image description here

which is not what I am expecting

$\endgroup$
5
  • 2
    $\begingroup$ What have you tried, and what problems did you encounter? $\endgroup$
    – bbgodfrey
    Dec 18 '21 at 15:28
  • 1
    $\begingroup$ An actual use case that does not work for you would be helpful. For instance f[1, 2, 3, 4] seems to work fine for me. A better way to define U (iimho) is U = ParametricNDSolveValue[{u'[t] == -I H[w1, w2, w3, t] . u[t], u[0] == IdentityMatrix[3]}, u, {t, 0, 2 Pi}, {w1, w2, w3}]. ParametricNDSolve was built to handle such things and has certain efficiencies built in. $\endgroup$
    – Michael E2
    Dec 18 '21 at 15:54
  • $\begingroup$ Question have been edited. I want to do something of f[w1,w2,w3,t] rather than just get the outcome of f[w1,w2,w3,t]. $\endgroup$ Dec 19 '21 at 1:57
  • 1
    $\begingroup$ (1) NFourierTransform[func, t, w] does not evaluate unless w is numeric. (2) The Fourier transform is an integral over the whole real line, but your function ff is not defined over the whole real line. Did you intend the Fourier series? $\endgroup$
    – Michael E2
    Dec 19 '21 at 2:39
  • $\begingroup$ @Micheal E2 Getting the Fourier series is also great. It is an effective way to do that? $\endgroup$ Dec 19 '21 at 6:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.