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

Posted 9 years ago
4299 Views
|
|
1 Total Likes
|
 I looked at the reference material here: http://reference.wolfram.com/mathematica/ref/message/NDSolve/ndnum.html I still cannot figure out what the problem is - only thing I can think of is that I didn't assign a specific value to "t" but it is a variable that changes so I'm not sure how to go about doing that. Here is my differential equation that I am trying to solve graphically: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 == 3}, x, {t, 0, 1}]Here is the error: NDSolve::ndnum: Encountered non-numerical value for a derivative at t == 0.. >>Any help would be appreciated. Thanks.
 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 == 3}, x, {t, 0, 1}] So here are the rules: Curly braces are for lists:{a,b,c,d} Square braces are for function calls: f[x]and part specification a[] ` Round braces are for order of operation(a+b)^c