HP Forums

Full Version: Solve Keplers equation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I wont to solve Keplers equation with this program,
but something is wrong with my guess.
Is it possible to solve this with one of the build in commands?

EXPORT Kepler()
  LOCAL M:=5;
  LOCAL e0:=0.1;
  AAngle:=2;  // do calculations in degree
  // --------------------------------
  // wont to solve Kepler's equation:
  // E = M + e0 * SIN(E)
  // ---------------------------------

I think FNROOT cannot lookup local variables. If (M,e0) are globals, above work.

  AAngle:=2;  // do calculations in degree

You may have to do "AAngle:=0;", to restore HOME default setting.
What equation do you actually want to solve? Give it in the form of var*bla1-bla2 (etc)=bla3, where var is the variable you want to solve for and bla1,2 and 3 are known numbers (even if they are stored as variables).

I'm sure we can write it in a form that the solve command will be able to work with.
Reference URL's