2
$\begingroup$

I'm trying to plot a Fourier transform of solution of differential equation. I have tried with:

Plot[Evaluate@
  Abs[FourierTransform[
    Re@Evaluate[
      p[t] /. NDSolve[{p'[s] == 1 + (-1.3 + I*10 + p[s])*p[s], 
         p[0] == 0}, p, {s, 0, 10}, MaxSteps -> 100000]], 
    t, \[Omega]]], {\[Omega], 0, 100}, PlotRange -> All]

without success.

What am I doing wrong?

$\endgroup$
2
  • 1
    $\begingroup$ The "?" button in the edit box gives tips on formatting, such as how to format code. $\endgroup$ – Michael E2 Feb 28 '13 at 13:21
  • 4
    $\begingroup$ Why not use Fourier? ff = p[t] /. NDSolve[{p'[s] == 1 + (-1.3 + I*10 + p[s])*p[s], p[0] == 0}, p, {s, 0, 10}, MaxSteps -> 100000][[1]] and Table[ff, {t, 0, 10, 10/256}] // Fourier // Abs // Rest // Flatten // ListLogPlot[#, PlotRange -> All] & $\endgroup$ – chris Feb 28 '13 at 13:34
1
$\begingroup$

You can solve the equation analytically :

sol[s_] = DSolve[{p'[s] == 1 + (-13/10 + I*10 + p[s])*p[s], p[0] == 0}, p[s], {s}][[1, 1, 2]]
$\endgroup$
3
  • 1
    $\begingroup$ But an analytical Fourier transform for the function seems to be still impossible? $\endgroup$ – xzczd Feb 28 '13 at 13:57
  • 2
    $\begingroup$ I think so; also notice the function flattens to a constant for large argument. $\endgroup$ – b.gates.you.know.what Feb 28 '13 at 14:02
  • 1
    $\begingroup$ Oh, that's interesting! $\endgroup$ – xzczd Feb 28 '13 at 14:17

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.