I would like a plot of the instantaneous phase difference between a frequency-swept drive and the nonlinear oscillator it is driving. x[t] below is the instantaneous displacement of the oscillator and plotx provides a plot.
Thanks,
Carey
s =
NDSolve[{x''[t] + x[t] - 0.167 x[t]^3 ==
0.005 Cos[t - 0.5*0.0000652*t^2], x[0] == 0, x'[0] == 0},
x, {t, 0, 3000}, MaxSteps -> 35000]
plotx = Plot[Evaluate[x[t] /. s], {t, 0, 3000}, PlotPoints -> 10000,
Frame -> {True, True, False, False}, FrameLabel -> {"t", "x"},
FrameStyle -> Directive[FontSize -> 15], PlotLabel -> "(a)",
Axes -> False]
(Response, take 2)
You can get a reasonable approximation of the phase with
Here are some plots. First we show the driving term and the result together. It indicates they are a bit out of phase.
Now we show the two phases together. I plot over a slightly different range this time.
Last we show the phase differences.
Possibly I’m off by something additive (those Mod[] terms get bothersome), but this should give an idea of how one might proceed.
Daniel Lichtblau
Wolfram Research