Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
    
The "?" button in the edit box gives tips on formatting, such as how to format code. –  Michael E2 Feb 28 '13 at 13:21
3  
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] & –  chris Feb 28 '13 at 13:34
add comment

1 Answer

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]]
share|improve this answer
    
But an analytical Fourier transform for the function seems to be still impossible? –  xzczd Feb 28 '13 at 13:57
1  
I think so; also notice the function flattens to a constant for large argument. –  b.gatessucks Feb 28 '13 at 14:02
    
Oh, that's interesting! –  xzczd Feb 28 '13 at 14:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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