Inverse mapping of the power function

From JSXGraph Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

b = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-5.5, 7.5, 9.5, -2.5], axis: true});
b.suspendUpdate();

var n = b.create('slider',[[-5,-1],[5,-1],[-5,1,5]],{name:'n'});
b.create('functiongraph', [function(t){ return t}],{strokeColor:'#000000',dash:1,strokeWidth:1});
b.create('functiongraph', [function(t){ return JXG.Math.pow(t,n.Value()); },0.001,8],{strokeColor:'#ff0000'});
b.create('functiongraph', [function(t){ return JXG.Math.pow(t,1/n.Value()); },0.001,8],{strokeColor:'#ff0000',dash:2});
b.unsuspendUpdate();