Difference between revisions of "Vertex equations of a quadratic function and it's inverse"
From JSXGraph Wiki
Jump to navigationJump to searchA WASSERMANN (talk | contribs) |
A WASSERMANN (talk | contribs) |
||
Line 3: | Line 3: | ||
var b = JXG.JSXGraph.initBoard('box1', {boundingbox: [-5, 5, 5, -5], grid:true}); | var b = JXG.JSXGraph.initBoard('box1', {boundingbox: [-5, 5, 5, -5], grid:true}); | ||
var v = b.create('point', [0,0], {name:'V'}), | var v = b.create('point', [0,0], {name:'V'}), | ||
− | p = b.create('point', [3,3], { | + | p = b.create('point', [3,3], {name:'P'}), |
f = b.create('functiongraph', [ | f = b.create('functiongraph', [ | ||
function(x) { | function(x) { | ||
Line 13: | Line 13: | ||
})(); | })(); | ||
</jsxgraph> | </jsxgraph> | ||
+ | |||
+ | <jsxgraph width="300" height="300" box="box2"> | ||
+ | (function() { | ||
+ | var b = JXG.JSXGraph.initBoard('box2', {boundingbox: [-5, 5, 5, -5], grid:true}); | ||
+ | var v = b.create('point', [0,0], {name:'V'}), | ||
+ | p = b.create('point', [3,3], {name:'P'}), | ||
+ | f = b.create('functiongraph', [ | ||
+ | function(x) { | ||
+ | var den = p.Y()- v.Y(), | ||
+ | a = (p.X() - v.X()) / (den * den); | ||
+ | return Math.sqrt((x - v.X()) / a) + v.Y(); | ||
+ | }]); | ||
+ | |||
+ | })(); | ||
+ | </jsxgraph> | ||
+ | |||
+ | |||
[[Category:Examples]] | [[Category:Examples]] | ||
[[Category:Calculus]] | [[Category:Calculus]] | ||
[[Category:Interpolation]] | [[Category:Interpolation]] |