Share JSXGraph: example "Inverse mapping of the power function"

JSXGraph
Share JSXGraph: example "Inverse mapping of the power function"
This website is a beta version. The official release will be in **2023**.

Inverse mapping of the power function

// Define the id of your board in BOARDID

const board = JXG.JSXGraph.initBoard(BOARDID, {
    boundingbox: [-5.5, 7.5, 9.5, -2.5],
    axis: true
});

var n = board.create('slider', [[-5, -1], [5, -1], [-5, 1, 5]], {name: 'n'});

// Identity function
board.create('functiongraph', [(t) => t], {strokeColor: '#000000', dash: 1});

// x^n
board.create('functiongraph', [(t) => JXG.Math.pow(t, n.Value()), 0.001, 8]);

// x^(1/n)
board.create('functiongraph', [(t) => JXG.Math.pow(t, 1 / n.Value()), 0.001, 8], {dash: 2});