Difference between revisions of "Systems of differential equations"
From JSXGraph Wiki
Jump to navigationJump to searchA WASSERMANN (talk | contribs) |
A WASSERMANN (talk | contribs) |
||
Line 2: | Line 2: | ||
:<math> y_1'= f_1(x,y_1,y_2)</math> | :<math> y_1'= f_1(x,y_1,y_2)</math> | ||
:<math> y_2'= f_2(x,y_1,y_2)</math> | :<math> y_2'= f_2(x,y_1,y_2)</math> | ||
− | with initial values <math>(x_0, | + | with initial values <math>(x_0,c_1)</math>, <math>(x_0,c_2)</math>. |
<html> | <html> | ||
<form> | <form> | ||
Line 12: | Line 12: | ||
var brd = JXG.JSXGraph.initBoard('jxgbox', {axis:true, boundingbox:[-11,11,11,-11]}); | var brd = JXG.JSXGraph.initBoard('jxgbox', {axis:true, boundingbox:[-11,11,11,-11]}); | ||
var N = brd.create('slider',[[-7,9.5],[7,9.5],[-15,10,15]], {name:'N'}); | var N = brd.create('slider',[[-7,9.5],[7,9.5],[-15,10,15]], {name:'N'}); | ||
− | var P1 = brd.create('point',[0,1], {name:'(x_0, | + | var P1 = brd.create('point',[0,1], {name:'(x_0,c_1)'}); |
var line = brd.create('line',[function(){return -P1.X();},function(){return 1;},function(){return 0;}],{visible:false}); | var line = brd.create('line',[function(){return -P1.X();},function(){return 1;},function(){return 0;}],{visible:false}); | ||
− | var P2 = brd.create('glider',[0,2,line], {name:'(x_0, | + | var P2 = brd.create('glider',[0,2,line], {name:'(x_0,c_2)'}); |
function doIt() { | function doIt() { | ||
Line 27: | Line 27: | ||
} | } | ||
− | var g1 = brd.createElement('curve', [[0],[0]], {strokeColor:'red', strokeWidth:'2px', name:'y_1'}); | + | var g1 = brd.createElement('curve', [[0],[0]], {strokeColor:'red', strokeWidth:'2px', name:'y_1', withLabel:true}); |
− | var g2 = brd.createElement('curve', [[0],[0]], {strokeColor:'black', strokeWidth:'2px', name:'y_2'}); | + | var g2 = brd.createElement('curve', [[0],[0]], {strokeColor:'black', strokeWidth:'2px', name:'y_2', withLabel:true}); |
g1.updateDataArray = function() { | g1.updateDataArray = function() { | ||
var data = ode(); | var data = ode(); |
Revision as of 09:52, 21 July 2010
Display solutions of the ordinary differential equation
- [math] y_1'= f_1(x,y_1,y_2)[/math]
- [math] y_2'= f_2(x,y_1,y_2)[/math]
with initial values [math](x_0,c_1)[/math], [math](x_0,c_2)[/math].