// Numbas version: exam_results_page_options {"name": "Sketching graphs: which graphs are exponentials", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"useCustomName": false, "minMarks": 0, "adaptiveMarkingPenalty": 0, "showCellAnswerState": true, "choices": ["

{plot(n[0],a[0],b[0],c[0])}

", "

{plot(n[1],-a[1],b[1],c[1])}

", "

{plot(n[2],a[2],b[2],c[2])}

", "

{plot(n[3],-a[3],b[3],c[3])}

", "

{plot(n[4],a[4],b[4],c[4])}

"], "showCorrectAnswer": true, "type": "m_n_2", "scripts": {}, "displayType": "checkbox", "shuffleChoices": true, "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "customName": "", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "marks": 0, "warningType": "none", "displayColumns": 0, "minAnswers": "{min}", "unitTests": [], "variableReplacements": [], "customMarkingAlgorithm": "", "matrix": "marks", "prompt": "

Which of the following look like graphs of a exponential function?  (Remember to include transformed versions of the exponential function).

", "maxAnswers": 0}, {"useCustomName": false, "minMarks": 0, "adaptiveMarkingPenalty": 0, "showCellAnswerState": true, "choices": ["

{plot(n[0],a[0],b[0],c[0])}

", "

{plot(n[1],-a[1],b[1],c[1])}

", "

{plot(n[2],a[2],b[2],c[2])}

", "

{plot(n[3],-a[3],b[3],c[3])}

", "

{plot(n[4],a[4],b[4],c[4])}

"], "showCorrectAnswer": true, "type": "m_n_2", "scripts": {}, "displayType": "checkbox", "shuffleChoices": true, "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "customName": "", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "marks": 0, "warningType": "none", "displayColumns": 0, "minAnswers": "{min}", "unitTests": [], "variableReplacements": [], "customMarkingAlgorithm": "", "matrix": "marks", "prompt": "

Which of the following look like graphs of a exponential function?  (Remember to include transformed versions of the exponential function).

", "maxAnswers": 0}], "name": "Sketching graphs: which graphs are exponentials", "functions": {"plot": {"type": "html", "definition": "// Max and min x and y values for the axis.\nvar x_min = -10;\nvar x_max = 10;\nvar y_min = -15;\nvar y_max = 15;\n\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '300px',\n '300px',\n {\n boundingBox: [x_min,y_max,x_max,y_min],\n axis: false,\n showNavigation: false,\n grid: false,\n axis:false,\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 and y-axis\nvar xaxis = board.create('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\n//var 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 });\n\n\n\n\n// Plot the function.\n\n\n//Define function depending on value of n.\nswitch(n) {\n case 0:\n var f = function(x) {return Math.pow(2,b*x)*a+c; }\n break;\n \n case 1:\n var f = function(x) {return Math.log(x+a); }\n break;\n \n case 2:\n var f = function(x) {return a*x+b;}\n break;\n \n case 3:\n var f = function(x) {return a*(x-b)*(x-b)*(x-b)-a*c*(x-b)+b}\n break;\n \n case 4:\n var f = function(x) {return a*(x-b)*(x-b)-c*(x-b);}\n break;\n \n}\n\n board.create('functiongraph', [f], {strokeWidth:3,strokeColor:'black'});\n\nreturn div;\n\n\n\n// Plot coordinates.\n// board.create('circle',[[x0,y0],0.1],{color:'red'});\n// board.create('text',[x0,y0+0.3,'A']);\n// board.create('circle',[[x1,y1],0.1],{color:'red'});\n// board.create('text',[x1,y1+0.3,'B']);\n// board.create('circle',[[x2,y2],0.1],{color:'red'});\n// board.create('text',[x2,y2+0.3,'C']);\n\nreturn div;", "parameters": [["n", "number"], ["a", "number"], ["b", "number"], ["c", "number"]], "language": "javascript"}}, "tags": [], "rulesets": {}, "statement": "

This is a non-calculator question.

", "extensions": ["jsxgraph"], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Several graphs are drawn. Student should select those that are cubics

"}, "variables": {"marks": {"definition": "[2/min,if(n[1]=0,2/min,-2),-2,-2,-2]", "templateType": "anything", "group": "part a", "name": "marks", "description": ""}, "min": {"definition": "if(n[1]=0,2,1)", "templateType": "anything", "group": "part a", "name": "min", "description": ""}, "b": {"definition": "shuffle([1,1,-1,-1,-1])", "templateType": "anything", "group": "part a", "name": "b", "description": ""}, "a": {"definition": "shuffle([1,1,1,2,2])", "templateType": "anything", "group": "part a", "name": "a", "description": ""}, "c": {"definition": "shuffle([-3,-1,0,2,4])", "templateType": "anything", "group": "part a", "name": "c", "description": ""}, "n": {"definition": "[0,random(0..3),1,random(2..4),random(1..4)]", "templateType": "anything", "group": "part a", "name": "n", "description": ""}}, "preamble": {"js": "", "css": ""}, "variable_groups": [{"variables": ["a", "b", "c", "marks", "n", "min"], "name": "part a"}], "advice": "

See Lecture 8.3 for shapes of graphs of standard functions.  A key feature of exponential graphs is they have a horizontal asymptote.

", "variablesTest": {"maxRuns": 100, "condition": ""}, "ungrouped_variables": [], "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/"}]}