Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3973986
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:30:54+00:00 2026-05-20T04:30:54+00:00

I would like a plot of the instantaneous phase difference between a frequency-swept drive

  • 0

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]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:30:55+00:00Added an answer on May 20, 2026 at 4:30 am

    (Response, take 2)

    You can get a reasonable approximation of the phase with

    f[tt_?NumericQ] := -(ArcTan @@ ({x[t], x'[t]}/
        Sqrt[x[t]^2 + x'[t]^2]) /. s[[1]]) /. t -> tt
    

    Here are some plots. First we show the driving term and the result together. It indicates they are a bit out of phase.

    plotx2 = Plot[
      Evaluate[{x[t], Cos[t - 0.5*0.0000652*t^2]/5} /. s], {t, 0, 100}, 
      Frame -> {True, True, False, False}, FrameLabel -> {"t", "x"}]
    

    enter image description here

    Now we show the two phases together. I plot over a slightly different range this time.

    phaseangles = 
     Plot[{f[t], Mod[t - 0.5*0.0000652*t^2, 2*Pi, -Pi]}, {t, 100, 120}, 
      Frame -> {True, True, False, False}, FrameLabel -> {"t", "x"}]
    

    enter image description here

    Last we show the phase differences.

    phasediffs = 
     Plot[{f[t] - Mod[t - 0.5*0.0000652*t^2, 2*Pi, -Pi]}, {t, 100, 120}, 
      Frame -> {True, True, False, False}, FrameLabel -> {"t", "x"}]
    

    enter image description here

    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

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to plot points in two dimensional fashion (each have an x
I would like to plot the greasy test signal in Matlab, and then plot
I would like to plot a vertical line (I'd prefer any orientation, but I'd
I would like to plot implicit equations (of the form f(x, y)=g(x, y) eg.
I would like to plot y1 and y2 in the same plot. x <-
I have an SVM in R and I would now like to plot the
I have three data sets of different lengths and I would like to plot
I have some US demographic and firmographic data. I would like to plot zipcode
I have a vector of integers, e.g.: 2,8,11,19 . I would like to plot
in python, I would like to use: from pylab import * Then use plot

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.