1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mathematica Differential Equation, help me see whats wrong

  1. Apr 16, 2009 #1
    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.
     
  2. jcsd
  3. Apr 16, 2009 #2

    Pengwuino

    User Avatar
    Gold Member

    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Mathematica Differential Equation, help me see whats wrong
Loading...