// Numbas version: finer_feedback_settings
{"name": "Integration: Calculating the area under a curve. Need to re-write the numerator", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Integration: Calculating the area under a curve. Need to re-write the numerator", "tags": [], "metadata": {"description": "
A function of the form (ax+b)/(x+c) is plotted. Student is asked to calculate the shaded area. Area is both above and below the x-axis.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "This has a mix of calculator and non-calculator questions.
\n----------------------------
", "advice": "\n- To help you check for any mistakes, the integral of the function is $\\simplify{{a}x + {d} ln(x+{c})}$.
\n- See ?? for background on definite integrals and areas.
\n- See ?? for algebraic division.
\n- You need to use some log rules to simplify the answer into the desired form. E.g. $\\ln(2) + \\ln(5) = \\ln(10)$. See Maths 1 for these log rules.
\n
", "rulesets": {}, "extensions": ["jsxgraph"], "variables": {"a": {"name": "a", "group": "(a)", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "ymin": {"name": "ymin", "group": "(a)", "definition": "precround((a*x1+b)/(x1+c)-1,0)-0.5", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "(a)", "definition": "-a*x", "description": "", "templateType": "anything"}, "area1_exact": {"name": "area1_exact", "group": "(a)", "definition": "expression((x1+x2-2*x)*a+\"+\"+d+\"*ln(\"+((x1+c)*(x2+c)/(x+c)^2)+\")\")", "description": "", "templateType": "anything"}, "ymax": {"name": "ymax", "group": "(a)", "definition": "precround((a*7+b)/(7+c)+1,0)+0.5", "description": "", "templateType": "anything"}, "x1": {"name": "x1", "group": "(a)", "definition": "random(-1..-2)+x", "description": "", "templateType": "anything"}, "area1": {"name": "area1", "group": "(a)", "definition": "siground((x1+x2-2*x)*a+d*ln((x1+c)*(x2+c)/(x+c)^2),3)", "description": "", "templateType": "anything"}, "x2": {"name": "x2", "group": "(a)", "definition": "random(1..2)+x", "description": "", "templateType": "anything"}, "d": {"name": "d", "group": "(a)", "definition": "-a*c+b", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "(a)", "definition": "random(2..6)", "description": "", "templateType": "anything"}, "x": {"name": "x", "group": "(a)", "definition": "random(2..4)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "d<>0", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "(a)", "variables": ["x", "x1", "x2", "a", "b", "c", "d", "ymin", "ymax", "area1", "area1_exact"]}], "functions": {"plotgraph": {"parameters": [["q", "number"], ["x1", "number"], ["x2", "number"], ["ymin", "number"], ["ymax", "number"], ["a", "number"], ["b", "number"], ["c", "number"]], "type": "html", "language": "javascript", "definition": "// Shading under a graph! This functions plots a graph of y = a(x-r1)(x-r2)\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 = -1;\nvar xmax = 7;\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '500px',\n '500px',\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('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\nvar xticks = brd.create('ticks',[xaxis,1],{\n drawLabels: true,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n\n// create the y-axis\nvar yaxis = brd.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\nyticks = brd.create('ticks',[yaxis,1],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n\n\n\n// This function shades in the area below the graph of f\n// between the x values x1 and x2\n\nvar shade = function(f,x1,x2,colour) {\n var dataX1 = [x1,x1];\n var dataY1 = [0,f(x1)];\n\n var dataX2 = [];\n var dataY2 = [];\n for (var i = x1; i <= x2; i = i+0.1) {\n dataX2.push(i);\n dataY2.push(f(i));\n }\n\n var dataX3 = [x2,x2];\n var dataY3 = [f(x2),0];\n\n dataX = dataX1.concat(dataX2).concat(dataX3);\n dataY = dataY1.concat(dataY2).concat(dataY3);\n\nvar shading = brd.create('curve', [dataX,dataY],{strokeWidth:0, fillColor:colour, fillOpacity:0.2});\n\nreturn shading;\n}\n\n\n//Define your functions\nvar f1 = function(x) {\n return (a*x+b)/(x+c);\n}\n\n\n\n//Plot the graph and do shading\nswitch(q) {\n case 1:\n brd.create('functiongraph', [f1]);\n shade(f1,x1,x2, 'red');\n break;\n\n}\n\n\n\nreturn div;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "{plotgraph(1,x1,x2,ymin,ymax,a,b,c)}
\nThis is the graph of the function $f(x) = \\displaystyle \\simplify[fractionNumbers]{({a}*x+{b})/(x+{c})}$.
\n\n\n\nCalculate the area of the shaded region.
\n(a) Give your answer without any rounding. Write it in the form \"$a+b \\ln(c)$\", where $a,b$ and $c$ are numbers you need to determine.
\n[[0]]
\n\n\n\n(b) (Calculator). Give your answer to 3 s.f.
\n[[1]]
\n", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "3", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{area1_exact}", "answerSimplification": "fractionNumbers", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "notallowed": {"strings": [")+", ")-"], "showStrings": false, "partialCredit": 0, "message": "You did not enter the answer in the required form.
"}, "valuegenerators": []}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "siground({area1},3)", "maxValue": "siground({area1},3)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "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/"}]}