• Support PF! Buy your school textbooks, materials and every day products Here!

Mathematica Differential Equation, help me see whats wrong

  • Thread starter sm1t
  • Start date
  • #1
6
0
Basically I am trying to recreate this http://mathforum.org/advanced/robertd/magneticpendulum.html

now my differential equation is
NDSolve[{x''[t] + Rx'[t] - Sum from i=1to3 of (x-x[t])/(rootof(x-x[t])^2 +[y-y[t])^2 +d^2)^3 + Qx[t]==0,
{y''[t] + Ry'[t] - Sum from i=1to3 of (y-y[t])/(rootof(x-x[t])^2 +[y-y[t])^2 +d^2)^3 + Qy[t]==0, x[0]==-.95, y[0]==0.09, x'[0]==0, y'[0]==0}, {x,y}, {t,0,100}, MaxSteps -> 1000]
I have assigned values to R Q and d, and please note than the x's and y's which are not of t, should be subscript i.

I get the error,
"The first argument must have both an equation and an initial condition."

I keep compare my equation to other example equations but I can't see whats wrong.

Any anyone shed any light?

Very much appreciated.
 

Answers and Replies

  • #2
Pengwuino
Gold Member
4,989
15
As far as I can tell, you started off the set of differential equations with an opening { but then re-opened with another {. The form should be NDSolve[{f1(vars),f2(fars)},{vars}.....] and so on and so forth.
 

Related Threads for: Mathematica Differential Equation, help me see whats wrong

Replies
0
Views
3K
  • Last Post
Replies
6
Views
1K
  • Last Post
Replies
1
Views
936
Replies
13
Views
1K
  • Last Post
Replies
1
Views
2K
Replies
8
Views
1K
Top