Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10092

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

From "Nasser M. Abbasi" <nma@12000.org>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Phase Plot of Simple Harmonic Motion using Mathematica ??
Date 2012-05-16 08:26 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jovobf$mj5$1@smc.vnet.net> (permalink)
References <jot5nd$aok$1@smc.vnet.net>

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Phase Plot of Simple Harmonic Motion using Mathematica ?? Rahul Chakraborty <rahul.6sept@gmail.com> - 2012-05-15 08:56 +0000
  Re: Phase Plot of Simple Harmonic Motion using Mathematica ?? "Nasser M. Abbasi" <nma@12000.org> - 2012-05-16 08:26 +0000
  Re: Phase Plot of Simple Harmonic Motion using Mathematica ?? DC <b.gatessucks@gmail.com> - 2012-05-16 08:23 +0000

csiph-web