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


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

Re: How to rectify the error for NDSolve ?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!xlned.com!feeder5.xlned.com!ramfeed-1.ams.xsnews.nl!feed.xsnews.nl!border-1.ams.xsnews.nl!newspump.sol.net!post2.nntp.sol.net!posts.news.twtelecom.net!nnrp2.twtelecom.net!not-for-mail
From Rahul Chakraborty <rahul.6sept@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: How to rectify the error for NDSolve ?
Date Sun, 1 Jul 2012 06:15:00 +0000 (UTC)
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Sender steve@smc.vnet.net
Approved Steven M. Christensen <steve@smc.vnet.net>, Moderator
Message-ID <jsopt4$12c$1@smc.vnet.net> (permalink)
Lines 48
NNTP-Posting-Date 01 Jul 2012 06:19:44 GMT
NNTP-Posting-Host 55f9191e.news.twtelecom.net
X-Trace DXC=RgLA[X_oeA4`J[=_:;Y9F<C_A=>8kQj6=;[h;PUXBgb4KXJmSMk1Ue4EFiONJ7[Go6>YXBdORj^62
X-Complaints-To abuse@twtelecom.net
Xref csiph.com comp.soft-sys.math.mathematica:10729

Show key headers only | View raw


Here is my code:


 clear[x, t, \[Tau], Q, Subscript[V, p], Subscript[V, 
  1], \[CapitalGamma], \[Phi]];
Q = 100;
\[CapitalGamma] = 50;
Subscript[\[Omega], 0] = 10;
Subscript[V, p] = 0.5;
Subscript[C, 0] = 4.06 * 10^-4;
t = 5;
\[Tau] = Subscript[\[Omega], 0] t;
\[Phi] = 90;
Subscript[V, 1] = Subscript[C, 0]*Subscript[V, p];
eqn = x'' (\[Tau]) + 
    1/Q x' (\[Tau]) + (1 + 
       Subscript[V, 1] Sqrt[2]
         Sin[2 \[Tau]]) x == \[CapitalGamma] (sin[\[Tau] + \[Phi]]);
sol = NDSolve[{eqn, x[0] == 0.5, x'[0] == 0}, x, {t, 0, 250}, 
   MaxSteps -> 500000, WorkingPrecision -> 25][[1]]
ParametricPlot[Evaluate[{x[t], x'[t]} /. sol], {t, 0, 100}, 
 Frame -> True, PlotRange -> All, 
 AxesLabel -> {"t", "\!\(\*OverscriptBox[\(\[Theta]\), \(.\)]\)"}]


 Output i'm getting is as below:

  NDSolve::dsvar: 5 cannot be used as a variable. >>


  {0.999855 x + Derivative[1][x]/2 + 50 x^\[Prime]\[Prime] == 
  50 sin[140], x[0] == 0.5, Derivative[1][x][0] == 0}


 ReplaceAll::reps: {0.999855 x+x^\[Prime]/2+50 x^\[Prime]\[Prime]==50 sin[140],x[0]==0.5,(x^\[Prime])[0]==0} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing. >>


 ReplaceAll::reps: {0.999855 x+0.5 x^\[Prime]+50. x^\[Prime]\[Prime]==50. sin[140.],x[0.]==0.5,(x^\[Prime])[0.]==0.} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing. >>

 ReplaceAll::reps: {0.999855 x+0.5 x^\[Prime]+50. x^\[Prime]\[Prime]==50. sin[140.],x[0.]==0.5,(x^\[Prime])[0.]==0.} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing. >>

 General::stop: Further output of ReplaceAll::reps will be suppressed during this calculation. >>

 
 Regards,

 rahul

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


Thread

Re: How to rectify the error for NDSolve ? Rahul Chakraborty <rahul.6sept@gmail.com> - 2012-07-01 06:15 +0000

csiph-web