// Numbas version: exam_results_page_options {"name": "Access Maths formative test 1", "metadata": {"description": "

Hello! This test an extra opportunity to complete some practice questions on the material we have covered so far. Your results will NOT count towards your final grade, and there is no time limit to complete the test. You can check your answers as you go along, and even try new examples of the same type. Full solutions are also available for most questions. If there are any questions you don't understand, take a photo and we can discuss it in class or at a one-to-one appointment. 

", "licence": "None specified"}, "duration": 0, "percentPass": "50", "showQuestionGroupNames": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", "", "", "", ""], "questions": [{"name": "Algebra: Combine Like Terms", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}], "tags": [], "metadata": {"description": "

Simple exercise in collecting terms in different powers of \\(x\\)

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Simplify the following expression by combining \"like\" terms.

", "advice": "

The idea is to collect together and combine any terms that are the same kind of term so:

\n

$\\var{b}$ and $\\var{f}$ are ordinary numbers. We can combine them to get $\\var{b+f}$

\n

We can combine $\\var{a}x$ and $\\var{d}x$ to get $\\var{a+d}x$.

\n

There are also $\\var{c}$ times $x^2$. So our answer is:

\n

$\\simplify{{c}x^2+{a+d}x+{b+f}}$

", "rulesets": {}, "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-5..10 except 0)", "description": "", "templateType": "anything"}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(-5..10 except 0)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-5..10 except 0)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..10)", "description": "", "templateType": "anything"}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(-5..10 except 0 except -b)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "c", "b", "d", "f"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\simplify[!collectNumbers]{{a}x+{b}+{c}x^2+{d}x+{f}}$

", "answer": "{c}x^2+({a}+{d})x+({b}+{f})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "x", "value": ""}]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Find the equation of a line through two points - positive gradient", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Aiden McCall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1592/"}], "statement": "

In this question we will identify the equation of the straight line passing through points  $A=(\\var{xa},\\var{ya})$ and  $B=(\\var{xb},\\var{yb})$ in the form $y = mx + c$.

\n

{plotPoints()}

", "variables": {"m": {"name": "m", "description": "", "definition": "(ya-yb)/(xa-xb)", "templateType": "anything", "group": "Ungrouped variables"}, "yb": {"name": "yb", "description": "", "definition": "ya+random([2,4])", "templateType": "anything", "group": "Ungrouped variables"}, "xa": {"name": "xa", "description": "", "definition": "random(-4..-1)", "templateType": "anything", "group": "Ungrouped variables"}, "ya": {"name": "ya", "description": "", "definition": "random(-4..2)", "templateType": "anything", "group": "Ungrouped variables"}, "xb": {"name": "xb", "description": "", "definition": "xa+random([2,4] except -xa)", "templateType": "anything", "group": "Ungrouped variables"}, "c": {"name": "c", "description": "", "definition": "ya-m*xa", "templateType": "anything", "group": "Ungrouped variables"}}, "metadata": {"description": "

Use two points on a line graph to calculate the gradient and $y$-intercept and hence the equation of the straight line running through both points.

\n

The answer box for the third part plots the function which allows the student to check their answer against the graph before submitting.

\n

This particular example has a positive gradient.

", "licence": "Creative Commons Attribution 4.0 International"}, "tags": ["gradient", "graphs", "line equation", "Straight Line", "straight line", "taxonomy", "y-intercept"], "variablesTest": {"maxRuns": 100, "condition": "\n"}, "variable_groups": [], "ungrouped_variables": ["xa", "xb", "ya", "yb", "m", "c"], "advice": "

We find the equation of a straight line passing through two points by finding the gradient and the $y$-intercept of the line.

\n

a)

\n

We can find the gradient ($m$) using the points $A = (x_1,y_1)=(\\var{xa},\\var{ya})$ and $B = (x_2,y_2)=(\\var{xb},\\var{yb})$.

\n

As the definition of gradient is the ratio of vertical change ($y_2-y_1$) to horizontal change ($x_2-x_1$).
The equation for gradient is,

\n

\\begin{align}
m &= \\frac{y_2-y_1}{x_2-x_1} \\\\[0.5em]
&= \\frac{\\simplify[!collectNumbers]{{yb}-{ya}}}{\\simplify[!collectNumbers]{{xb}-{xa}}} \\\\[0.5em]
&= \\frac{\\simplify[]{{yb}-{ya}}}{\\simplify{{xb}-{xa}}} \\\\[0.5em]
&= \\simplify[simplifyFractions,unitDenominator]{({yb-ya})/({xb-xa})}\\text{.}
\\end{align}

\n

b)

\n

Rearranging the equation $y=mx+c$ and substituting either of the points gives

\n

\\[c = y_1-mx_1 \\quad \\mathrm{or} \\quad c = y_2-mx_2 \\,\\text{.} \\]

\n

We can then also use this equation with the other point's coordinates to check our answer.

\n

Let's use point $A$ first:

\n

\\[
\\begin{align}
c &= y_1-mx_1 \\\\
&= \\var{ya}-\\var[fractionnumbers]{m}\\times\\var{xa} \\\\
& = \\simplify[fractionnumbers]{{ya-m*xa}}\\text{.}
\\end{align}
\\]

\n

We then check this against point $B$:

\n

\\[
\\begin{align}
y_2 &= mx_2 + c \\\\[0.5em]
&= \\simplify[fractionNumbers]{{m}{xb}+{c}} \\\\[0.5em]
&= \\var[fractionnumbers]{m*xb+c}\\text{.}
\\end{align}
\\]

\n

c)

\n

We can now substitute these values for $m$ and $c$ into $y=mx+c$  to get:

\n

\\[y=\\simplify[!noLeadingMinus,fractionNumbers,unitFactor]{{m} x+ {c}}\\text{.}\\]

\n

The green line drawn on the graph represents the above line equation.

\n

{correctPoints()}

", "preamble": {"css": "", "js": ""}, "parts": [{"showCorrectAnswer": true, "customMarkingAlgorithm": "", "prompt": "

Calculate the gradient, $m$, of the straight line between these two points.

\n

$m=$ [[0]]

\n

", "unitTests": [], "scripts": {}, "adaptiveMarkingPenalty": 0, "showFeedbackIcon": true, "type": "gapfill", "marks": 0, "gaps": [{"correctAnswerFraction": true, "unitTests": [], "scripts": {}, "adaptiveMarkingPenalty": 0, "correctAnswerStyle": "plain", "minValue": "m", "marks": 1, "mustBeReducedPC": 0, "useCustomName": false, "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "showFractionHint": true, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "allowFractions": true, "mustBeReduced": false, "showFeedbackIcon": true, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "customName": "", "maxValue": "m", "variableReplacementStrategy": "originalfirst"}], "useCustomName": false, "customName": "", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "sortAnswers": false}, {"showCorrectAnswer": true, "customMarkingAlgorithm": "", "prompt": "

Use this gradient and the coordinates of the points to calculate the $y$-intercept, $c$.

\n

$c=$ [[0]]

", "unitTests": [], "scripts": {}, "adaptiveMarkingPenalty": 0, "showFeedbackIcon": true, "type": "gapfill", "marks": 0, "gaps": [{"correctAnswerFraction": false, "unitTests": [], "scripts": {}, "adaptiveMarkingPenalty": 0, "correctAnswerStyle": "plain", "minValue": "c", "marks": 1, "mustBeReducedPC": 0, "useCustomName": false, "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "showFractionHint": true, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "allowFractions": false, "mustBeReduced": false, "showFeedbackIcon": true, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "customName": "", "maxValue": "c", "variableReplacementStrategy": "originalfirst"}], "useCustomName": false, "customName": "", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "sortAnswers": false}, {"showCorrectAnswer": true, "customMarkingAlgorithm": "", "prompt": "

Give the equation of the straight line through these points in the form $y=mx+c$. 

\n

$\\displaystyle y=$ [[0]]

\n

Use the graph to plot your answer and check that it goes through these points.

", "unitTests": [], "scripts": {"mark": {"order": "after", "script": "this.question.lines.l.setAttribute({strokeColor: this.credit==1 ? 'green' : 'red'});\nthis.question.lines.c.setAttribute({visible: this.credit==1});\n"}}, "adaptiveMarkingPenalty": 0, "showFeedbackIcon": true, "type": "gapfill", "marks": 0, "gaps": [{"showPreview": true, "vsetRangePoints": 5, "scripts": {}, "unitTests": [], "checkingType": "absdiff", "vsetRange": [0, 1], "failureRate": 1, "answerSimplification": "fractionNumbers", "useCustomName": false, "answer": "{m}*x+{c}", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "notallowed": {"message": "

You must input your answer in the form y = mx +c where m and c are numbers.

", "showStrings": false, "partialCredit": 0, "strings": ["c", "m"]}, "checkVariableNames": true, "checkingAccuracy": 0.001, "adaptiveMarkingPenalty": 0, "showFeedbackIcon": true, "type": "jme", "valuegenerators": [{"name": "x", "value": ""}], "customName": "", "marks": 1, "variableReplacementStrategy": "originalfirst"}], "useCustomName": false, "customName": "", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "sortAnswers": false}], "functions": {"correctPoints": {"type": "html", "definition": "//point coordinate variables\nvar xa = Numbas.jme.unwrapValue(scope.variables.xa);\nvar xb = Numbas.jme.unwrapValue(scope.variables.xb);\nvar ya = Numbas.jme.unwrapValue(scope.variables.ya);\nvar yb = Numbas.jme.unwrapValue(scope.variables.yb);\nvar m = Numbas.jme.unwrapValue(scope.variables.m);\nvar c = Numbas.jme.unwrapValue(scope.variables.c);\n\n//make board\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[Math.min(-1,xa-2),Math.max(2,yb+2,c+1),Math.max(2,xb+2),Math.min(-1,ya-2,c-1)],grid: true});\nvar board = div.board;\nquestion.board = board;\n\n\n//points (with nice colors)\nvar a = board.create('point',[xa,ya],{name: 'A', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow', fixed: true, showInfobox: true});\nvar b = board.create('point',[xb,yb],{name: 'B', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow',fixed: true, showInfobox: true});\n\n\n//ans(was tree) is defined at the end and nscope looks important\n//but they're both variables\n\nvar correct_line = board.create('functiongraph',[function(x){ return m*x+c},-22,22], {strokeColor:\"green\",setLabelText:'mx+c',visible: true, strokeWidth: 4, highlightStrokeColor: 'green'} )\n\n\n\nquestion.signals.on('HTMLAttached',function(e) {\nko.computed(function(){\n//define ans as this \ncorrect_line.updateCurve();\nboard.update();\n});\n });\n\n\nreturn div;", "parameters": [], "language": "javascript"}, "plotPoints": {"type": "html", "definition": "//point coordinate variables\nvar xa = Numbas.jme.unwrapValue(scope.variables.xa);\nvar xb = Numbas.jme.unwrapValue(scope.variables.xb);\nvar ya = Numbas.jme.unwrapValue(scope.variables.ya);\nvar yb = Numbas.jme.unwrapValue(scope.variables.yb);\nvar m = Numbas.jme.unwrapValue(scope.variables.m);\nvar c = Numbas.jme.unwrapValue(scope.variables.c);\n\n//make board\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[Math.min(-1,xa-2),Math.max(2,yb+2,c+1),Math.max(2,xb+2),Math.min(-1,ya-2,c-1)],grid: true});\nvar board = div.board;\nquestion.board = board;\n\n//points (with nice colors)\nvar a = board.create('point',[xa,ya],{name: 'A', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow', fixed: true, showInfobox: true});\nvar b = board.create('point',[xb,yb],{name: 'B', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow',fixed: true, showInfobox: true});\n\n\n//ans(was tree) is defined at the end and nscope looks important\n//but they're both variables\n var ans;\n var nscope = new Numbas.jme.Scope([scope,{variables:{x:new Numbas.jme.types.TNum(0)}}]);\n//this is the beating heart of whatever plots the function,\n//I've changed this from being curve to functiongraph\n var line = board.create('functiongraph',[function(x){\nif(ans) {\n try {\nnscope.variables.x.value = x;\n var val = Numbas.jme.evaluate(ans,nscope).value;\n return val;\n }\n catch(e) {\nreturn 13;\n }\n}\nelse\n return 13;\n },-12,12]\n , {strokeColor:\"blue\",strokeWidth: 4} );\n \nvar correct_line = board.create('functiongraph',[function(x){ return m*x+c},-22,22], {strokeColor:\"green\",setLabelText:'mx+c',visible: false, strokeWidth: 4, highlightStrokeColor: 'green'} )\n\nquestion.lines = {\n l:line, c:correct_line\n}\n\n question.signals.on('HTMLAttached',function(e) {\nko.computed(function(){\nvar expr = question.parts[2].gaps[0].display.studentAnswer();\n\n//define ans as this \ntry {\n ans = Numbas.jme.compile(expr,scope);\n}\ncatch(e) {\n ans = null;\n}\nline.updateCurve();\ncorrect_line.updateCurve();\nboard.update();\n});\n });\n\n\nreturn div;", "parameters": [], "language": "javascript"}}, "rulesets": {}}, {"name": "factorise a quadratic", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Daniel Mansfield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/743/"}, {"name": "Laure Helme-Guizon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2531/"}], "variable_groups": [], "rulesets": {}, "preamble": {"js": "", "css": ""}, "statement": "

Consider the quadratic $ \\simplify[all,expandBrackets]{({a}*x + {b})*(x+{c})}$.

", "parts": [{"type": "gapfill", "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "useCustomName": false, "showFeedbackIcon": true, "unitTests": [], "marks": 0, "gaps": [{"variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "valuegenerators": [{"name": "x", "value": ""}], "customName": "", "unitTests": [], "vsetRange": [0, 1], "notallowed": {"strings": ["/"], "showStrings": true, "partialCredit": 0, "message": ""}, "vsetRangePoints": 5, "showPreview": true, "showCorrectAnswer": true, "scripts": {"mark": {"script": "\nvar variables = this.question.scope.variables;\nvar unwrap = Numbas.jme.unwrapValue;\n\nvar a = unwrap(variables.a);\nvar b = unwrap(variables.b);\nvar c = unwrap(variables.c);\n\ntry {\n // get the student's answers to the two gaps\n var gap0 = this.parentPart.gaps[0].studentAnswer;\n \n if (!gap0) {\n return; \n }\n \n // there are two roots: -b/a and -c. Make sure there is exactly one root in gap0\n \n var root0 = -1*b/a;\n var root1 = -1*c;\n var correctanswer = a + \"*x*x + (\" +(b+c*a) + \")*x\" + b*c;\n var gap0root0 = (\"0\" == unwrap(this.question.scope.evaluate(gap0,{\"x\": root0})));\n var gap0root1 = (\"0\" == unwrap(this.question.scope.evaluate(gap0,{\"x\": root1})));\n \n // check that gap0 is linear by verifying that it increases by\n // the same constant amount from 10 to 11 and 11 to 12.\n var e10 = unwrap(this.question.scope.evaluate(gap0,{\"x\": 10}));\n var e11 = unwrap(this.question.scope.evaluate(gap0,{\"x\": 11}));\n var e12 = unwrap(this.question.scope.evaluate(gap0,{\"x\": 12}));\n if ((e11 == e12) || (e11 - e10 !== e12 - e11)) {\n this.setCredit(0, \"$\" + gap0 + \"$ is not linear. A linear factor is of the form $Ax + B$ for constants $A \\\\neq 0$ and $B$.\");\n } else if ((gap0root0 && !gap0root1) || (!gap0root0 && gap0root1)) {\n // if root0 xor root1 is a root of gap0\n this.setCredit(1, \"$\" + gap0 + \"$ is a linear factor of $\\\\simplify{\" + correctanswer + \"}$.\");\n } else {\n this.setCredit(0, \"$\" + gap0 + \"$ is not a linear factor of $\\\\simplify{\" + correctanswer + \"}$.\" );\n }\n \n \n} catch(e) {\n this.setCredit(0); // if the student's answer isn't a valid expression, give 0 credit\n this.markingComment(e);\n alert(e);\n}", "order": "instead"}}, "useCustomName": false, "failureRate": 1, "type": "jme", "checkVariableNames": false, "checkingType": "absdiff", "showFeedbackIcon": true, "marks": 1, "variableReplacements": [], "adaptiveMarkingPenalty": 0, "checkingAccuracy": 0.001, "answer": "({a}*x + {b})", "extendBaseMarkingAlgorithm": true}, {"variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "valuegenerators": [{"name": "x", "value": ""}], "customName": "", "unitTests": [], "vsetRange": [0, 1], "notallowed": {"strings": ["/"], "showStrings": false, "partialCredit": 0, "message": ""}, "vsetRangePoints": 5, "showPreview": true, "showCorrectAnswer": true, "scripts": {"mark": {"script": "\nvar variables = this.question.scope.variables;\nvar unwrap = Numbas.jme.unwrapValue;\n\nvar a = unwrap(variables.a);\nvar b = unwrap(variables.b);\nvar c = unwrap(variables.c);\n\ntry {\n // get the student's answers to the two gaps\n var gap0 = this.parentPart.gaps[0].studentAnswer;\n var gap1 = this.parentPart.gaps[1].studentAnswer;\n \n if (!gap0 || !gap1) {\n return; \n }\n // check that gap1 is linear\n var e10 = unwrap(this.question.scope.evaluate(gap1,{\"x\": 10}));\n var e11 = unwrap(this.question.scope.evaluate(gap1,{\"x\": 11}));\n var e12 = unwrap(this.question.scope.evaluate(gap1,{\"x\": 12}));\n if ((e11 == e12) || (e11 - e10 !== e12 - e11)) {\n this.setCredit(0, \"$\" + gap1 + \"$ is not linear. A linear factor is of the form $Ax + B$ for constants $A \\\\neq 0$ and $B$.\");\n return;\n } \n \n var compare_settings = {};\n compare_settings.checkingType = \"absdiff\";\n compare_settings.vsetRangeStart = -5; //The lower bound of the range to pick variable values from.\n compare_settings.vsetRangeEnd = 5; //The upper bound of the range to pick variable values from.\n compare_settings.vsetRangePoints = 5; //The number of values to pick for each variable.\n compare_settings.checkingAccuracy = 0.1; // A parameter for the checking function to determine if two results are equal. See {@link Numbas.jme.checkingFunctions}.\n compare_settings.failureRate = 1;\n \n var studentanswer = \"(\" + gap0 + \")*(\" + gap1 + \")\";\n var correctanswer = a + \"*x*x + (\" +(b+c*a) + \")*x\" + b*c;\n \n for (var n = 0; n < 10; n++)\n {\n var x = Math.floor(10*Math.random());\n var test1 = unwrap(this.question.scope.evaluate(studentanswer,{\"x\": x}));\n var test2 = unwrap(this.question.scope.evaluate(correctanswer,{\"x\": x}));\n if (test1 != test2) {\n // student answer does not evaluate to the same thing as the correct answer\n this.setCredit(0,\"The product of the factors should be $\\\\simplify{\" + correctanswer + \"}$, but the product of your factors is $\\\\simplify[expandBrackets,all]{\" + studentanswer + \"}$.\");\n return;\n }\n }\n // student answer passed random testing. It is highly likely to be correct.\n this.setCredit(1,\"The product of your factors is $\\\\simplify{\" + correctanswer + \"}$.\");\n \n} catch(e) {\n this.setCredit(0); // if the student's answer isn't a valid expression, give 0 credit\n this.markingComment(e);\n alert(e);\n}", "order": "instead"}}, "useCustomName": false, "failureRate": 1, "type": "jme", "checkVariableNames": false, "checkingType": "absdiff", "showFeedbackIcon": true, "marks": 1, "variableReplacements": [], "adaptiveMarkingPenalty": 0, "checkingAccuracy": 0.001, "answer": "(x + {c})", "extendBaseMarkingAlgorithm": true}], "variableReplacements": [], "showCorrectAnswer": true, "adaptiveMarkingPenalty": 0, "scripts": {}, "customName": "", "prompt": "

What are the the two linear factors of this quadratic?

\n

[[0]] and [[1]].

", "extendBaseMarkingAlgorithm": true, "sortAnswers": false}], "ungrouped_variables": ["a", "b", "c"], "advice": "

You can use the quadratic formula to deduce that $\\simplify[all,expandBrackets]{({a}*x + {b})*(x+{c})}$ has roots:

\n

$ x = \\frac{\\simplify{-({a}*{c}+{b})}\\pm\\sqrt{ (\\var{a*c+b})^2 - 4\\times(\\var{a})\\times(\\var{b*c}) }}{2\\times \\var{a}} = \\var{-1*c} \\text{ or } \\displaystyle \\simplify{-1*{b}/{a}}.$

\n

The roots determine the factors, but only upto a constant. In general, a quadratic with roots $ \\var{-1*c}$ and $\\simplify{-1*{b}/{a}}$ has the form:

\n

$C \\times (x + \\simplify{{b}/{a}}) \\times (x - \\var{-1*c})$

\n

for some constant term $C$. The only thing left to do is determine the value of the constant which makes:

\n

$C \\times (x + \\simplify{{b}/{a}}) \\times (x - \\var{-1*c}) = \\simplify[all,expandBrackets]{({a}*x + {b})*(x+{c})}$.

\n

Equating the coefficients of the $x^2$ terms in the left and right hand sides shows that $C=\\var{a}$. So

\n

$ (\\var{a}x + \\var{b}) \\times (x-\\var{-1*c}) = \\simplify[all,expandBrackets]{({a}*x + {b})*(x+{c})}$.

", "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-5..-1)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..3)", "description": "

a

", "templateType": "anything"}}, "metadata": {"description": "

Quadratic factorisation that does not rely upon pattern matching.

", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "functions": {}}, {"name": "Find the equation of a line through two points - negative gradient", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Aiden McCall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1592/"}], "variable_groups": [], "rulesets": {}, "functions": {"correctPoints": {"parameters": [], "language": "javascript", "type": "html", "definition": "//point coordinate variables\nvar xa = Numbas.jme.unwrapValue(scope.variables.xa);\nvar xb = Numbas.jme.unwrapValue(scope.variables.xb);\nvar ya = Numbas.jme.unwrapValue(scope.variables.ya);\nvar yb = Numbas.jme.unwrapValue(scope.variables.yb);\nvar m = Numbas.jme.unwrapValue(scope.variables.m);\nvar c = Numbas.jme.unwrapValue(scope.variables.c);\n\n//make board\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[math.min(xa-4,-2),math.max(ya+4,2),math.max(xb+4,2),math.min(yb-4,-2)],grid: true});\nvar board = div.board;\nquestion.board = board;\n\n\n//points (with nice colors)\nvar a = board.create('point',[xa,ya],{name: 'A', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow', fixed: true, showInfobox: true});\nvar b = board.create('point',[xb,yb],{name: 'B', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow',fixed: true, showInfobox: true});\n\n\n//ans(was tree) is defined at the end and nscope looks important\n//but they're both variables\n\nvar correct_line = board.create('functiongraph',[function(x){ return m*x+c},-22,22], {strokeColor:\"green\",setLabelText:'mx+c',visible: true, strokeWidth: 4, highlightStrokeColor: 'green'} )\n\n\n\nquestion.signals.on('HTMLAttached',function(e) {\nko.computed(function(){\n//define ans as this \ncorrect_line.updateCurve();\nboard.update();\n});\n });\n\n\nreturn div;"}, "plotPoints": {"parameters": [], "language": "javascript", "type": "html", "definition": "\n//point coordinate variables\nvar xa = Numbas.jme.unwrapValue(scope.variables.xa);\nvar xb = Numbas.jme.unwrapValue(scope.variables.xb);\nvar ya = Numbas.jme.unwrapValue(scope.variables.ya);\nvar yb = Numbas.jme.unwrapValue(scope.variables.yb);\nvar m = Numbas.jme.unwrapValue(scope.variables.m);\nvar c = Numbas.jme.unwrapValue(scope.variables.c);\n\n//make board\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[math.min(xa-4,-2),math.max(ya+4,2),math.max(xb+4,2),math.min(yb-4,-2)],grid: true});\nvar board = div.board;\nquestion.board = board;\n\n//points (with nice colors)\nvar a = board.create('point',[xa,ya],{name: 'A', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow', fixed: true, showInfobox: true});\nvar b = board.create('point',[xb,yb],{name: 'B', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow',fixed: true, showInfobox: true});\n\n\n//ans(was tree) is defined at the end and nscope looks important\n//but they're both variables\n var ans;\n var nscope = new Numbas.jme.Scope([scope,{variables:{x:new Numbas.jme.types.TNum(0)}}]);\n//this is the beating heart of whatever plots the function,\n//I've changed this from being curve to functiongraph\n var line = board.create('functiongraph',[function(x){\nif(ans) {\n try {\nnscope.variables.x.value = x;\n var val = Numbas.jme.evaluate(ans,nscope).value;\n return val;\n }\n catch(e) {\nreturn 13;\n }\n}\nelse\n return 13;\n },-12,12]\n , {strokeColor:\"blue\",strokeWidth: 4} );\n \nvar correct_line = board.create('functiongraph',[function(x){ return m*x+c},-22,22], {strokeColor:\"green\",setLabelText:'mx+c',visible: false, strokeWidth: 4, highlightStrokeColor: 'green'} )\n\nquestion.lines = {\n l:line, c:correct_line\n}\n\n question.signals.on('HTMLAttached',function(e) {\nko.computed(function(){\nvar expr = question.parts[2].gaps[0].display.studentAnswer();\n\n//define ans as this \ntry {\n ans = Numbas.jme.compile(expr,scope);\n}\ncatch(e) {\n ans = null;\n}\nline.updateCurve();\ncorrect_line.updateCurve();\nboard.update();\n});\n });\n\n\nreturn div;"}}, "ungrouped_variables": ["xa", "xb", "ya", "yb", "m", "c", "twos", "twos2"], "metadata": {"description": "

Use two points on a line graph to calculate the gradient and $y$-intercept and hence the equation of the straight line running through both points.

\n

The answer box for the third part plots the function which allows the student to check their answer against the graph before submitting.

\n

This particular example has a negative gradient.

", "licence": "Creative Commons Attribution 4.0 International"}, "advice": "

a)

\n

We find the equation of a straight line passing through two points by finding the gradient and the $y$-intercept of the line.
We can find the gradient ($m$) using the points $A$ and $B$, $(x_1,y_1)=(\\var{xa},\\var{ya})$ and $(x_2,y_2)=(\\var{xb},\\var{yb})$ respectively.

\n

The definition of gradient is the ratio of vertical change ($y_2-y_1$) to horizontal change ($x_2-x_1$):

\n

\\[
\\begin{align}
m &= \\frac{y_2-y_1}{x_2-x_1} \\\\ 
&= \\frac{\\simplify[!collectNumbers]{{yb}-{ya}}}{\\simplify[!collectNumbers]{{xb}-{xa}}} \\\\ 
&= \\frac{\\simplify{{yb}-{ya}}}{\\simplify{{xb}-{xa}}} \\\\ 
&= \\simplify[simplifyFractions,unitDenominator]{({yb-ya})/({xb-xa})}\\text{.}
\\end{align}
\\]

\n

b)

\n

Rearranging the equation $y=mx+c$ and substituting either of the points gives two equations for the $y$-intercept $c$:

\n

\\[c = y_1-mx_1 \\quad \\mathrm{or} \\quad c = y_2-mx_2 \\,\\text{,} \\]

\n

Let's use point $B$:

\n

\\[
\\begin{align}
c &= y_2-mx_2 \\\\
&= \\var{ya}-(\\var{m}\\times\\var{xa}) \\\\
&= \\simplify{{ya-m*xa}}\\text{.}
\\end{align}
\\]

\n

We then check this against point $A$:

\n

\\[
\\begin{align}
y_1 &= mx_1 + c \\\\
&= \\simplify[fractionNumbers]{{m}{xb}+{c}} \\\\
&= \\simplify{{m}*{xb}+{c}}\\text{.}
\\end{align}
\\]

\n

c)

\n

Substituting our values for $m$ and $c$ into the equation for a straight line, $y=mx+c$, gives

\n

\\[y=\\simplify[all,!noLeadingMinus]{{m} x+ {c}}\\text{.}\\]

\n

This is plotted below:

\n

{correctPoints()}

", "statement": "

In this question we will identify the equation of the straight line passing through the points  $A=(\\var{xa},\\var{ya})$ and  $B=(\\var{xb},\\var{yb})$, in the form $y = mx + c$.

\n

{plotPoints()}

", "preamble": {"js": "", "css": ""}, "tags": ["gradient", "graphs", "line equation", "negative gradient", "Straight Line", "straight line", "taxonomy", "y-intercept"], "parts": [{"variableReplacementStrategy": "originalfirst", "sortAnswers": false, "scripts": {}, "variableReplacements": [], "type": "gapfill", "extendBaseMarkingAlgorithm": true, "prompt": "

Calculate the gradient, $m$, of the line between these two points.

\n

 $ m=$ [[0]]

\n

", "customName": "", "gaps": [{"extendBaseMarkingAlgorithm": true, "useCustomName": false, "correctAnswerStyle": "plain", "maxValue": "m", "customName": "", "showFractionHint": true, "variableReplacements": [], "unitTests": [], "customMarkingAlgorithm": "", "correctAnswerFraction": false, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "marks": 1, "allowFractions": false, "minValue": "m", "mustBeReduced": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "adaptiveMarkingPenalty": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}}], "useCustomName": false, "adaptiveMarkingPenalty": 0, "unitTests": [], "showFeedbackIcon": true, "customMarkingAlgorithm": "", "marks": 0, "showCorrectAnswer": true}, {"variableReplacementStrategy": "originalfirst", "sortAnswers": false, "scripts": {}, "variableReplacements": [], "type": "gapfill", "extendBaseMarkingAlgorithm": true, "prompt": "

Use this gradient and the points to calculate the $y$-intercept, $c$.

\n

$c=$ [[0]]

", "customName": "", "gaps": [{"extendBaseMarkingAlgorithm": true, "useCustomName": false, "correctAnswerStyle": "plain", "maxValue": "c", "customName": "", "showFractionHint": true, "variableReplacements": [], "unitTests": [], "customMarkingAlgorithm": "", "correctAnswerFraction": false, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "marks": 1, "allowFractions": false, "minValue": "c", "mustBeReduced": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "adaptiveMarkingPenalty": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}}], "useCustomName": false, "adaptiveMarkingPenalty": 0, "unitTests": [], "showFeedbackIcon": true, "customMarkingAlgorithm": "", "marks": 0, "showCorrectAnswer": true}, {"variableReplacementStrategy": "originalfirst", "sortAnswers": false, "scripts": {"mark": {"script": "console.log(this.question.lines.c)\nthis.question.lines.l.setAttribute({strokeColor: this.credit==1 ? 'green' : 'red'});\nthis.question.lines.c.setAttribute({visible: this.credit==1 ? false : true});\n", "order": "after"}}, "variableReplacements": [], "type": "gapfill", "extendBaseMarkingAlgorithm": true, "prompt": "

Using your values for $m$ and $c$, write down the equation of the straight line which passes through the two points A and B, in the form $y = mx +c$ 

\n

$\\displaystyle y=$ [[0]]

\n

Use the graph to plot your answer and check that it goes through these points.

", "customName": "", "gaps": [{"answer": "{m}*x+{c}", "failureRate": 1, "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001, "valuegenerators": [{"name": "x", "value": ""}], "notallowed": {"message": "

You must input your answer in the form y = mx +c where m and c are numbers.

", "showStrings": false, "partialCredit": 0, "strings": ["c", "m"]}, "checkingType": "absdiff", "unitTests": [], "customName": "", "variableReplacements": [], "vsetRange": [0, 1], "checkVariableNames": true, "customMarkingAlgorithm": "", "variableReplacementStrategy": "alwaysreplace", "type": "jme", "showPreview": true, "vsetRangePoints": 5, "useCustomName": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "marks": 1, "adaptiveMarkingPenalty": 0}], "useCustomName": false, "adaptiveMarkingPenalty": 0, "unitTests": [], "showFeedbackIcon": true, "customMarkingAlgorithm": "", "marks": 0, "showCorrectAnswer": true}], "variables": {"c": {"name": "c", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "ya-m*xa"}, "yb": {"name": "yb", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "ya-twos2"}, "twos2": {"name": "twos2", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..4 except 3)"}, "m": {"name": "m", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "(ya-yb)/(xa-xb)"}, "xb": {"name": "xb", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "xa+twos"}, "twos": {"name": "twos", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..4 except 3 )"}, "ya": {"name": "ya", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5)"}, "xa": {"name": "xa", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..2 except[0,-2,-4])"}}, "variablesTest": {"maxRuns": 100, "condition": "\n"}}, {"name": "Using the Logarithm Equivalence $\\log_ba=c \\Longleftrightarrow a=b^c$", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}], "type": "question", "statement": "

Changing the subject of an equation involving logarithms often requires the use of the equivalence

\n

\\[\\log_ba=c \\Longleftrightarrow a=b^c\\text{.}\\]

", "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"h2": {"group": "part3", "description": "", "templateType": "anything", "name": "h2", "definition": "random(2..4)"}, "f3": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "f3", "definition": "random(3..8)"}, "h1": {"group": "part3", "description": "", "templateType": "anything", "name": "h1", "definition": "random(1..10 except h2)"}, "g2": {"group": "part 2", "description": "", "templateType": "anything", "name": "g2", "definition": "random(2..10except g1)"}, "f2": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "f2", "definition": "random(2..10 except f3 f)"}, "f5": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "f5", "definition": "random(2..6 except f1)"}, "f4": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "f4", "definition": "random(5..12 except f2 f)"}, "f1": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "f1", "definition": "random(2..5 except f)"}, "g1": {"group": "part 2", "description": "", "templateType": "anything", "name": "g1", "definition": "random(2..10)"}, "f": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "f", "definition": "random(2..10)"}, "g3": {"group": "part 2", "description": "", "templateType": "anything", "name": "g3", "definition": "random(2..10except g1 g2)"}, "g4": {"group": "part 2", "description": "", "templateType": "anything", "name": "g4", "definition": "random(2..10except g1 g2 g3)"}}, "functions": {}, "tags": ["logarithm", "Logarithm", "Logarithm equivalence law", "logarithm laws", "Logs", "logs", "taxonomy"], "variable_groups": [{"name": "part 2", "variables": ["g3", "g2", "g4", "g1"]}, {"name": "part3", "variables": ["h1", "h2"]}], "parts": [{"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"checkingtype": "absdiff", "scripts": {}, "showpreview": true, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "expectedvariablenames": [], "marks": 1, "variableReplacements": [], "answer": "{f^f1}", "checkvariablenames": false, "type": "jme"}], "showCorrectAnswer": true, "prompt": "

Rearrange the equation to find $x$.

\n

$\\log_\\var{f}(x)=\\var{f1}$ 

\n

$x=$ [[0]]

", "type": "gapfill"}, {"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"checkingtype": "absdiff", "scripts": {}, "showpreview": true, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "expectedvariablenames": [], "marks": 1, "variableReplacements": [], "answer": "{g1}^(y+{g2})", "checkvariablenames": false, "type": "jme"}], "showCorrectAnswer": true, "prompt": "

Make $x$ the subject of the following equation.

\n

$\\log_\\var{g1}(x)=y+\\var{g2}$

\n

$x=$ [[0]]

", "type": "gapfill"}, {"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"checkingtype": "absdiff", "scripts": {}, "showpreview": true, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "expectedvariablenames": [], "marks": 1, "variableReplacements": [], "answer": "(y+{h1})^(1/{h2})", "checkvariablenames": false, "type": "jme"}], "showCorrectAnswer": true, "prompt": "

Make $x$ the subject of the equation, leaving your answer in the form $a^{\\frac{1}{b}}$.

\n

$\\log_x(y+\\var{h1})=\\var{h2}$

\n

$x=$ [[0]]

", "type": "gapfill"}, {"maxAnswers": 0, "minMarks": 0, "distractors": ["", "", "", "", "", ""], "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "choices": ["

$\\log_a(a^x)$

", "

$a^{\\log_a(x)}$

", "

$e^{\\ln(x)}$

", "

$\\log_{10}(x)$

", "

$\\log_e(x)$

", "

$\\ln(e^x)$

"], "showFeedbackIcon": true, "prompt": "

Which of the following expressions are equivalent to $x$?

", "minAnswers": 0, "shuffleChoices": true, "matrix": ["1", "1", "1", "-5", "-5", "1"], "variableReplacements": [], "marks": 0, "displayColumns": 0, "scripts": {}, "warningType": "none", "showCorrectAnswer": true, "displayType": "checkbox", "type": "m_n_2"}], "ungrouped_variables": ["f", "f2", "f1", "f3", "f4", "f5"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Rearrange some expressions involving logarithms by applying the relation $\\log_b(a) = c \\iff a = b^c$.

"}, "preamble": {"css": "", "js": ""}, "advice": "

a)

\n

i)

\n

We can rearrange logarithms using indices. 

\n

\\[\\log_ba=c \\Longleftrightarrow a=b^c\\]

\n

Using this equivalence we can rewrite $\\log_\\var{f}x=\\var{f1}$.

\n

\\[\\begin{align}
x&= \\var{f}^\\var{f1} \\\\
&=\\var{f^f1}
\\end{align}\\]

\n

\n

b)

\n

i)

\n

We can use the equivalence to rewrite our equation.

\n

\\[\\log_ba=c \\Longleftrightarrow a=b^c\\]

\n

We can write out our values to makes it easier.

\n

\\[\\begin{align}
a&=x \\\\
b&=\\var{g1}\\\\
c&=y+\\var{g2}
\\end{align}\\]

\n

Then we can write out our equation in the required form.

\n

\\[x=\\var{g1}^{y+\\var{g2}}\\]

\n

\n

c)

\n

We can use the same equivalence as in part b)

\n

\\[\\log_ba=c \\Longleftrightarrow a=b^c\\]

\n

We have

\n

\\begin{align}
a&=y+\\var{h1} \\\\
b&=x\\\\
c&=\\var{h2}\\text{.} \\\\ \\\\
\\log_{x}(y+\\var{h1}) &= \\var{h2} \\\\
\\implies y+\\var{h1} &= x^{\\var{h2}} \\\\
x &= (y+\\var{h1})^{\\frac{1}{\\var{h2}}}
\\end{align}

\n

\n

d) 

\n

The two in this list that don't equal $x$ are $\\log_e(x)$ and $\\log_{10}(x)$.

\n

\\[\\begin{align}
\\log_e(x)&=\\ln(x)\\\\
\\log_{10}(x)&=\\log(x)\\text{.}
\\end{align}\\]

"}, {"name": "Completing the Square", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Katie Lester", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/586/"}, {"name": "Wan Mekwi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4058/"}], "tags": [], "metadata": {"description": "

Write the expression $ax^2+bx+c$ in completed square form $a(x+p)^2+k$.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Rewrite the expression \\[\\simplify{{a}x^2+{b}x+{c}}\\] in completed square form $a(x+k)^2+p$ for suitable numbers $a, k$ and $p$.

\n

\n

Your answer must be input exactly in this form.

", "advice": "

(a)

\n

Given the quadratic $q(x)=\\simplify{{a}x^2+{b}x+ {c}}$, one way of completing the square is to simply expand the term $a(x+k)^2+p$ and equate coefficients to the quadratic term. 

\n

Expanding  $a(x+k)^2+p$ gives $ax^2 + 2akx + ak^2 + p$. 

\n

Equating coefficients gives:

\n

$x^2:\\quad \\var{a}=a$ or $a=\\var{a}$.

\n

$x:\\quad \\var{b}= 2ak \\implies k =  \\simplify{{b}/(2{a})}$

\n

constant: $\\var{c}=ak^2+p \\implies p=\\var{c}-ak^2=\\simplify[all, fractionNumbers]{{c-b^2/(4a)}}$.

\n

Now, put these together to obtain: $\\qquad \\simplify[all, fractionNumbers]{{a}(x+{b}/(2{a}))^2+{c-b^2/(4a)}}$.

\n
\n

(b)

\n

Completing the square for this function gives:$\\qquad \\simplify[all, fractionNumbers]{{a}(x+{b}/(2{a}))^2+{c-b^2/(4a)}}$.

\n

The function attains its turning point when $\\quad \\simplify{{a}(x+{b}/(2{a}))^2}=0$ 

\n

So the $x$ coordinate of the turning point is $\\simplify{-{b}/(2{a})}$.

\n

The $y$ coordinate is $k=\\simplify[all, fractionNumbers]{{c-b^2/(4a)}}$.

\n

Hence the turning point is $\\quad (\\simplify{-{b}/(2{a})},\\simplify[all, fractionNumbers]{{c-b^2/(4a)}})$

", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-5..7 except 0)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-20..20)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "c", "b"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "(a)", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\simplify{{a}x^2+{b}x+ {c}} = \\phantom{{}}$ [[0]].

", "stepsPenalty": "2", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Given the quadratic $q(x)=\\simplify{{a}x^2+{b}x+ {c}}$, one way of completing the square is to simply expand the term $a(x+k)^2+p$ and equate coefficients to the quadratic term. 

\n

Expanding  $a(x+k)^2+p$ gives $ax^2 + 2akx + ak^2 + p$. 

\n

Equating coefficients gives:

\n

$x^2:\\quad \\var{a}=a$ or $a=\\var{a}$.

\n

$x:\\quad \\var{b}= 2ak \\implies k =  \\simplify{{b}/(2{a})}$

\n

constant: $\\var{c}=ak^2+p \\implies p=\\var{c}-ak^2=\\simplify[all, fractionNumbers]{{c-b^2/(4a)}}$.

\n

Now, put these together to obtain: $\\qquad \\simplify[all, fractionNumbers]{{a}(x+{b}/(2{a}))^2+{c-b^2/(4a)}}$.

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 2, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a}(x+{b}/(2{a}))^2+{c}-{b}^2/(4{a})", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.0001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "musthave": {"strings": ["(", ")", "^"], "showStrings": false, "partialCredit": 0, "message": "

please input in the form $(x+a)^2+b$

"}, "notallowed": {"strings": ["x^2", "x*x", "x x", "x(", "x*("], "showStrings": false, "partialCredit": 0, "message": "

Input your answer in the form $(x+a)^2+b$.

"}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "(b)", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Hence, state the coordinates of the turning point for $q(x)=\\simplify{{a}x^2+{b}x+ {c}}$:

\n

Turning point:$\\quad \\phantom{}$[[0]].

", "stepsPenalty": 1, "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Completing the square for this function gives:$\\qquad \\simplify[all, fractionNumbers]{{a}(x+{b}/(2{a}))^2+{c-b^2/(4a)}}$.

\n

The function attains its turning point when $\\quad \\simplify{{a}(x+{b}/(2{a}))^2}=0$ 

\n

So the $x$ coordinate of the turning point is $\\simplify{-{b}/(2{a})}$.

\n

The $y$ coordinate is $k=\\simplify[all, fractionNumbers]{{c-b^2/(4a)}}$.

\n

Hence the turning point is $\\quad (\\simplify{-{b}/(2{a})},\\simplify[all, fractionNumbers]{{c-b^2/(4a)}})$

"}], "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix([-{b}/(2{a}),{c}-{b}^2/(4{a})])", "correctAnswerFractions": true, "numRows": 1, "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Rearranging Logarithms involving Indices", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "statement": "

When logarithms involve indices we can rearrange them using the rule,

\n

\\[\\log_a(x^y)=y\\log_a(x)\\text{.}\\]

\n

This can also be useful for removing integers from the front of logarithms.

", "advice": "

a)

\n

i)

\n

We need to use the rule

\n

\\[k\\log_a(x)=\\log_a(x^k)\\text{.}\\]

\n

Subsituting in our values for $x$ and $k$ gives

\n

\\[\\var{x1[3]}\\log_a(\\var{z1[0]})=\\log_a(\\var{z1[0]^x1[3]})\\text{.}\\]

\n

ii)

\n

We need to use the rule

\n

\\[k\\log_a(x)=\\log_a(x^k)\\text{.}\\]

\n

Subsituting in our values for $x$ and $k$ gives

\n

\\[\\var{x1[1]}\\log_a(\\var{z1[1]})=\\log_a(\\var{z1[1]^x1[1]})\\text{.}\\]

\n

b)

\n

i)

\n

The rule for indices in logarithms also works the other way around,

\n

\\[\\log_a(x^k)=k\\log_a(x)\\text{.}\\]

\n

We can use this to rearrange our expression by substituting in values for $x$ and $k$.

\n

\\[\\begin{align}
\\log_a(\\var{x1[3]^z1[5]})&=k\\log_a(\\var{x1[3]})\\\\
\\var{x1[3]^z1[5]}&=\\var{x1[3]}^k\\\\
\\var{x1[3]^z1[5]}&=\\var{x1[3]}^\\var{z1[5]}\\\\
k&=\\var{z1[5]}\\\\
\\log_a(\\var{x1[3]^z1[5]})&=\\var{z1[5]}\\log_a(\\var{x1[3]})
\\end{align}\\]

\n

ii)

\n

As with i) we can use the rule

\n

\\[\\log_a(x^k)=k\\log_a(x)\\text{.}\\]

\n

We can use this to rearrange our expression by substituting in values for $x$ and $k$.

\n

\\[\\begin{align}
\\log_a(\\var{x1[5]^z1[6]})&=k\\log_a(\\var{x1[5]})\\\\
\\var{x1[5]^z1[6]}&=\\var{x1[5]}^k\\\\
\\var{x1[5]^z1[6]}&=\\var{x1[5]}^\\var{z1[6]}\\\\
k&=\\var{z1[6]}\\\\
\\log_a(\\var{x1[5]^z1[6]})&=\\var{z1[6]}\\log_a(\\var{x1[5]})
\\end{align}\\]

\n

c)

\n

i)

\n

From the structure of this question we can tell that the answer can be written in the form $k\\log_a(\\var{x1[3]})$, meaning all of the values in the expression

\n

\\[\\log_a(\\var{x1[3]^z1[2]})+\\log_a(\\var{x1[3]})\\]

\n

can be written in the form $k\\log_a(\\var{x1[3]})$.

\n

If we look at each log individually we can make sure they all take this form.

\n

\\[\\begin{align}
\\log_a(\\var{x1[3]^z1[2]})&=k\\log_a(\\var{x1[3]})\\\\
\\var{x1[3]^z1[2]}&=\\var{x1[3]}^k\\\\
\\var{x1[3]^z1[2]}&=\\var{x1[3]}^\\var{z1[2]}\\\\
k&=\\var{z1[2]}\\\\
\\log_a(\\var{x1[3]^z1[2]})&=\\var{z1[2]}\\log_a(\\var{x1[3]})
\\end{align}\\]

\n

We can now write our expression as

\n

\\[\\begin{align}
\\log_a(\\var{x1[3]^z1[2]})+\\log_a(\\var{x1[3]})&=\\var{z1[2]}\\log_a(\\var{x1[3]})+\\log_a(\\var{x1[3]})\\\\
&=\\var{z1[2]+1}\\log_a(\\var{x1[3]})\\text{.}
\\end{align}\\]

\n

ii)

\n

From this question we know our answer is written in the form $k\\log_a(\\var{x1[4]})$, meaning all of the values in the expression

\n

\\[\\log_a(\\var{x1[4]^z1[1]})+\\log_a(\\var{x1[4]^z1[0]})\\]

\n

can be written in the form $k\\log_a(\\var{x1[4]})$.

\n

If we look at each log individually we can make sure they all take this form.

\n

\\[\\begin{align}
\\log_a(\\var{x1[4]^z1[1]})&=k\\log_a(\\var{x1[4]})\\\\
\\var{x1[4]^z1[1]}&=\\var{x1[4]}^k\\\\
\\var{x1[4]^z1[1]}&=\\var{x1[4]}^\\var{z1[1]}\\\\
k&=\\var{z1[1]}\\\\
\\log_a(\\var{x1[4]^z1[1]})&=\\var{z1[1]}\\log_a(\\var{x1[4]})
\\end{align}\\]

\n

\\[\\begin{align}
\\log_a(\\var{x1[4]^z1[0]})&=k\\log_a(\\var{x1[4]})\\\\
\\var{x1[4]^z1[0]}&=\\var{x1[4]}^k\\\\
\\var{x1[4]^z1[0]}&=\\var{x1[4]}^\\var{z1[0]}\\\\
k&=\\var{z1[0]}\\\\
\\log_a(\\var{x1[4]^z1[0]})&=\\var{z1[0]}\\log_a(\\var{x1[4]})
\\end{align}\\]

\n

We can now write our expression as

\n

\\[\\begin{align}
\\log_a(\\var{x1[4]^z1[1]})+\\log_a(\\var{x1[4]^z1[0]})&=\\var{z1[1]}\\log_a(\\var{x1[4]})+\\var{z1[0]}\\log_a(\\var{x1[4]})\\\\
&=\\var{z1[1]+z1[0]}\\log_a(\\var{x1[4]})\\text{.}
\\end{align}\\]

\n

iii)

\n

From this question we know our answer is written in the form $k\\log_a(\\var{x1[5]})$, meaning all of the values in the expression

\n

\\[\\log_a(\\var{x1[5]^z1[1]})+\\log_a(\\var{x1[5]^z1[2]})-\\log_a(\\var{x1[5]^z1[4]})\\]

\n

can be written in the form $k\\log_a(\\var{x1[5]})$.

\n

If we look at each log individually we can make sure they all take this form.

\n

\\[\\begin{align}
\\log_a(\\var{x1[5]^z1[1]})&=k\\log_a(\\var{x1[5]})\\\\
\\var{x1[5]^z1[1]}&=\\var{x1[5]}^k\\\\
\\var{x1[5]^z1[1]}&=\\var{x1[5]}^\\var{z1[1]}\\\\
k&=\\var{z1[1]}\\\\
\\log_a(\\var{x1[5]^z1[1]})&=\\var{z1[1]}\\log_a(\\var{x1[5]})
\\end{align}\\]

\n

\\[\\begin{align}
\\log_a(\\var{x1[5]^z1[2]})&=k\\log_a(\\var{x1[5]})\\\\
\\var{x1[5]^z1[2]}&=\\var{x1[5]}^k\\\\
\\var{x1[5]^z1[2]}&=\\var{x1[5]}^\\var{z1[2]}\\\\
k&=\\var{z1[2]}\\\\
\\log_a(\\var{x1[5]^z1[2]})&=\\var{z1[2]}\\log_a(\\var{x1[5]})
\\end{align}\\]

\n

\\[\\begin{align}
\\log_a(\\var{x1[5]^z1[4]})&=k\\log_a(\\var{x1[5]})\\\\
\\var{x1[5]^z1[4]}&=\\var{x1[5]}^k\\\\
\\var{x1[5]^z1[4]}&=\\var{x1[5]}^\\var{z1[4]}\\\\
k&=\\var{z1[4]}\\\\
\\log_a(\\var{x1[5]^z1[4]})&=\\var{z1[4]}\\log_a(\\var{x1[5]})
\\end{align}\\]

\n

We can now write our expression as

\n

\\[\\begin{align}
\\log_a(\\var{x1[5]^z1[1]})+\\log_a(\\var{x1[5]^z1[2]})-\\log_a(\\var{x1[5]^z1[4]})&=\\var{z1[1]}\\log_a(\\var{x1[5]})+\\var{z1[0]}\\log_a(\\var{x1[5]})-\\var{z1[4]}\\log_a(\\var{x1[5]})\\\\
&=\\var{z1[1]+z1[2]-z1[4]}\\log_a(\\var{x1[5]})\\text{.}
\\end{align}\\]

", "variables": {"v": {"description": "", "group": "part c", "templateType": "anything", "name": "v", "definition": "random(2..10)"}, "b4": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "b4", "definition": "random(2..4 except b1)"}, "c": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "c", "definition": "b1^b4"}, "m": {"description": "", "group": "part c", "templateType": "anything", "name": "m", "definition": "random(2..20)"}, "p": {"description": "", "group": "part c", "templateType": "anything", "name": "p", "definition": "random(3..6)"}, "x1": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "x1", "definition": "repeat(random(2..5),8)"}, "q": {"description": "", "group": "part c", "templateType": "anything", "name": "q", "definition": "v^p"}, "y1": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "y1", "definition": "random(2..6)"}, "b1": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "b1", "definition": "random(2..8 #2)"}, "b": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "b", "definition": "c/2"}, "b2": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "b2", "definition": "b-2"}, "z1": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "z1", "definition": "repeat(random(2..4),10)"}}, "tags": ["logarithm", "Logarithm", "Logs", "logs", "taxonomy"], "variable_groups": [{"name": "part c", "variables": ["p", "v", "q", "m"]}], "parts": [{"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answer": "{x1[3]}^{z1[0]}", "marks": 1, "variableReplacements": [], "checkvariablenames": false, "showpreview": true}, {"checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answer": "{x1[1]}^{z1[1]}", "marks": 1, "variableReplacements": [], "checkvariablenames": false, "showpreview": true}], "showCorrectAnswer": true, "prompt": "

Simplify the following expressions. 

\n

i)

\n

$\\var{z1[0]}\\log_a(\\var{x1[3]})=\\log_a($ [[0]]$)$

\n

ii)

\n

$\\var{z1[1]}\\log_a(\\var{x1[1]})=\\log_a($ [[1]]$)$

", "marks": 0}, {"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answer": "{z1[5]}", "marks": 1, "variableReplacements": [], "checkvariablenames": false, "showpreview": true}, {"checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answer": "{z1[6]}", "marks": 1, "variableReplacements": [], "checkvariablenames": false, "showpreview": true}], "showCorrectAnswer": true, "prompt": "

Simplify the following expressions. 

\n

i)

\n

$\\log_a(\\var{x1[3]^z1[5]})=$ [[0]] $\\log_a(\\var{x1[3]})$

\n

ii)

\n

$\\log_a(\\var{x1[5]^z1[6]})=$ [[1]] $\\log_a(\\var{x1[5]})$

", "marks": 0}, {"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answer": "{z1[2]+1}", "marks": 1, "variableReplacements": [], "checkvariablenames": false, "showpreview": true}, {"checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answer": "{z1[1]+z1[0]}", "marks": 1, "variableReplacements": [], "checkvariablenames": false, "showpreview": true}, {"checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answer": "{z1[1]+z1[2]-z1[4]}", "marks": 1, "variableReplacements": [], "checkvariablenames": false, "showpreview": true}], "showCorrectAnswer": true, "prompt": "

i)

\n

$\\log_a(\\var{x1[3]^z1[2]})+\\log_a(\\var{x1[3]})=$ [[0]]$\\log_a(\\var{x1[3]})$

\n

ii)

\n

$\\log_a(\\var{x1[4]^z1[1]})+\\log_a(\\var{x1[4]^z1[0]})=$ [[1]]$\\log_a(\\var{x1[4]})$

\n

iii)

\n

$\\log_a(\\var{x1[5]^z1[1]})+\\log_a(\\var{x1[5]^z1[2]})-\\log_a(\\var{x1[5]^z1[4]})=$ [[2]]$\\log_a(\\var{x1[5]})$

", "marks": 0}], "ungrouped_variables": ["x1", "y1", "z1", "b1", "c", "b4", "b", "b2"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Use the rule $\\log_a(n^b) = b\\log_a(n)$ to rearrange some expressions.

"}, "preamble": {"css": "", "js": ""}, "functions": {}}, {"name": "Equations of straight lines MCQ", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}], "advice": "

All but one of the straight lines above follow the general formula $y=mx+c$ where $m$ is a constant denoting the gradient of a line and $c$ is a constant denting the $y$-intercept of a line. 

\n

The gradient (given by $m$), indicates the slope of a straight line. Where this is positive, the $y$-coordinate along the line increases by $m$ for every increase in the value of $x$ by $1$. For example, $y=3x$ indicates that for every increase in the value of $x$ by $1$, the value of $y$ increases by $3$. Where there is no $m$ (i.e. $y=c$), the line is straight and horizontal as the value of $y$ has no dependence on the value of $x$.

\n

The $y$-intercept (given by $c$), indicates the point where the line passes through the $y$-axis. If the line equation has no $c$ (i.e. $y=mx$), the line has a $y$ intercept of $0$ (passing through the origin).

\n

We can use our knowledge of the slope of the line and the $y$-intercept to then judge which points on the graph correspond to which equations.

\n

A:

\n

$y=\\simplify{{m1}x+{c1}}$  gives us $m=\\var{m1}$ and $c=\\var{c1}$.

\n

B:

\n

$y=\\simplify{{m2}x+{c2}}$  gives us $m=\\var{m2}$ and $c=\\var{c2}$.

\n

C:

\n

$y=\\simplify{{m3}x+{c3}}$  gives us $m=\\var{m3}$ and $c=\\var{c3}$.

\n

D:

\n

$y=\\simplify{{c4}}$  gives us $m=0$ and $c=\\var{c1}$.

\n

E:

\n

$x=\\var{c5}$  is the exception to the $y=mx+c$ form of writing straight line equations. This equation gives a value for $x$ independent of the value of $y$ so a straight, vertical line is formed at the $x$-coordinate $\\var{c5}$.

", "statement": "

Identify the equations which relate to the different functions displayed on the graph bellow.

\n

{geogebra_applet('WuavQqEG',[[\"m1\",m1],[\"m2\",m2],[\"m3\",m3],[\"c1\",c1],[\"c2\",c2],[\"c3\",c3],[\"c4\",c4],[\"c5\",c5],[\"f1\",f1],[\"d1\",d1],[\"a1\",a1],[\"b1\",b1]])}

\n

", "variables": {"cpar": {"name": "cpar", "group": "intercept", "templateType": "anything", "description": "", "definition": "random(500..750)"}, "m1": {"name": "m1", "group": "Gradient", "templateType": "anything", "description": "", "definition": "random(1..2#0.1)"}, "c4": {"name": "c4", "group": "intercept", "templateType": "anything", "description": "", "definition": "random(3..6)"}, "c5": {"name": "c5", "group": "intercept", "templateType": "anything", "description": "", "definition": "random(14..17)"}, "cfake": {"name": "cfake", "group": "intercept", "templateType": "anything", "description": "", "definition": "random(-8..-3)"}, "m3": {"name": "m3", "group": "Gradient", "templateType": "anything", "description": "", "definition": "random(-2..-1#0.1)"}, "a1": {"name": "a1", "group": "Point variables(removed)", "templateType": "anything", "description": "", "definition": "30"}, "c3": {"name": "c3", "group": "intercept", "templateType": "anything", "description": "", "definition": "random(1..5)"}, "c10": {"name": "c10", "group": "Point variables(removed)", "templateType": "anything", "description": "", "definition": "-30/m3"}, "m2": {"name": "m2", "group": "Gradient", "templateType": "anything", "description": "", "definition": "m1"}, "b1": {"name": "b1", "group": "Point variables(removed)", "templateType": "anything", "description": "", "definition": "25"}, "c2": {"name": "c2", "group": "intercept", "templateType": "anything", "description": "", "definition": "random(15..20)"}, "c1": {"name": "c1", "group": "intercept", "templateType": "anything", "description": "", "definition": "random(-10..-5)"}, "f1": {"name": "f1", "group": "Point variables(removed)", "templateType": "anything", "description": "", "definition": "-40"}, "mfake": {"name": "mfake", "group": "Gradient", "templateType": "anything", "description": "", "definition": "random(-4..-1)"}, "d1": {"name": "d1", "group": "Point variables(removed)", "templateType": "anything", "description": "", "definition": "60"}}, "tags": ["graph", "graphs", "Multiple choice", "Multiple Choice", "multiple choice", "straight lines", "taxonomy"], "ungrouped_variables": [], "functions": {}, "preamble": {"js": "", "css": ""}, "type": "question", "variable_groups": [{"variables": ["m1", "m2", "m3", "mfake"], "name": "Gradient"}, {"variables": ["c1", "c2", "c3", "c4", "c5", "cfake", "cpar"], "name": "intercept"}, {"variables": ["a1", "b1", "c10", "d1", "f1"], "name": "Point variables(removed)"}], "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "metadata": {"description": "

Match up equations with the corresponding lines on a graph.

", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"variableReplacements": [], "maxMarks": 0, "minMarks": 0, "minAnswers": 0, "answers": ["

$A_0$

", "

$B_0$

", "

$C_0$

", "

$D_0$

", "

$E_0$

", "

None of these

"], "displayType": "radiogroup", "warningType": "none", "layout": {"expression": "", "type": "all"}, "choices": ["

$y=\\simplify{{m1}x+{c1}}$

", "

$y=\\simplify{{m2}x+{c2}}$

", "

$y=\\simplify{{m3}x+{c3}}$

", "

$y=\\var{c4}$

", "

$x=\\var{c5}$

", "

$y=\\simplify{{mfake}x+{cfake}}$

"], "scripts": {}, "showCorrectAnswer": true, "type": "m_n_x", "maxAnswers": 0, "shuffleChoices": true, "marks": 0, "prompt": "

Use the graph above to match the correct line to each equation.

", "matrix": [["1", 0, 0, 0, 0, 0], [0, "1", 0, 0, 0, 0], [0, 0, "1", 0, 0, 0], [0, 0, 0, "1", 0, 0], [0, 0, 0, 0, "1", 0], [0, 0, 0, 0, 0, "1"]], "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "shuffleAnswers": false}]}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "contributors": [{"name": "Ruth Douglas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/9365/"}], "extensions": ["geogebra", "jsxgraph"], "custom_part_types": [], "resources": []}