// Numbas version: exam_results_page_options {"name": "Paul 's copy of Reading a graph of a function.", "extensions": ["geogebra", "jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "", "variablesTest": {"maxRuns": 100, "condition": "max(abs(y1),abs(y2))<10"}, "variable_groups": [], "preamble": {"css": "", "js": ""}, "extensions": ["jsxgraph", "geogebra"], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Given a graph of some function f, the student is asked for values of $f$ and its inverse. Function is cubic and invertible.

"}, "ungrouped_variables": ["a", "hshift", "vshift", "x1", "x2", "y1", "y2"], "variables": {"hshift": {"definition": "random(-2..2)", "templateType": "anything", "group": "Ungrouped variables", "name": "hshift", "description": "

Random amount of horizontal shift to create variability.

"}, "x1": {"definition": "random(0..1)", "templateType": "anything", "group": "Ungrouped variables", "name": "x1", "description": ""}, "y1": {"definition": "a*((x1+hshift)^3+(x1+hshift)+vshift)", "templateType": "anything", "group": "Ungrouped variables", "name": "y1", "description": ""}, "vshift": {"definition": "random(-2..2)", "templateType": "anything", "group": "Ungrouped variables", "name": "vshift", "description": "

Random amount of vertifical shift for sake of variability.

"}, "x2": {"definition": "random(-1..1 except x1)", "templateType": "anything", "group": "Ungrouped variables", "name": "x2", "description": ""}, "y2": {"definition": "a*((x2+hshift)^3+(x2+hshift)+vshift)", "templateType": "anything", "group": "Ungrouped variables", "name": "y2", "description": ""}, "a": {"definition": "random(-1..1 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": "

Coefficient of x^3

"}}, "functions": {"eqnline": {"definition": "// This functions plots a cubic with a certain number of\n// stationary points and roots.\n// It creates the board, sets it up, then returns an\n// HTML div tag containing the board.\n\n\n// Max and min x and y values for the axis.\nvar x_min = -6;\nvar x_max = 6;\nvar y_min = -10;\nvar y_max = 10;\n\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '500px',\n '600px',\n {\n boundingBox: [x_min,y_max,x_max,y_min],\n axis: false,\n showNavigation: true,\n grid: true\n }\n);\n\n\n\n\n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar board = div.board; \n\n// create the x-axis.\nvar xaxis = board.create('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\nvar xticks = board.create('ticks',[xaxis,1],{\n drawLabels: true,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n\n// create the y-axis\nvar yaxis = board.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\nvar yticks = board.create('ticks',[yaxis,1],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n\n\n\n\n// Plot the function.\n board.create('functiongraph',\n [function(x){ return a*(Math.pow(x+h,3)+(x+h)+v);},x_min,x_max]);\n\n\n\n\n\n\nreturn div;", "language": "javascript", "parameters": [["a", "number"], ["h", "number"], ["v", "number"]], "type": "html"}}, "parts": [{"showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "gaps": [{"integerAnswer": true, "type": "numberentry", "notationStyles": ["plain"], "allowFractions": false, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "showCorrectAnswer": true, "integerPartialCredit": 0, "minValue": "y1", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "marks": "1", "maxValue": "y1", "variableReplacementStrategy": "originalfirst"}, {"integerAnswer": true, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "showCorrectAnswer": true, "integerPartialCredit": 0, "minValue": "x2", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "marks": 1, "maxValue": "x2", "variableReplacementStrategy": "originalfirst"}, {"integerAnswer": true, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "showCorrectAnswer": true, "integerPartialCredit": 0, "minValue": "x2", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "marks": 1, "maxValue": "x2", "variableReplacementStrategy": "originalfirst"}], "variableReplacements": [], "type": "gapfill", "scripts": {}, "marks": 0, "prompt": "

{eqnline(a, hshift, vshift)}

\n

Above is the graph of some function $f$.

\n

What is $f(\\var{x1})$? [[0]]

\n

What value of $x$ do you need to get $f(x) = \\var{y2}$? [[1]]

\n

What is $f^{-1}(\\var{y2})$? [[2]]

", "showCorrectAnswer": true}], "statement": "

Reading a graph.

", "rulesets": {}, "tags": [], "name": "Paul 's copy of Reading a graph of a function.", "type": "question", "contributors": [{"name": "Paul Howes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/632/"}]}]}], "contributors": [{"name": "Paul Howes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/632/"}]}