Group Abstract Group Abstract

Message Boards Message Boards

0
|
6K Views
|
1 Reply
|
1 Total Like
View groups...
Share
Share this post:

I am getting an "NDSolve::ndum:" error and cannot figure out why.

Posted 12 years ago
POSTED BY: Anup Singh

You have an error using square braces where you should have round braces. The working form is

s = NDSolve[{x'[
      t] + (6.489*10^-28) ((3.84*10^27) (1 - 
           t) (10^5*(1 - t) - (2*10^5)*x[t] + 
           1) (10^5*(1 - t) + (2*10^5)*x[t] + 
            1)/((4*10^10)*(1 - t)^2 + (4*10^10)*x[t]^2 - (4*10^5)*
              x[t] + 1)^(7/2) - (3 (1 - t)^3 - 
           12 (1 - t)*x[t]^2)/(x[t]^2 + (1 - t)^2)^(7/2)) == 0, 
   x[0] == 3}, x, {t, 0, 1}]

So here are the rules:

  1. Curly braces are for lists:

    {a,b,c,d}

  2. Square braces are for function calls:

f[x]

and part specification

a[[1]]
  1. Round braces are for order of operation

    (a+b)^c

POSTED BY: Jason Grigsby
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard