Differential equations: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 5: Line 5:
</html>
</html>
<jsxgraph width="500" height="500">
<jsxgraph width="500" height="500">
var brd = JXG.JSXGraph.initBoard('jxgbox', {axis:true, boundingbox:[-5,5,5,-5]});
var brd = JXG.JSXGraph.initBoard('jxgbox', {axis:true, boundingbox:[-1,5,11,-5]});
var P = brd.create('point',[0,0], {name:'x_0'});
var P = brd.create('point',[0,0], {name:'x_0'});
var f = function(t,xx) {
var f = function(t,xx) {
Line 20: Line 20:


function ode() {
function ode() {
   return JXG.Math.Numerics.rungeKutta(JXG.Math.Numerics.predefinedButcher.Heun, [P.Y()], [0, 2], 20, f);
   return JXG.Math.Numerics.rungeKutta(JXG.Math.Numerics.predefinedButcher.Heun, [P.Y()], [0, 10], 20, f);
}
}



Revision as of 09:38, 14 July 2010

f(t,x)=

The underlying JavaScript code