Systems of differential equations: Difference between revisions

From JSXGraph Wiki
(New page: Display solutions of the ordinary differential equation :<math> y'= f(x,y)</math> with initial value <math>(x_0,y_0)</math>. <html> <form> f<sub>1</sub>(x,y)=<input type="text" id="odeinpu...)
 
No edit summary
Line 22: Line 22:


function ode() {
function ode() {
   return JXG.Math.Numerics.rungeKutta(JXG.Math.Numerics.predefinedButcher.Heun, [P.Y()], [P.X(), P.X()+N.Value()], 200, f);
   return JXG.Math.Numerics.rungeKutta(JXG.Math.Numerics.predefinedButcher.Heun, [P1.Y()], [P1.X(), P1.X()+N.Value()], 200, f);
}
}


Line 32: Line 32:
     this.dataY = [];
     this.dataY = [];
     for(var i=0; i<data.length; i++) {
     for(var i=0; i<data.length; i++) {
         this.dataX[i] = P.X()+i*h;
         this.dataX[i] = P1.X()+i*h;
         this.dataY[i] = data[i][0];
         this.dataY[i] = data[i][0];
     }
     }

Revision as of 08:42, 21 July 2010

Display solutions of the ordinary differential equation

[math]\displaystyle{ y'= f(x,y) }[/math]

with initial value [math]\displaystyle{ (x_0,y_0) }[/math].

f1(x,y)=
f2(x,y)=