// 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

\n

a) See lecture notes and/or panapto video for Lecture 21.2 for the standard shapes of quadratics, cubics, exponentials and $\\ln$ graphs.

\n

\n

b) 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

\n

c) 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

\n

d) This involves vertical stretching and vertical translations, so see Lecture 21.3.

\n

\n

e) This involves a mixture of transformations, so see Lecture 21.3.

\n

\n

Again, remember that plugging in $x$-value into the equations is always something you should try doing if all else fails.

\n

", "variable_groups": [], "ungrouped_variables": ["b1", "b2", "c1", "c2", "d1", "d2", "d3", "e2", "e3"], "functions": {"plotgraph": {"language": "javascript", "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"}}, "extensions": ["jsxgraph"], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "statement": "

Match the graphs with their equations.

", "preamble": {"js": "", "css": ""}, "tags": [], "parts": [{"choices": ["

$y=e^x$

", "

$y=x^2$

", "

$y=x^3$

", "

$y=\\ln(x)$

"], "maxMarks": "1", "scripts": {}, "shuffleAnswers": false, "answers": ["

Red

", "

Green

", "

Blue

"], "minMarks": 0, "prompt": "

{plotgraph(1,0,0,0)}

\n

", "displayType": "checkbox", "minAnswers": 0, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "shuffleChoices": true, "showFeedbackIcon": true, "marks": 0, "maxAnswers": 0, "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"]], "layout": {"expression": "", "type": "all"}, "type": "m_n_x", "warningType": "none", "variableReplacements": []}, {"choices": ["

$y=\\ln(x)$

", "

$y=\\ln(x + \\var{b1})$

", "

$y=\\ln(x - \\var{-b2})$

", "

$y = \\ln(x -\\var{b1})$

", "

$y=\\ln(x + \\var{-b2})$

"], "maxMarks": "1", "scripts": {}, "shuffleAnswers": false, "answers": ["

Red

", "

Green

", "

Blue

"], "minMarks": 0, "prompt": "

{plotgraph(2,0,b1,b2)}

\n

", "displayType": "checkbox", "minAnswers": 0, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "shuffleChoices": true, "showFeedbackIcon": true, "marks": 0, "maxAnswers": 0, "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"]], "layout": {"expression": "", "type": "all"}, "type": "m_n_x", "warningType": "none", "variableReplacements": []}, {"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}$

"], "maxMarks": "1", "scripts": {}, "shuffleAnswers": false, "answers": ["

Red

", "

Green

", "

Blue

"], "minMarks": 0, "prompt": "

{plotgraph(3,0,c1,c2)}

\n

", "displayType": "checkbox", "minAnswers": 0, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "shuffleChoices": true, "showFeedbackIcon": true, "marks": 0, "maxAnswers": 0, "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"]], "layout": {"expression": "", "type": "all"}, "type": "m_n_x", "warningType": "none", "variableReplacements": []}, {"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$

"], "maxMarks": "1", "scripts": {}, "shuffleAnswers": false, "answers": ["

Red

", "

Green

", "

Blue

"], "minMarks": 0, "prompt": "

{plotgraph(4,d1,d2,d3)}

\n

", "displayType": "checkbox", "minAnswers": 0, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "shuffleChoices": true, "showFeedbackIcon": true, "marks": 0, "maxAnswers": 0, "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"]], "layout": {"expression": "", "type": "all"}, "type": "m_n_x", "warningType": "none", "variableReplacements": []}, {"choices": ["

$y=-e^x$

", "

$y=e^x - \\var{e2}$

", "

$y=e^{x - \\var{e3}}$

", "

$y = e^x$

"], "maxMarks": "1", "scripts": {}, "shuffleAnswers": false, "answers": ["

Red

", "

Green

", "

Blue

"], "minMarks": 0, "prompt": "

{plotgraph(5,0,e2,e3)}

\n

", "displayType": "checkbox", "minAnswers": 0, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "shuffleChoices": true, "showFeedbackIcon": true, "marks": 0, "maxAnswers": 0, "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"]], "layout": {"expression": "", "type": "all"}, "type": "m_n_x", "warningType": "none", "variableReplacements": []}], "rulesets": {}, "variables": {"d3": {"templateType": "anything", "definition": "random(2..3)", "description": "", "group": "Ungrouped variables", "name": "d3"}, "c2": {"templateType": "anything", "definition": "random(1..3)", "description": "", "group": "Ungrouped variables", "name": "c2"}, "b1": {"templateType": "anything", "definition": "random(2..3)", "description": "", "group": "Ungrouped variables", "name": "b1"}, "e3": {"templateType": "anything", "definition": "random(3..5)", "description": "", "group": "Ungrouped variables", "name": "e3"}, "d2": {"templateType": "anything", "definition": "d1+1", "description": "", "group": "Ungrouped variables", "name": "d2"}, "b2": {"templateType": "anything", "definition": "random(-1,1)-b1", "description": "", "group": "Ungrouped variables", "name": "b2"}, "c1": {"templateType": "anything", "definition": "random(2..4)", "description": "", "group": "Ungrouped variables", "name": "c1"}, "d1": {"templateType": "anything", "definition": "random(4..6)", "description": "", "group": "Ungrouped variables", "name": "d1"}, "e2": {"templateType": "anything", "definition": "random(2..3)", "description": "", "group": "Ungrouped variables", "name": "e2"}}, "metadata": {"description": "

Graphs are given and students are required to match them with their equation.

", "licence": "Creative Commons Attribution 4.0 International"}, "name": "Matching graphs with their equation.", "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}