// Numbas version: finer_feedback_settings {"name": "Matching graphs with their equation.", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "
Remember that if you cannot think of anything else, just try plugging in values of $x$ into the equation, and seeing which coordinates you end up with. This always works, but it is usually quicker if you know the standard patterns.
\n\na) See lecture notes and/or panapto video for Lecture 21.2 for the standard shapes of quadratics, cubics, exponentials and $\\ln$ graphs.
\n\nb) See lecture notes and/or panapto video for Lecture 21.2 for examples of $\\ln$ graphs. Alternatively, see Lecture 21.3 for horizontal translations.
\n\nc) See lecture notes and/or panapto video for Lecture 21.2 for variations of $\\frac{1}{x}$ graphs. Alternatively, see Lecture 21.3 for horizontal and vertical translations.
\n\nd) This involves vertical stretching and vertical translations, so see Lecture 21.3.
\n\ne) This involves a mixture of transformations, so see Lecture 21.3.
\n\nAgain, remember that plugging in $x$-value into the equations is always something you should try doing if all else fails.
\n", "name": "Matching graphs with their equation.", "extensions": ["jsxgraph"], "tags": [], "preamble": {"css": "", "js": ""}, "variables": {"e2": {"templateType": "anything", "name": "e2", "definition": "random(2..3)", "group": "Ungrouped variables", "description": ""}, "d2": {"templateType": "anything", "name": "d2", "definition": "d1+1", "group": "Ungrouped variables", "description": ""}, "b1": {"templateType": "anything", "name": "b1", "definition": "random(2..3)", "group": "Ungrouped variables", "description": ""}, "d1": {"templateType": "anything", "name": "d1", "definition": "random(4..6)", "group": "Ungrouped variables", "description": ""}, "d3": {"templateType": "anything", "name": "d3", "definition": "random(2..3)", "group": "Ungrouped variables", "description": ""}, "c1": {"templateType": "anything", "name": "c1", "definition": "random(2..4)", "group": "Ungrouped variables", "description": ""}, "e3": {"templateType": "anything", "name": "e3", "definition": "random(3..5)", "group": "Ungrouped variables", "description": ""}, "c2": {"templateType": "anything", "name": "c2", "definition": "random(1..3)", "group": "Ungrouped variables", "description": ""}, "b2": {"templateType": "anything", "name": "b2", "definition": "random(-1,1)-b1", "group": "Ungrouped variables", "description": ""}}, "functions": {"plotgraph": {"parameters": [["q", "number"], ["a", "number"], ["b", "number"], ["c", "number"]], "definition": "// This functions plots a graph. The variable q selects which graph will be chosen.\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 xmin = -7;\nvar xmax = 7;\nvar ymin = -9;\nvar ymax = 9;\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '500px',\n '600px',\n {\n boundingBox: [xmin,ymax,xmax,ymin],\n axis: false,\n showNavigation: false,\n grid: true\n }\n);\n\n\n\n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar brd = div.board; \n\n// create the x-axis.\nvar xaxis = brd.create('axis',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\n\n\n// create the y-axis\nvar yaxis = brd.create('axis',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\n\n\n\n\n\n\n//Define functions depending on value of q.\nswitch(q) {\n case 1:\n var f1 = function(x) {return Math.pow(2.71,x); }\n var f2 = function(x) {return x*x;}\n var f3 = function(x) {return x*x*x;}\n break;\n \n case 2:\n var f1 = function(x) {return Math.log(x); }\n var f2 = function(x) {return Math.log(x+b);}\n var f3 = function(x) {return Math.log(x+c);}\n break;\n \n case 3:\n var f1 = function(x) {return 1/x;}\n var f2 = function(x) {return 1/x + b;}\n var f3 = function(x) {return 1/(x-c) -1;}\n break;\n \n case 4:\n var f1 = function(x) {return Math.sin(x)+a;}\n var f2 = function(x) {return b*Math.sin(x);}\n var f3 = function(x) {return c*Math.sin(x) + 2;}\n break;\n \n case 5:\n var f1 = function(x) {return Math.pow(2.71,x)*-1;}\n var f2 = function(x) {return Math.pow(2.71,x) - b;}\n var f3 = function(x) {return Math.pow(2.71,(x-c));}\n break;\n}\n\n brd.create('functiongraph', [f1], {strokeWidth:3,strokeColor:'red'});\n brd.create('functiongraph', [f2], {strokeWidth:3,strokeColor: 'green'});\n brd.create('functiongraph', [f3], {strokeWidth:3,strokeColor: 'blue'});\n\nreturn div;", "type": "html", "language": "javascript"}}, "rulesets": {}, "variable_groups": [], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Graphs are given and students are required to match them with their equation.
"}, "statement": "Match the graphs with their equations.
", "variablesTest": {"maxRuns": 100, "condition": ""}, "ungrouped_variables": ["b1", "b2", "c1", "c2", "d1", "d2", "d3", "e2", "e3"], "parts": [{"minAnswers": 0, "displayType": "checkbox", "choices": ["$y=e^x$
", "$y=x^2$
", "$y=x^3$
", "$y=\\ln(x)$
"], "matrix": [["1/3", "-1/3", "-1/3"], ["-1/3", "1/3", "-1/3"], ["-1/3", "-1/3", "1/3"], ["-1/3", "-1/3", "-1/3"]], "showCorrectAnswer": true, "shuffleChoices": true, "showFeedbackIcon": true, "shuffleAnswers": false, "maxMarks": "1", "answers": ["Red
", "Green
", "Blue
"], "marks": 0, "layout": {"expression": "", "type": "all"}, "variableReplacementStrategy": "originalfirst", "prompt": "{plotgraph(1,0,0,0)}
\n", "maxAnswers": 0, "scripts": {}, "warningType": "none", "type": "m_n_x", "minMarks": 0, "variableReplacements": []}, {"minAnswers": 0, "displayType": "checkbox", "choices": ["$y=\\ln(x)$
", "$y=\\ln(x + \\var{b1})$
", "$y=\\ln(x - \\var{-b2})$
", "$y = \\ln(x -\\var{b1})$
", "$y=\\ln(x + \\var{-b2})$
"], "matrix": [["1/3", "-1/3", "-1/3"], ["-1/3", "1/3", "-1/3"], ["-1/3", "-1/3", "1/3"], ["-1/3", "-1/3", "-1/3"], ["-1/3", "-1/3", "-1/3"]], "showCorrectAnswer": true, "shuffleChoices": true, "showFeedbackIcon": true, "shuffleAnswers": false, "maxMarks": "1", "answers": ["Red
", "Green
", "Blue
"], "marks": 0, "layout": {"expression": "", "type": "all"}, "variableReplacementStrategy": "originalfirst", "prompt": "{plotgraph(2,0,b1,b2)}
\n", "maxAnswers": 0, "scripts": {}, "warningType": "none", "type": "m_n_x", "minMarks": 0, "variableReplacements": []}, {"minAnswers": 0, "displayType": "checkbox", "choices": ["$y=\\frac{1}{x}$
", "$y=\\frac{1}{x} + \\var{c1}$
", "$y=\\frac{1}{x - \\var{c2}} - 1$
", "$y = \\frac{1}{x + \\var{c2}} - 1$
", "$y=\\frac{1}{x} - \\var{c1}$
"], "matrix": [["1/3", "-1/3", "-1/3"], ["-1/3", "1/3", "-1/3"], ["-1/3", "-1/3", "1/3"], ["-1/3", "-1/3", "-1/3"], ["-1/3", "-1/3", "-1/3"]], "showCorrectAnswer": true, "shuffleChoices": true, "showFeedbackIcon": true, "shuffleAnswers": false, "maxMarks": "1", "answers": ["Red
", "Green
", "Blue
"], "marks": 0, "layout": {"expression": "", "type": "all"}, "variableReplacementStrategy": "originalfirst", "prompt": "{plotgraph(3,0,c1,c2)}
\n", "maxAnswers": 0, "scripts": {}, "warningType": "none", "type": "m_n_x", "minMarks": 0, "variableReplacements": []}, {"minAnswers": 0, "displayType": "checkbox", "choices": ["$y=\\sin(x)+\\var{d1}$
", "$y=\\var{d2}\\sin(x)$
", "$y=\\var{d3}\\sin(x) + 2$
", "$y = \\sin(x) + \\var{d1+1}$
", "$y=\\var{d3+1}\\sin(x)+1$
"], "matrix": [["1/3", "-1/3", "-1/3"], ["-1/3", "1/3", "-1/3"], ["-1/3", "-1/3", "1/3"], ["-1/3", "-1/3", "-1/3"], ["-1/3", "-1/3", "-1/3"]], "showCorrectAnswer": true, "shuffleChoices": true, "showFeedbackIcon": true, "shuffleAnswers": false, "maxMarks": "1", "answers": ["Red
", "Green
", "Blue
"], "marks": 0, "layout": {"expression": "", "type": "all"}, "variableReplacementStrategy": "originalfirst", "prompt": "{plotgraph(4,d1,d2,d3)}
\n", "maxAnswers": 0, "scripts": {}, "warningType": "none", "type": "m_n_x", "minMarks": 0, "variableReplacements": []}, {"minAnswers": 0, "displayType": "checkbox", "choices": ["$y=-e^x$
", "$y=e^x - \\var{e2}$
", "$y=e^{x - \\var{e3}}$
", "$y = e^x$
"], "matrix": [["1/3", "-1/3", "-1/3"], ["-1/3", "1/3", "-1/3"], ["-1/3", "-1/3", "1/3"], ["-1/3", "-1/3", "-1/3"]], "showCorrectAnswer": true, "shuffleChoices": true, "showFeedbackIcon": true, "shuffleAnswers": false, "maxMarks": "1", "answers": ["Red
", "Green
", "Blue
"], "marks": 0, "layout": {"expression": "", "type": "all"}, "variableReplacementStrategy": "originalfirst", "prompt": "{plotgraph(5,0,e2,e3)}
\n", "maxAnswers": 0, "scripts": {}, "warningType": "none", "type": "m_n_x", "minMarks": 0, "variableReplacements": []}], "type": "question", "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}]}]}], "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}]}