MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Phase Plot of Simple Harmonic Motion using Mathematica ??

  • To: mathgroup at smc.vnet.net
  • Subject: [mg126512] Re: Phase Plot of Simple Harmonic Motion using Mathematica ??
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Wed, 16 May 2012 04:22:35 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jot5nd$aok$1@smc.vnet.net>
  • Reply-to: nma at 12000.org

On 5/15/2012 3:56 AM, Rahul Chakraborty wrote:
> Hi all,
>
>   Plz check my code below for Phase plot of Simple Harmonic motion. The output should be a circle with x along X-axis and dxdt along y-axis.
>
> I'm not getting the output. kindly let me know where i'm wrong.
>
>   Clear[k, m];
> k = 1;
> m = 3;
> solution =
>   NDSolve[{x''[t] + k/m x[t] == 0, x[0] == 5, x'[0] == 0},
>    x, {t, 0, 250}, MaxSteps \[RightArrow] 50000,
>    WorkingPrecision \[RightArrow] 25]
>
>
> Following are the errors:
>

This works for me. Just changed your \[RightArrow] with normal
ascii ->

NDSolve[{x''[t] + (k/m)*x[t] == 0, x[0] == 5,
    x'[0] == 0}, x, {t, 0, 250}, MaxSteps -> 50000,
   WorkingPrecision -> 25]

--Nasser



  • Prev by Date: Re: Total least squares with Mathematica?
  • Next by Date: Re: Phase Plot of Simple Harmonic Motion using Mathematica ??
  • Previous by thread: Re: Phase Plot of Simple Harmonic Motion using Mathematica ??
  • Next by thread: Re: Phase Plot of Simple Harmonic Motion using Mathematica ??