// Numbas version: finer_feedback_settings {"name": "2425-MA140 Demo 0", "metadata": {"description": "
Demo assignment for MA140
", "licence": "None specified"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["Functions: Evaluating Functions 1", "", "", "", "", ""], "variable_overrides": [[], [], [], [], [], []], "questions": [{"name": "Niall's copy of Functions: Evaluating Functions 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}, {"name": "Niall Madden", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/20025/"}], "tags": [], "metadata": {"description": "Evaluating a linear function for a given value of $x$.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Given $f(x)=\\simplify{{m}x+{c}}$, find $f(\\var{n})$.
", "advice": "If $f(x)=\\simplify{{m}x+{c}}$, to find $f(\\var{n})$ we need to evaluate $f(x)$ when $x=\\var{n}$:
\n\\[ \\begin{split} f(\\var{n}) &\\,= \\simplify[alwaysTimes]{{m}({n})+{c}} \\\\ &\\,= \\simplify[!collectNumbers]{{m*n}+{c}} \\\\ &\\,= \\simplify{{m*n+c}}. \\end{split} \\]
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"m": {"name": "m", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,m])", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,1])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["m", "c", "n"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "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": "$f(\\var{n})=$[[0]]
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{m*n+c}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Functions: Evaluating Functions 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "tags": [], "metadata": {"description": "Evaluating a quadratic function for a given value of $t$.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Evaluate $g(t)=\\simplify{{a}t^2+{b}t+{c}}$ when $t=\\var{n}$.
", "advice": "If $g(t)=\\simplify{{a}t^2+{b}t+{c}}$, to find $g(\\var{n})$ we need to evaluate $g(t)$ when $t=\\var{n}$:
\n{check}
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "If(b>0,random(-5..5 except [-1,1,0]),random(2..5))", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything", "can_override": false}, "check": {"name": "check", "group": "Ungrouped variables", "definition": "if(a=1,'{sol1}','{sol2}')", "description": "", "templateType": "anything", "can_override": false}, "sol1": {"name": "sol1", "group": "Ungrouped variables", "definition": "\"\\\\[ \\\\begin{split} g(\\\\var{n}) &\\\\,= \\\\simplify[alwaysTimes,unitFactor]{{a}{n}^2+{b}{n}+{c}} \\\\\\\\ &\\\\,= \\\\simplify[!collectNumbers,unitFactor]{{a}{n^2}+{b*n}+{c}} \\\\\\\\ &\\\\,=\\\\simplify{{a*n^2+b*n+c}}. \\\\end{split} \\\\]
\"", "description": "", "templateType": "long string", "can_override": false}, "sol2": {"name": "sol2", "group": "Ungrouped variables", "definition": "\"\\\\[ \\\\begin{split} g(\\\\var{n}) &\\\\,= \\\\simplify[alwaysTimes,unitFactor]{{a}{n}^2+{b}{n}+{c}} \\\\\\\\ &\\\\,= \\\\simplify[!collectNumbers,unitFactor]{{a}{n^2}+{b*n}+{c}} \\\\\\\\ &\\\\,=\\\\simplify[,!collectNumbers,unitFactor]{{a*n^2}+{b*n}+{c}}\\\\\\\\ &\\\\,=\\\\simplify{{a*n^2+b*n+c}}. \\\\end{split} \\\\]
\"", "description": "", "templateType": "long string", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "n", "check", "sol1", "sol2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "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": "$g(\\var{n})=$[[0]]
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a*n^2+b*n+c}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Functions: Evaluating Functions 3", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "tags": [], "metadata": {"description": "Evaluating a cubic function for a given value of $x$.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Given $f(x)=\\simplify{{a}x^3+{b}x}$, find $f(\\var{n})$.
", "advice": "If $f(x)=\\simplify{{a}x^3+{b}x}$, to find $f(\\var{n})$ we need to evaluate $f(x)$ when $x=\\var{n}$:
\n{check}
\n", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(-4..4 except[-1,0,1])", "description": "", "templateType": "anything", "can_override": false}, "check": {"name": "check", "group": "Ungrouped variables", "definition": "if(a=1,'{sol1}','{sol2}')", "description": "", "templateType": "anything", "can_override": false}, "sol2": {"name": "sol2", "group": "Ungrouped variables", "definition": "\"\\\\[ \\\\begin{split} f(\\\\var{n}) &\\\\,= \\\\simplify[alwaysTimes,unitFactor]{{a}{n}^3+{b}{n}} \\\\\\\\ &\\\\,=\\\\simplify[alwaysTimes,!collectNumbers,unitFactor]{{a}{n^3}+{b*n}} \\\\\\\\ &\\\\,=\\\\simplify[!collectNumbers]{{a*n^3}+{b*n}} \\\\\\\\ &\\\\,=\\\\simplify{{a*n^3+b*n}}. \\\\end{split} \\\\]
\"", "description": "", "templateType": "long string", "can_override": false}, "sol1": {"name": "sol1", "group": "Ungrouped variables", "definition": "\"\\\\[ \\\\begin{split} f(\\\\var{n}) &\\\\,= \\\\simplify[alwaysTimes,unitFactor]{{a}{n}^3+{b}{n}} \\\\\\\\ &\\\\,=\\\\simplify[alwaysTimes,!collectNumbers,unitFactor]{{a}{n^3}+{b*n}} \\\\\\\\ &\\\\,=\\\\simplify{{a*n^3+b*n}}. \\\\end{split} \\\\]
\"", "description": "", "templateType": "long string", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "n", "check", "sol2", "sol1"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "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": "$f(\\var{n})=$[[0]]
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a*n^3+b*n}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Linear graphs: Find equation of a line 1", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}], "tags": [], "metadata": {"description": "Find the equation from the image of graph
", "licence": "None specified"}, "statement": "You can zoom and pan this image
\n{app}
To find the gradient
\nFirstly draw a right angled 'step' from left to right. This triangle can be anywhere, but it is more helpful for it to have corners on the vertices (whole number points) of the graph and it is easier to calculate with postive numbers.
\n{app_advice}
\nBefore we start to calculate, notice that the line is {uod}, so the gradient will be {pon} and the line is {sos}, so the absolute value of the number will be {mol}.
Now find the coordinates of the places your triangle meets the line
$(x_1,y_1)=(\\var{ax},\\var{ay})$ and $(x_2,y_2)=(\\var{bx},\\var{by})$
\nWe need to compare the 'rise on the y-axis' to the 'run across the x-axis', we can say that:
\n$\\text{gradient} = \\frac{\\text{rise}}{\\text{run}}$
\nThis is equivalent to using the formula:
$ m = \\frac{y_2 - y_1}{x_2 - x_1} $
and substitute the coordinates of the vertices of the triangle:
$\\begin{split} &\\, m = \\frac{\\var{by} - \\var{ay}}{\\var{bx} - \\var{ax}} \\\\
&\\, = \\frac{\\var{by-ay}}{\\var{bx-ax}} \\\\
&\\, = \\var[fractionNumbers]{m} \\\\
\\end{split} $
\n
To complete the equation
\nYou can either read the intercept from the graph (if it is obvious where the line cuts the y-axis) or you can calculate it.
\nWe know there gradient so we can write $y=\\var{m}x+c$ and rearrange to give us:
\n$c = \\simplify[all]{y - {m}x}$
Then subsitute the value of $x$ and $y$ from any point on the line, let's use $(\\var{ax},\\var{ay})$ to give
$c = \\var{ay} \\simplify[all]{- {m}} \\times \\var{ax}$
\n$c = \\var{c}$
\nSo the final equation is
\n$y = \\simplify[collectNumbers, zeroterm,unitfactor]{{m}x +{c}}$
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"app": {"name": "app", "group": "Ungrouped variables", "definition": "geogebra_applet(\n 800,500,\n [\n A: [\n definition: p1,\n label_visible: false,\n visible: false\n ],\n B: [\n definition: p2,\n label_visible: false,\n visible: false \n ],\n line: [\n definition: \"Line(A,B)\",\n label_visible: false\n ]\n ]\n)", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "(ay-by)/(ax-bx)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "ay-m*ax", "description": "", "templateType": "anything", "can_override": false}, "P1": {"name": "P1", "group": "Ungrouped variables", "definition": "vector(ax, ay)", "description": "", "templateType": "anything", "can_override": false}, "P2": {"name": "P2", "group": "Ungrouped variables", "definition": "vector(bx,by)", "description": "", "templateType": "anything", "can_override": false}, "uod": {"name": "uod", "group": "Ungrouped variables", "definition": "if(m=0,'horizontal',if(m=abs(m),'going up','going down'))", "description": "if(m=abs(m),'positive','negative')
", "templateType": "anything", "can_override": false}, "ax": {"name": "ax", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "", "templateType": "anything", "can_override": false}, "ay": {"name": "ay", "group": "Ungrouped variables", "definition": "random(0,1,2,3)", "description": "", "templateType": "anything", "can_override": false}, "bx": {"name": "bx", "group": "Ungrouped variables", "definition": "random(ax+1..3) \n", "description": "", "templateType": "anything", "can_override": false}, "by": {"name": "by", "group": "Ungrouped variables", "definition": "random(0..4 except ay)\n", "description": "", "templateType": "anything", "can_override": false}, "app_advice": {"name": "app_advice", "group": "Ungrouped variables", "definition": "geogebra_applet(\n 800,500,\n [\n A: [\n definition: p1,\n label_visible: false,\n visible: true\n ],\n B: [\n definition: p2,\n label_visible: false,\n visible: true \n ],\n \n C: [\n definition: p3,\n label_visible: false,\n visible: false \n ],\n \n line1: [\n definition: \"Line(A,B)\",\n label_visible: false,\n visible: true\n ],\n \n line2: [\n definition: \"Segment(A,C)\",\n label_visible: false,\n visible: true\n ],\n \n \n \n line3: [\n definition: \"Segment(C,B)\",\n label_visible: false,\n visible: true\n ]\n ]\n)", "description": "", "templateType": "anything", "can_override": false}, "p3": {"name": "p3", "group": "Ungrouped variables", "definition": "vector(bx,ay)", "description": "", "templateType": "anything", "can_override": false}, "pon": {"name": "pon", "group": "Ungrouped variables", "definition": "if(m=0,'zero',if(m=abs(m),'a positive number','a negative number'))", "description": "", "templateType": "anything", "can_override": false}, "sos": {"name": "sos", "group": "Ungrouped variables", "definition": "if(m=0,'horizontal',if(abs(m)<1,'shallow','steep'))", "description": "", "templateType": "anything", "can_override": false}, "mol": {"name": "mol", "group": "Ungrouped variables", "definition": "if(m=0,'zero',if(abs(m)<1,'less than 1','greater than or equal to 1'))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["app", "m", "c", "P1", "P2", "uod", "ax", "ay", "bx", "by", "app_advice", "p3", "pon", "sos", "mol"], "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": "Find the equation of the line.
", "answer": "y = {m}x + {c}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Linear graphs: Plotting 1 - integer values", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}], "tags": ["Category: Linear Graphs"], "metadata": {"description": "Drag points on an axis to plot a linear graph (integer gradient and intercept only)
", "licence": "None specified"}, "statement": "Move the points $A$ and $B$ to make line $\\simplify{y={m}x+{c}}$
", "advice": "There are two ways to think about this, either by considering the points A and B, or by considering gradient ($m$) and intercept ($c$).
Let us firstly look at gradient and intercept.
$y=\\simplify{{m}x+{c}}$
Therefore $m = \\var{m}$ and $c = \\var{c}$.
The intercept tells us where the line intercepts the $y$-axis, so we can move one of the points to $(0,\\var{c})$ straight away.
The gradient is a measure of 'how many units up for each unit across' (or 'units down' if the gradient is negative). In this case we want to go {uod} {abs(m)} for each unit across, so to place the second point we move across $1$ unit on the $x$-axis and {uod} {abs(m)} on the $y$-axis, which takes us to
$(1, \\var{c+m} )$.
The alternative method is to place the points directly
Choose any value of $x$ for your first point.
We will take $x = 1$ for this example.
Calculate the corresponding $y$-value by substituting into the equation $y=\\simplify{{m}x+{c}}$:
$y = \\var{m} \\times 1 + \\var{c}$
$y = \\var{m+c}$
\ntherefore the first point is $(1,\\var{m+c})$.
We repeat the process for $x=2$ (or any other value of $x$ that you choose)
$y = \\var{m} \\times 2 + \\var{c}$
\n$y = \\var{2*m+c}$
\ntherefore the second point is $(2,\\var{2*m+c})$.
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"app": {"name": "app", "group": "Ungrouped variables", "definition": "geogebra_applet(\n 800,500,\n [\n A: [\n definition: p1,\n label_visible: false\n ],\n B: [\n definition: p2,\n label_visible: false\n ],\n line: [\n definition: \"Line(A,B)\",\n label_visible: false\n ]\n \n \n ]\n \n \n)\n\n", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(-4,-3,-2,2,3,4,5)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "P1": {"name": "P1", "group": "Ungrouped variables", "definition": "vector(0,0)", "description": "", "templateType": "anything", "can_override": false}, "P2": {"name": "P2", "group": "Ungrouped variables", "definition": "vector(1,1)", "description": "", "templateType": "anything", "can_override": false}, "uod": {"name": "uod", "group": "Ungrouped variables", "definition": "if(m=abs(m),'up','down')", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["app", "m", "c", "P1", "P2", "uod"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "extension", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "l:\n value(app,\"line\")\n\nax:\n x(app,\"A\")\n\nay:\n y(app,\"A\")\n\nbx:\n x(app,\"B\")\n\nby:\n y(app,\"B\")\n\nmans:\n (ay-by)/(ax-bx)\n\ncans:\n ay - mans*ax\n\nmark:\n feedback(\"Your line is $\\\\var{value(app,'line')}$.\");\n correctif(mans=m AND cans=c)\n\ninterpreted_answer:\n mans\n", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "You can zoom and pan this image.
{app}
Rewrite the expression $\\frac{cx+d}{(kx+a)(x+b)}$ as partial fractions in the form $\\frac{A}{kx+a}+\\frac{B}{x+b}$.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Rewrite the following expression as partial fractions:
\n\\[ \\simplify{({c}x+{d})/(({k}x+{a})(x+{b}))} .\\]
", "advice": "To express \\[ \\simplify{({c}x+{d})/(({k}x+{a})(x+{b}))} \\] as partial fractions, we want to set this equal to the sum of 2 fractions with denominators $\\simplify{{k}x+{a}}$ and $\\simplify{x+{b}}$. Since these are both distinct linear factors, this tells us that the numerators will be constants, which we will call $A$ and $B$:
\n\\[ \\simplify{({c}x+{d})/(({k}x+{a})(x+{b}))} = \\simplify{A/({k}x+{a}) + B/(x+{b})}.\\]
\nTo find the values of $A$ and $B$, we want to multiply this equation by the denominator of the left-hand side. This gives
\n\\[ \\simplify{{c}x+{d}=A(x+{b})+B({k}x+{a})}.\\]
\nThere are 2 methods of finding $A$ and $B$. The first is to choose suitable values for $x$ which will eliminate one of the terms, and the other is to compare the coefficients of each side of the equation. We will cover both methods here.
\nMethod 1:
\nTo find $A$, we can eliminate $B$ by setting $\\simplify[fractionNumbers]{x={-a/k}}$:
\n\\[ \\simplify[fractionNumbers]{{d-c*a/k}=A{b-a/k}} \\implies \\simplify[fractionNumbers]{A={(d-c*a/k)/(b-a/k)}}.\\]
\nSimilarly, to find B, we can eliminate $A$ by setting $\\simplify{x={-b}}$:
\n\\[ \\simplify{{d-c*b}=B{a-k*b}} \\implies \\simplify[fractionNumbers]{B={(d-c*b)/(a-k*b)}}.\\]
\nTherefore,
\n{check}
\nMethod 2:
\nBy comparing the coefficients of the $x$-terms and the constant terms we can form a pair of simultaneous equations to find $A$ and $B$.
\n\\[ \\begin{split} \\simplify{{c}x+{d}} &\\,= \\simplify{A(x+{b})+B({k}x+{a})} \\\\ &\\,= \\simplify{A*x+{b}A+{k}*B*x +{a}B} \\\\ &\\,=\\simplify{(A+{k}B)x +{b}A+{a}B} . \\end{split} \\]
\n\\[ \\begin{split}&(x):\\quad \\var{c} &\\,= \\simplify{A+{k}*B} \\\\ &(c):\\quad \\var{d} &\\,= \\simplify{{b}A+{a}B} .\\end{split} \\]
\nHence,
\n\\[A=\\simplify[fractionNumbers]{{Asol}},\\,B=\\simplify[fractionNumbers]{{Bsol}}, \\]
\nand
\n{check}
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"Asol": {"name": "Asol", "group": "Ungrouped variables", "definition": "(d-c*a/k)/(b-a/k)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-9..9)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-9..9 except b*k)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "Bsol": {"name": "Bsol", "group": "Ungrouped variables", "definition": "(d-c*b)/(a-k*b)", "description": "", "templateType": "anything", "can_override": false}, "check": {"name": "check", "group": "Ungrouped variables", "definition": "if(Asol=round(Asol),'{Sol1}','{Sol2}')", "description": "", "templateType": "anything", "can_override": false}, "Sol1": {"name": "Sol1", "group": "Ungrouped variables", "definition": "\"\\\\[ \\\\simplify{({c}x+{d})/(({k}x+{a})(x+{b}))} = \\\\simplify[all,fractionNumbers]{{Asol}/({k}x+{a})+{Bsol}/(x+{b})}.\\\\]
\"", "description": "", "templateType": "long string", "can_override": false}, "Sol2": {"name": "Sol2", "group": "Ungrouped variables", "definition": "\"\\\\[ \\\\simplify{({c}x+{d})/(({k}x+{a})(x+{b}))} = \\\\simplify[all,fractionNumbers]{{k*d-c*a}/(({k*b-a})({k}x+{a}))+{d-c*b}/(({a-k*b})(x+{b}))}.\\\\]
\"", "description": "", "templateType": "long string", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(-9..9 except[c*a,c*b])", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "gcd(c,d)=1", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "d", "k", "Bsol", "Asol", "check", "Sol1", "Sol2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "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": "\n[[0]]
", "gaps": [{"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, "answer": "{(k*d-c*a)}/(({k*b-a})({k}x+{a}))+{d-c*b}/(({a-k*b})(x+{b}))", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": " `+-$n`?/($n`?*($n`?x+`+-$n`?))+`+-$n`?/($n`?*($n`?x+`+-$n`?)) `|`+-$n/`+-$n*(`+-$n`?/($n`?*($n`?x+`+-$n`?))+`+-$n`?/($n`?*($n`?x+`+-$n`?)))", "partialCredit": 0, "message": "", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}]}, {"name": "Engineering Calculus", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": [], "variable_overrides": [], "questions": []}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "typeendtoleave": false, "startpassword": "", "autoSubmit": true, "allowAttemptDownload": false, "downloadEncryptionKey": "", "showresultspage": "oncompletion"}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"enterreviewmodeimmediately": true, "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview", "activatereviewmode": "oncompletion", "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "end_message": "", "results_options": {"printquestions": true, "printadvice": true}, "feedbackmessages": [], "reviewshowexpectedanswer": true, "showanswerstate": true, "reviewshowfeedback": true, "showactualmark": true, "showtotalmark": true, "reviewshowscore": true, "reviewshowadvice": true}, "diagnostic": {"knowledge_graph": {"topics": [{"name": "Engineering Calculus", "description": "", "depends_on": [], "learning_objectives": []}], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Niall Madden", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/20025/"}], "extensions": ["geogebra"], "custom_part_types": [], "resources": []}