// Numbas version: finer_feedback_settings {"name": "ACE Maths 1", "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "duration": 3600, "percentPass": "0", "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""], "variable_overrides": [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []], "questions": [{"name": "BIDMAS: Precedence of operators 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "tags": [], "metadata": {"description": "

Questions testing understanding of the precedence of operators using BIDMAS, applied to integers. These questions only test DMAS. That is, only Division/Multiplcation and Addition/Subtraction.

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

Evaluate the following expressions:

", "advice": "

First work through the expression from left to right, evaluating any multiplications and divisions as you come to them. You should be left with an expression involving only pluses and minuses. Evaluate this expression, again working from left to right. Thus:

\n

a)

\n

\\[\\var{a}+\\var{b} \\times \\var{c}\\]

\n

\\[=\\var{a}+\\var{b*c}\\]

\n

\\[=\\var{a+b*c}\\]

\n

b)

\n

\\[\\var{a} \\times \\var{b}+\\var{c}\\]

\n

\\[=\\var{a*b}+\\var{c}\\]

\n

\\[=\\var{a*b+c}\\]

\n

c)

\n

\\[\\var{h}-\\var{a2*b2} \\div \\var{b2}\\]

\n

\\[=\\var{h}-\\var{a2}\\]

\n

\\[=\\var{h-a2}\\]

\n

d)

\n

\\[\\var{a} \\times \\var{b}+\\var{c*d} \\div \\var{d} - \\var{f} \\times \\var{g}\\]

\n

\\[=\\var{a*b}+\\var{c}-\\var{f*g}\\]

\n

\\[=\\var{a*b + c-f*g}\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"g1": {"name": "g1", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything", "can_override": false}, "e1": {"name": "e1", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(3..7)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(2..8 except [a,b])", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(1..11 except[a,b,c,d,e])", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(2..9 except a1)", "description": "", "templateType": "anything", "can_override": false}, "d1": {"name": "d1", "group": "Ungrouped variables", "definition": "random(1..11 except [a1,b1,c1])", "description": "", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "random(2..9 except a2)", "description": "", "templateType": "anything", "can_override": false}, "c2": {"name": "c2", "group": "Ungrouped variables", "definition": "random(2..9 except [a2,b2])", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "random(2..9 except [a1,b1])", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "Ungrouped variables", "definition": "random(7..15)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..11 except a)", "description": "", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "f1": {"name": "f1", "group": "Ungrouped variables", "definition": "random(3..7)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "f1", "c", "b", "e1", "d", "g", "f", "h", "a1", "a2", "b1", "b2", "c2", "c1", "g1", "d1"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "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": "

$\\var{a}+\\var{b} \\times\\var{c}$

", "minValue": "{a+b*c}", "maxValue": "{a+b*c}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "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": "

$\\var{a} \\times \\var{b}+\\var{c}$

", "minValue": "{a*b+c}", "maxValue": "{a*b+c}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "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": "

$\\var{h}-\\var{a2*b2} \\div \\var{b2}$

", "minValue": "{h-a2}", "maxValue": "{h-a2}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "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": "

$\\var{a} \\times \\var{b}+\\var{c*d} \\div \\var{d} - \\var{f}  \\times \\var{g}$

", "minValue": "{a*b + c-f*g}", "maxValue": "{a*b + c-f*g}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "BIDMAS: Precedence of operators 4", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "tags": [], "metadata": {"description": "

Questions testing understanding of the precedence of operators using BIDMAS. That is, they test Brackets, Indices, Division/Multiplication and Addition/Subtraction.

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

Evaluate the following expressions:

", "advice": "

First work through the expression from left to right, evaluating any expressions inside brackets, being careful to evaluate powers (indices) before MDAS. Thus:

\n

a)

\n

$[(\\var{a}-\\var{b} \\div \\var{c}^\\var{d})+\\var{e1} \\times \\var{f}^\\var{g}] \\div (\\var{h} \\times \\var{i1}^\\var{j} -\\var{k}) \\times [\\var{l} -\\var{m} \\times \\var{n} + \\var{p} \\div \\var{q}]$

\n

$=[(\\var{a}-\\var{b} \\div \\var{c^d})+\\var{e1} \\times \\var{f^g}] \\div (\\var{h} \\times \\var{i1^j} -\\var{k}) \\times [\\var{l} -\\var{m} \\times \\var{n} + \\var{p} \\div \\var{q}]$

\n

$=[(\\var{a}-\\var{b / (c^d)})+\\var{e1*f^g}] \\div (\\var{h * i1^j} -\\var{k}) \\times [\\var{l} -\\var{m*n} + \\var{p / q}]$

\n

$=[\\var{a-b / (c^d)+e1*f^g}] \\div (\\var{h * i1^j -k}) \\times [\\var{l -m*n + p / q}]=\\var{t*(l-m*n+s)}$

\n

b)

\n

$\\var{a2}+\\var{b2} \\times (\\var{-c2})^\\var{d2} +(\\var{e2}-\\var{f2})^\\var{g2}=\\var{a2}+\\var{b2} \\times (\\var{(-c2)^d2}) +(\\var{e2-f2})^\\var{g2}=\\var{a2}+\\var{b2*((-c2)^d2)} +\\var{(e2-f2)^g2}=\\var{a2+b2*(-c2)^d2 +(e2-f2)^g2}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"b": {"name": "b", "group": "Ungrouped variables", "definition": "r*c^d", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "i1": {"name": "i1", "group": "Ungrouped variables", "definition": "random(2..5 except [c,f])", "description": "", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(2..7)", "description": "", "templateType": "anything", "can_override": false}, "d2": {"name": "d2", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "templateType": "anything", "can_override": false}, "l": {"name": "l", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(2..11)", "description": "", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "f2": {"name": "f2", "group": "Ungrouped variables", "definition": "random(1..11 except e2)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "(b/(c^d)) - e1*f^g +t*h*i1^j-t*k", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "q*s", "description": "", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "random(2..11)", "description": "", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "e2": {"name": "e2", "group": "Ungrouped variables", "definition": "random(1..11)", "description": "", "templateType": "anything", "can_override": false}, "e1": {"name": "e1", "group": "Ungrouped variables", "definition": "random(2..8)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(3..7)", "description": "", "templateType": "anything", "can_override": false}, "j": {"name": "j", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "templateType": "anything", "can_override": false}, "c2": {"name": "c2", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "random(3..7)", "description": "", "templateType": "anything", "can_override": false}, "r": {"name": "r", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "Ungrouped variables", "definition": "random(3..11)", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(2..5 except c)", "description": "", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "templateType": "anything", "can_override": false}, "g2": {"name": "g2", "group": "Ungrouped variables", "definition": "random(2..3)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["f2", "b2", "d2", "g2", "i1", "a2", "c2", "e1", "e2", "a", "c", "b", "d", "g", "f", "h", "k", "j", "m", "l", "n", "q", "p", "s", "r", "t"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "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": "

$[(\\var{a}-\\var{b} \\div \\var{c}^\\var{d})+\\var{e1} \\times \\var{f}^\\var{g}] \\div (\\var{h} \\times \\var{i1}^\\var{j} -\\var{k}) \\times [\\var{l} -\\var{m} \\times \\var{n} + \\var{p} \\div \\var{q}]$

", "minValue": "{t*(l-m*n+s)}", "maxValue": "{t*(l-m*n+s)}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "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": "

$\\var{a2}+\\var{b2} \\times (\\var{-c2})^\\var{d2} +(\\var{e2}-\\var{f2})^\\var{g2}$

", "minValue": "{a2+b2*(-c2)^d2 +(e2-f2)^g2}", "maxValue": "{a2+b2*(-c2)^d2 +(e2-f2)^g2}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Rearrange equations", "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": "Luigi Pivano", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18182/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

Rearrange the following equation:

\n

\\[cy -b = ax\\] 

", "advice": "

In order to rearrange the equation so that it is in terms of $y$, we must first add $b$ to both sides, and then divide both sides of the equation by $c$:

\n

\\begin{split} cy-b  &= ax \\\\ cy &= ax + b \\\\ y &=\\frac{ax+b}{c} \\end{split}

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "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": "

$y=$ [[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, "alternatives": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "answer": "(ax+b)/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": "ax", "value": ""}, {"name": "b", "value": ""}, {"name": "c", "value": ""}]}], "answer": "(a*x+b)/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": "a", "value": ""}, {"name": "b", "value": ""}, {"name": "c", "value": ""}, {"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Simplify: 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/"}, {"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "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 $\\simplify{{a}x}$ and $\\simplify{{d}x}$ to get $\\simplify{{a+d}x}$.

\n

For the $x$-terms, we have a $\\simplify{{a}x}$ and a $\\simplify{{d}x}$, which will cancel out with each other.

\n

There are also a $\\simplify{{c}x^2}$ term. So our answer is:

\n

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

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-5..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(-5..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-5..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..10)", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(-5..10 except 0 except -b)", "description": "", "templateType": "anything", "can_override": false}}, "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,unitFactor]{{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, "caseSensitive": false, "mustmatchpattern": {"pattern": "`+-$n`?*x^2+`+-$n`?*x+`+-$n`? `| `+-$n`?*x^2+`+-$n`?", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "x", "value": ""}]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Rounding: to a given number of decimal places", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}, {"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}], "tags": [], "metadata": {"description": "

Round numbers to a given number of decimal places.

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

We can approximate numbers by rounding.

\n

Round $\\var{c1}$ to a given number of decimal places.

", "advice": "

The first thing to do when we are rounding numbers is to identify the last digit we are keeping.

\n

When you're asked to round your answer to a number of decimal places, you need to decide whether to keep the last digit the same (rounding down) or increase it by 1 (rounding up). If the following digit is less than 5 we round down and we round up when the next digit is 5 or more.

\n

To write it down in steps:

\n
    \n
      \n
        \n
          \n
        1. Identify the last digit we need to keep.
        2. \n
        3. Look at the following digit.
        4. \n
        5. If it's 5 or more, increase the previous digit by one.
        6. \n
        7. If it's 4 or less, keep the previous digit the same.
        8. \n
        9. Fill any spaces to the right of the digit with zeros if needed.
        10. \n
        \n
      \n
    \n
\n

It is important to keep in mind that if the digit we are increasing is 9, it becomes zero and we increase the previous digit instead. If this digit is 9 as well, we move along to the left side until we find a digit less than 9.

\n
\n

To round a number to a given number $n$ of decimal places, we look at the $n$th digit after the decimal point.

\n

We have $\\var{c1}$.

\n

i)

\n

We look at the first digit after the decimal point. This is $\\var{cdig[4]}$ and the following digit is $\\var{cdig[3]}$ so we round updown to get $\\var{precround(c1, 1)}$.

\n

ii)

\n

The second digit after the decimal point is $\\var{cdig[3]}$. It is followed by $\\var{cdig[2]}$ so we round updown to get $\\var{precround(c1, 2)}$.

\n

iii)

\n

The 3rd decimal place is $\\var{cdig[2]}$, followed by $\\var{cdig[1]}$. We get $\\var{precround(c1, 3)}$. The 4th decimal place is $\\var{cdig[1]}$, followed by $\\var{cdig[0]}$. We get $\\var{precround(c1, 4)}$.

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"c1": {"name": "c1", "group": "Ungrouped variables", "definition": "n_from_digits(cdig)*10^(-5) + random(1..5)", "description": "

Random number with 5 decimal places.

", "templateType": "anything", "can_override": false}, "cdig": {"name": "cdig", "group": "Ungrouped variables", "definition": "repeat(random(1..9), 5)", "description": "", "templateType": "anything", "can_override": false}, "dp": {"name": "dp", "group": "Ungrouped variables", "definition": "random(3..4)", "description": "

Number of decimal places to round.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": "100"}, "ungrouped_variables": ["dp", "cdig", "c1"], "variable_groups": [], "functions": {"n_from_digits": {"parameters": [["digits", "list"]], "type": "number", "language": "jme", "definition": "if(\n len(digits)=0,\n 0,\n digits[0]+10*n_from_digits(digits[1..len(digits)])\n)"}}, "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": "

i)   $\\var{c1}$ rounded to 1 decimal place is:  [[0]]

\n

ii)   $\\var{c1}$ rounded to 2 decimal places is:  [[1]]

\n

iii)   $\\var{c1}$ rounded to {dp} decimal places is:  [[2]]

\n

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "precround(c1, 1)", "maxValue": "precround(c1, 1)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "precround(c1, 2)", "maxValue": "precround(c1, 2)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "precround(c1, dp)", "maxValue": "precround(c1, dp)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Rounding: to a given number of significant figures", "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": "Stanislav Duris", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1590/"}, {"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}], "tags": ["rounding"], "metadata": {"description": "

Round numbers to a given number of significant figures.

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

The first thing to do when we are rounding numbers is to identify the last digit we are keeping.

\n

When you're asked to round your answer to a number of significant figures, you need to decide whether to keep the last digit same (rounding down) or increase it by 1 (rounding up). If the following digit is less than 5 we round down and we round up when the next digit is 5 or more.

\n

To write it down in steps:

\n
    \n
      \n
        \n
          \n
        1. Identify the last digit we need to keep.
        2. \n
        3. Look at the following digit.
        4. \n
        5. If it's 5 or more, increase the previous digit by one.
        6. \n
        7. If it's 4 or less, keep the previous digit the same.
        8. \n
        9. Fill any spaces to the right of the digit with zeros if needed.
        10. \n
        \n
      \n
    \n
\n

It is important to keep in mind that if the digit we are increasing is 9, it becomes zero and we increase the previous digit instead. If this digit is 9 as well, we move along to the left side until we find a digit less than 9.

\n

The last digit we need to keep will depend on how many zeros there are.  We don't consider leading zeros to be significant,
i.e. 0.03 and 0.3 both have 1 significant figure (but 0.30 has two significant figures, since the second zero isn't a 'leading' zero).

\n

a)

\n

i)

\n

We round $\\var{d1}$ to 1 significant figure. The first non-zero digit is $\\var{ddig[5]}$. The following digit is $\\var{ddig[4]}$ so we round updown to get $\\var{dpformat(siground(d1, 1), 0)}$.

\n

ii)

\n

We round $\\var{d1}$ to {sf} significant figures. The first non-zero digit is $\\var{ddig[5]}$. The second following digit is $\\var{ddig[4]}$, the third following digit is $\\var{ddig[3]}$ and the fourth following digit is $\\var{ddig[2]}$. The digit following the last digit we are keeping is  $\\var{ddig[3]}$$\\var{ddig[2]}$$\\var{ddig[1]}$, so we round to get $\\var{sigformat(d1, sf)}$. These are our {sf} significant figures. 

\n

\n

b)

\n

i)

\n

We round $\\var{e1}$ to 1 significant figure. The first non-zero digit is $\\var{edig[4]}$, followed by $\\var{edig[3]}$. This is lower than 5 so we round downmore than 5 so we round up to get $\\var{sigformat(e1,1)}$.

\n

ii)

\n

We round $\\var{e1}$ to {sf} significant figures. The first non-zero digit is $\\var{edig[4]}$. The second following digit is $\\var{edig[3]}$, the third following digit is $\\var{edig[2]}$ and the fourth following digit is $\\var{edig[1]}$. The digit following the last digit we are keeping is $\\var{edig[2]}$$\\var{edig[1]}$$\\var{edig[0]}$, so we round to get $\\var{sigformat(e1, sf)}$. These are our {sf} significant figures. 

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"edig": {"name": "edig", "group": "Ungrouped variables", "definition": "repeat(random(1..9), 5)", "description": "", "templateType": "anything", "can_override": false}, "d1": {"name": "d1", "group": "Ungrouped variables", "definition": "n_from_digits(ddig)", "description": "

Random integer.

", "templateType": "anything", "can_override": false}, "e1": {"name": "e1", "group": "Ungrouped variables", "definition": "n_from_digits(edig)*10^(random(-6,-7,-8))", "description": "

Random number with 7 decimal places.

", "templateType": "anything", "can_override": false}, "ddig": {"name": "ddig", "group": "Ungrouped variables", "definition": "repeat(random(1..9), 6)", "description": "", "templateType": "anything", "can_override": false}, "sf": {"name": "sf", "group": "Ungrouped variables", "definition": "3", "description": "

Number of significant figures to round.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": "100"}, "ungrouped_variables": ["sf", "ddig", "edig", "d1", "e1"], "variable_groups": [], "functions": {"n_from_digits": {"parameters": [["digits", "list"]], "type": "number", "language": "jme", "definition": "if(\n len(digits)=0,\n 0,\n digits[0]+10*n_from_digits(digits[1..len(digits)])\n)"}}, "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": "

Round $\\var{d1}$ 

\n

i) $\\var{d1}$ rounded to 1 significant figure is:  [[0]]

\n

ii) $\\var{d1}$ rounded to {sf} significant figures is:  [[1]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "precround(siground(d1, 1),0)", "maxValue": "precround(siground(d1, 1),0)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "siground(d1, sf)", "maxValue": "siground(d1, sf)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"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": "

Round $\\var{e1}$

\n

iii) $\\var{e1}$ rounded to 1 significant figure is:  [[0]]

\n

iv) $\\var{e1}$ rounded to {sf} significant figures is:  [[1]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "siground(e1, 1)", "maxValue": "siground(e1, 1)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "siground(e1, sf)", "maxValue": "siground(e1, sf)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Calculation: Division Word Problem", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Adelle Colbourn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2083/"}, {"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "tags": [], "metadata": {"description": "

Given the total cost, insurance cost, and daily cost of hiring a bicycle, calculate the number of days the bicycle was hired for.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n

{names[index]} hired a bike during his holiday. The insurance cost was \\${insurance} regardless of the number of hire days and the hire fee was an additional \\${hire_per_day} per day. 

", "advice": "
\n
\n

The total cost includes both the insurance and the hire cost:

\n

\\[ \\begin{split} \\text{total cost} &= \\text{hire cost} + \\text{insurance} \\\\ $\\var{total_cost} &= \\text{hire cost} + $\\var{insurance} \\end{split} \\]

\n

If we subtract the insurance from the total cost we will have the hire cost:

\n

\\[ \\text{hire cost} = $\\var{total_cost} - $\\var{insurance} = $\\var{total_cost-insurance} \\]

\n

The question tells us that the bike costs \\$$\\var{hire_per_day}$ to hire each day.

\n

If we divide the total hire cost by the daily hire cost we will get the number of days:

\n

\\[\\text{number of days} = \\var{total_cost-insurance} ÷ \\var{hire_per_day} = \\var{days} \\]

\n

{names[index]} hired the bike for {days} days.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"insurance": {"name": "insurance", "group": "Ungrouped variables", "definition": "random(11 .. 27#1)", "description": "
\n
\n
\n
\n

The one-off fee for insurance.

", "templateType": "randrange", "can_override": false}, "days": {"name": "days", "group": "Ungrouped variables", "definition": "random(4 .. 9#1)", "description": "
\n
\n

The number of days that the bike is hired.

", "templateType": "randrange", "can_override": false}, "hire_per_day": {"name": "hire_per_day", "group": "Ungrouped variables", "definition": "random(22 .. 34#1)", "description": "
\n
\n
\n
\n

The dollar cost to hire the bike per day.

", "templateType": "randrange", "can_override": false}, "index": {"name": "index", "group": "Ungrouped variables", "definition": "random(0 .. 7#1)", "description": "
\n
\n
\n
\n
\n
\n
\n

Index for list of names.

", "templateType": "randrange", "can_override": false}, "names": {"name": "names", "group": "Ungrouped variables", "definition": "[ \"Sam\", \"Joseph\", \"Mark\", \"Jim\", \"Tarin\", \"Luke\", \"Ali\", \"Ben\" ]", "description": "
\n
\n
\n
\n
\n
\n

List of boys names for bike hire.

", "templateType": "list of strings", "can_override": false}, "total_cost": {"name": "total_cost", "group": "Ungrouped variables", "definition": "{insurance}+{hire_per_day}*{days}", "description": "
\n
\n
\n
\n

Total cost of hiring the bike over the time period.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["days", "hire_per_day", "insurance", "total_cost", "index", "names"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "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": "

If the total cost of the bike was \\${total_cost}, how many days did {names[index]} hire the bike for?

", "minValue": "{days}", "maxValue": "{days}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Percentages: Basic Calculations 1", "extensions": [], "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/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "tags": [], "metadata": {"description": "

Writing one number as a percentage of another.

", "licence": "None specified"}, "statement": "", "advice": "

When calculating one number as a percentage of another we can use the formula

\n

\\[ \\text{Percentage in decimal form} = \\frac{\\text{New value}}{\\text{Original value}} \\]

\n

So, to work out $\\var{new}$ as a percentage of $\\var{og}$,

\n

\\[ \\begin{split} \\text{Percentage in decimal form} &\\,= \\frac{\\var{new}}{\\var{og}} \\\\ &\\,= \\var{p/100} \\end{split} \\]

\n

To express our in answer as a percentage rather than in decimal form, we need to multiply this answer by $100$.

\n

Therefore, $\\var{new}$ as a percentage of $\\var{og}$ is \\[ \\var{p/100} \\times 100 = \\var{p} \\% \\]

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"p": {"name": "p", "group": "Ungrouped variables", "definition": "random(2..99 except 50)", "description": "", "templateType": "anything", "can_override": false}, "og": {"name": "og", "group": "Ungrouped variables", "definition": "random(101..999)", "description": "", "templateType": "anything", "can_override": false}, "new": {"name": "new", "group": "Ungrouped variables", "definition": "og*p*0.01", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "newWrite {new} as a percentage of {og}.

\n

[[0]]%

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "p", "maxValue": "p", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Simultaneous Equations: Linear Equations with Integer Solutions", "extensions": [], "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/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "tags": [], "metadata": {"description": "

Solving a pair of linear simultaneous equations with integer solutions.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Solve the simultaneous equations for $x$ and $y$.

\n

\\[ \\begin{split} \\simplify[!noLeadingminus,unitFactor]{{a}x+{b}y} &\\,=\\var{c} \\\\ \\simplify[!noLeadingminus,unitFactor]{{a1}x +{b1}y}  &\\,=\\var{c1} \\end{split}\\]

", "advice": "

\\[\\begin{split}\\simplify[!noLeadingminus,unitFactor]{{a}x+{b}y} &\\,=\\var{c} \\qquad\\qquad&(1)\\\\ \\simplify[!noLeadingminus,unitFactor]{{a1}x +{b1}y}  &\\,=\\var{c1} \\qquad\\qquad&(2)\\end{split}\\]

\n

\n

{advice}

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-2..8 except [0,1])", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-8..8 except [0,1,a])", "description": "", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(-5..8 except [0,1])", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(2..10 except [round(a1*b/a),b,0,1])", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "random(-7..7 except 0)", "description": "", "templateType": "anything", "can_override": false}, "aorsb": {"name": "aorsb", "group": "Ungrouped variables", "definition": "if(b*abs(b1)=b1*abs(b),'subtract','add')", "description": "", "templateType": "anything", "can_override": false}, "torfb": {"name": "torfb", "group": "Ungrouped variables", "definition": "if(b*abs(b1)=b1*abs(b),'from','to')", "description": "", "templateType": "anything", "can_override": false}, "sgn": {"name": "sgn", "group": "Ungrouped variables", "definition": "if(b*abs(b1)=b1*abs(b),-1,1)", "description": "", "templateType": "anything", "can_override": false}, "xn": {"name": "xn", "group": "Ungrouped variables", "definition": "c*abs(b1)+sgn*c1*abs(b)", "description": "", "templateType": "anything", "can_override": false}, "xd": {"name": "xd", "group": "Ungrouped variables", "definition": "a*abs(b1)+sgn*a1*abs(b)", "description": "", "templateType": "anything", "can_override": false}, "xsimp": {"name": "xsimp", "group": "Ungrouped variables", "definition": "xn/xd", "description": "", "templateType": "anything", "can_override": false}, "samex": {"name": "samex", "group": "Ungrouped variables", "definition": "\"

For these equations, it is easiest to get a solution for $y$ first, due to the $x$-terms having {eqoroppa} coefficients.

\\n

If we {aorsa} equation (2) {torfa} equation (1) this eliminates the $x$-terms leaving us with one equation in terms of $y$:

\\n

\\\\[ \\\\begin{split} \\\\simplify[!collectNumbers, !noLeadingminus]{({b}+{sgna*(b1)})y} &\\\\,= \\\\simplify[!collectNumbers, !noLeadingminus]{{c}+{sgna*(c1)}}\\\\\\\\ \\\\simplify{{b+sgna*(b1)}y} &\\\\,= \\\\simplify{{c+sgna*(c1)}} \\\\\\\\ y &\\\\,= \\\\simplify[all, fractionNumbers]{{c+sgna*(c1)}/{b+sgna*(b1)}} \\\\end{split} \\\\]

\\n

\\n

To obtain a solution for $x$ we can substitute this $y$-value into either of our initial equations. Using equation (1), we obtain

\\n

\\\\[ \\\\begin{split} \\\\var{a}x + \\\\var{b} \\\\times \\\\simplify[all, fractionNumbers]{{c+sgna*(c1)}/{b+sgna*(b1)}} &\\\\,= \\\\var{c} \\\\\\\\ \\\\var{a}x &\\\\,= \\\\simplify[all, !collectNumbers, !noLeadingminus]{{c} - {c*b+b*sgna*(c1)}/{b+sgna*(b1)}} \\\\\\\\ x &\\\\,= \\\\simplify[all, fractionNumbers]{{c/a - (c*b+b*sgna*(c1))/(a*b+a*sgna*(b1))}}. \\\\end{split} \\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "eqoroppb": {"name": "eqoroppb", "group": "Ungrouped variables", "definition": "if(abs(b)*b1=abs(b1)*b,'equal','equal and opposite')", "description": "", "templateType": "anything", "can_override": false}, "eqoroppa": {"name": "eqoroppa", "group": "Ungrouped variables", "definition": "if(abs(a)*a1=abs(a1)*a,'equal','equal and opposite')", "description": "", "templateType": "anything", "can_override": false}, "samey": {"name": "samey", "group": "Ungrouped variables", "definition": "\"

For these equations, it is easiest to get a solution for $x$ first, due to the $y$-terms having {eqoroppb} coefficients.

\\n

If we {aorsb} equation (2) {torfb} equation (1) this eliminates the $y$-terms, leaving us with one equation in terms of $x$:

\\n

\\\\[ \\\\begin{split} \\\\simplify[!collectNumbers, !noLeadingminus]{({a}+{sgn*(a1)})x} &\\\\,= \\\\simplify[!collectNumbers, !noLeadingminus]{{c}+{sgn*(c1)}}\\\\\\\\ \\\\simplify{{a+sgn*(a1)}x} &\\\\,= \\\\simplify{{c+sgn*(c1)}} \\\\\\\\ x &\\\\,= \\\\simplify[all, fractionNumbers]{{c+sgn*(c1)}/{a+sgn*(a1)}} \\\\end{split} \\\\]

\\n

\\n

To obtain a solution for $y$ we can substitute this $x$-value into either of our initial equations. Using equation (1), we obtain

\\n

\\\\[ \\\\begin{split} \\\\var{a} \\\\times\\\\simplify[fractionNumbers]{{c+sgn*(c1)}/{a+sgn*(a1)}} + \\\\var{b}y &\\\\,= \\\\var{c} \\\\\\\\ \\\\var{b}y &\\\\,= \\\\simplify[!collectNumbers, !noLeadingminus]{{c} - {c*a+a*sgn*(c1)}/{a+sgn*(a1)}} \\\\\\\\ y &\\\\,= \\\\simplify[all, fractionNumbers]{{c/b - (c*a+a*sgn*(c1))/(b*a+b*sgn*(a1))}}. \\\\end{split} \\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "lcmb": {"name": "lcmb", "group": "Ungrouped variables", "definition": "\"

To get a solution for $x$, if we multiply equation (2) by $\\\\simplify{{abs(b/b1)}}$ we will have two equations with {eqoroppb} $y$-coefficients:

\\n

\\\\[ \\\\begin{split} \\\\simplify[!noLeadingminus,unitFactor]{{a}x+{b}y} &\\\\,=\\\\var{c} \\\\qquad\\\\qquad&(3)\\\\\\\\ \\\\simplify[!noLeadingminus,unitFactor]{{a1*abs(b/b1)}x +{b1*abs(b/b1)}y}  &\\\\,=\\\\var{c1*abs(b/b1)} \\\\qquad\\\\qquad&(4)\\\\end{split}\\\\]

\\n

If we {aorsb} equation (4) {torfb} equation (3) this eliminates the $y$-terms, leaving us with one equation in terms of $x$:

\\n

\\\\[ \\\\begin{split} \\\\simplify[!collectNumbers, !noLeadingminus]{({a}+{sgn*(a1*abs(b/b1))})x} &\\\\,= \\\\simplify[all, !collectNumbers, !noLeadingminus]{{c}+{sgn*(c1*abs(b/b1))}}\\\\\\\\ \\\\simplify{{a+sgn*(a1*abs(b/b1))}x} &\\\\,= \\\\simplify{{c+sgn*(c1*abs(b/b1))}} \\\\\\\\ x &\\\\,= \\\\simplify[all,fractionNumbers]{{c+sgn*(c1*abs(b/b1))}/{a+sgn*(a1*abs(b/b1))}}. \\\\end{split} \\\\]

\\n

\\n

To obtain a solution for $y$ we can substitute this $x$-value into either of our initial equations. Using equation (1), we obtain

\\n

\\\\[ \\\\begin{split} \\\\var{a}\\\\times\\\\simplify[all, !noLeadingminus, !expandBrackets, fractionNumbers]{({c+sgn*c1*abs(b/b1)}/{(a)+sgn*a1*abs(b/b1)}) + {b}y} &\\\\,= \\\\var{c} \\\\\\\\ \\\\simplify{{b}y} &\\\\,= \\\\simplify[all, !noLeadingminus, fractionNumbers]{{c} -({(a*c)+a*sgn*c1*abs(b/b1)}/{(a)+sgn*a1*abs(b/b1)})} \\\\\\\\ \\\\simplify{{b}y} &\\\\,= \\\\simplify[all, !noLeadingminus, fractionNumbers]{{c -(a*c+a*sgn*c1*abs(b/b1))/(a+sgn*a1*abs(b/b1))}} \\\\\\\\ y &\\\\,=\\\\simplify[all, fractionNumbers]{{c/b -(a*c+a*sgn*c1*abs(b/b1))/(a*b+b*sgn*a1*abs(b/b1))}}. \\\\end{split} \\\\]

\\n

\"", "description": "", "templateType": "long string", "can_override": false}, "advice": {"name": "advice", "group": "Ungrouped variables", "definition": "if(abs(b)=abs(b1), {samey},{next})", "description": "", "templateType": "anything", "can_override": false}, "lcmb1": {"name": "lcmb1", "group": "Ungrouped variables", "definition": "\"

To get a solution for $x$, if we multiply equation (1) by $\\\\simplify{{abs(b1/b)}}$ we will have two equations with {eqoroppb} $y$-coefficients:

\\n

\\\\[ \\\\begin{split} \\\\simplify[!noLeadingminus,unitFactor]{{a*abs(b1/b)}x +{b*abs(b1/b)}y}  &\\\\,=\\\\var{c*abs(b1/b)} \\\\qquad\\\\qquad&(3) \\\\\\\\\\\\simplify[!noLeadingminus,unitFactor]{{a1}x+{b1}y} &\\\\,=\\\\var{c1} \\\\qquad\\\\qquad&(4)\\\\\\\\ \\\\end{split} \\\\]

\\n

If we {aorsb} equation (4) {torfb} equation (3) this eliminates the $y$-terms, leaving us with one equation in terms of $x$:

\\n

\\\\[ \\\\begin{split} \\\\simplify[!collectNumbers, !noLeadingminus]{({(a*abs(b1/b))}+{sgn*a1})x} &\\\\,= \\\\simplify[!collectNumbers, !noLeadingminus]{{(c*abs(b1/b))}+{sgn*c1}}\\\\\\\\ \\\\simplify{{(a*abs(b1/b))+sgn*a1}x} &\\\\,= \\\\simplify{{(c*abs(b1/b))+sgn*c1}} \\\\\\\\ x &\\\\,= \\\\simplify[all, fractionNumbers]{{(c*abs(b1/b))+sgn*c1}/{(a*abs(b1/b))+sgn*a1}}. \\\\end{split} \\\\]

\\n

\\n

To obtain a solution for $y$ we can substitute this $x$-value into either of our initial equations. Using equation (1), we obtain

\\n

\\\\[ \\\\begin{split} \\\\var{a}\\\\times\\\\simplify[all, !noLeadingminus, !expandBrackets, fractionNumbers]{({(c*abs(b1/b))+sgn*c1}/{(a*abs(b1/b))+sgn*a1}) + {b}y} &\\\\,= \\\\var{c} \\\\\\\\ \\\\simplify{{b}y} &\\\\,= \\\\simplify[all, !noLeadingminus, fractionNumbers]{{c} -({(a*c*abs(b1/b))+a*sgn*c1}/{(a*abs(b1/b))+sgn*a1})} \\\\\\\\ \\\\simplify{{b}y} &\\\\,= \\\\simplify[all, !noLeadingminus, fractionNumbers]{{c -(a*c*abs(b1/b)+a*sgn*c1)/(a*abs(b1/b)+sgn*a1)}} \\\\\\\\ y &\\\\,=\\\\simplify[all, fractionNumbers]{{c/b -(a*c*abs(b1/b)+a*sgn*c1)/(a*b*abs(b1/b)+b*sgn*a1)}}. \\\\end{split} \\\\]

\\n

\"", "description": "", "templateType": "long string", "can_override": false}, "full": {"name": "full", "group": "Ungrouped variables", "definition": "\"

To get a solution for $x$, if we multiply equation (1) by $\\\\var{abs(b1)}$ and equation (2) by $\\\\var{abs(b)}$, we will have two equations with {eqoroppb} $y$-coefficients:

\\n

\\\\[ \\\\begin{split} \\\\simplify[!noLeadingminus,unitFactor]{{a*abs(b1)}x+{b*abs(b1)}y} &\\\\,=\\\\var{c*abs(b1)} \\\\qquad\\\\qquad&(3)\\\\\\\\\\\\simplify[!noLeadingminus,unitFactor]{{a1*abs(b)}x +{b1*abs(b)}y}  &\\\\,=\\\\var{c1*abs(b)} \\\\qquad\\\\qquad&(4) \\\\end{split}\\\\]

\\n

Now, {aorsb} equation (4) {torfb} equation (3) to eliminate the $y$ terms:

\\n

\\\\[ \\\\begin{split} (\\\\simplify[!collectNumbers]{{a*abs(b1)} +{sgn*a1*abs(b)}}) x &\\\\,= \\\\simplify[!collectNumbers]{{c*abs(b1)}+{sgn*c1*abs(b)}} \\\\\\\\  \\\\simplify{{a*abs(b1)+sgn*a1*abs(b)} x} &\\\\,= \\\\simplify{{c*abs(b1)+sgn*c1*abs(b)}} .\\\\end{split} \\\\]

\\n

So the solution for $x$ is \\\\[ x=\\\\simplify{{c*abs(b1)+sgn*c1*abs(b)}/{a*abs(b1)+sgn*a1*abs(b)}}.\\\\]

\\n

To obtain a solution for $y$ we can substitute this value of $x$ into either of our initial equations. Using equation (1), we obtain

\\n

\\\\[ \\\\begin{split} \\\\simplify[noLeadingminus,fractionNumbers,unitFactor]{{a}  {xsimp} + {b}y} &\\\\,=\\\\var{c} \\\\\\\\ \\\\var{b}y &\\\\,= \\\\simplify[!collectNumbers,fractionNumbers]{{c}-{a*xsimp}} \\\\\\\\\\\\var{b}y &\\\\,= \\\\simplify[fractionNumbers]{{c-a*xsimp}} \\\\\\\\y &\\\\,= \\\\simplify[fractionNumbers]{({c/b-a*xsimp/b})} \\\\end{split} \\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "next": {"name": "next", "group": "Ungrouped variables", "definition": "if(abs(a)=abs(a1),{samex},{next2}) ", "description": "", "templateType": "anything", "can_override": false}, "next2": {"name": "next2", "group": "Ungrouped variables", "definition": "if(lcm(abs(b),abs(b1))=abs(b),{lcmb},{next3})", "description": "", "templateType": "anything", "can_override": false}, "next3": {"name": "next3", "group": "Ungrouped variables", "definition": "if(lcm(abs(b),abs(b1))=abs(b1),{lcmb1},{next2a})", "description": "", "templateType": "anything", "can_override": false}, "aorsa": {"name": "aorsa", "group": "Ungrouped variables", "definition": "if(a*abs(a1)=abs(a)*a1,'subtract','add')", "description": "", "templateType": "anything", "can_override": false}, "torfa": {"name": "torfa", "group": "Ungrouped variables", "definition": "if(a*abs(a1)=abs(a)*a1,'from','to')", "description": "", "templateType": "anything", "can_override": false}, "sgna": {"name": "sgna", "group": "Ungrouped variables", "definition": "if(a*abs(a1)=abs(a)*a1,-1,1)", "description": "", "templateType": "anything", "can_override": false}, "lcma": {"name": "lcma", "group": "Ungrouped variables", "definition": "\"

To get a solution for $y$, if we multiply equation (2) by $\\\\simplify{{abs(a/a1)}}$ we will have two equations with {eqoroppa} $x$-coefficients:

\\n

\\\\[ \\\\begin{split} \\\\simplify[!noLeadingminus,unitFactor]{{a}x+{b}y} &\\\\,=\\\\var{c} \\\\qquad\\\\qquad&(3)\\\\\\\\ \\\\simplify[!noLeadingminus,unitFactor]{{a1*abs(a/a1)}x +{b1*abs(a/a1)}y}  &\\\\,=\\\\var{c1*abs(a/a1)} \\\\qquad\\\\qquad&(4)\\\\end{split}\\\\]

\\n

If we {aorsa} equation (4) {torfa} equation (3) this eliminates the $x$-terms, leaving us with one equation in terms of $y$:

\\n

\\\\[ \\\\begin{split} \\\\simplify[!collectNumbers, !noLeadingminus]{({b}+{sgna*(b1*abs(a/a1))})y} &\\\\,= \\\\simplify[all, !collectNumbers, !noLeadingminus]{{c}+{sgna*(c1*abs(a/a1))}}\\\\\\\\ \\\\simplify{{b+sgna*(b1*abs(a/a1))}y} &\\\\,= \\\\simplify{{c+sgna*(c1*abs(a/a1))}} \\\\\\\\ y &\\\\,= \\\\simplify[all,fractionNumbers]{{c+sgna*(c1*abs(a/a1))}/{b+sgna*(b1*abs(a/a1))}}. \\\\end{split} \\\\]

\\n

\\n

To obtain a solution for $x$ we can substitute this $y$-value into either of our initial equations. Using equation (1), we obtain

\\n

\\\\[ \\\\begin{split} \\\\simplify[all, !noLeadingminus, !expandBrackets, fractionNumbers]{{a}x + {b}}\\\\times \\\\simplify[all, !noLeadingminus, !expandBrackets, fractionNumbers]{({c+sgna*c1*abs(a/a1)}/{(b)+sgna*b1*abs(a/a1)})} &\\\\,= \\\\var{c} \\\\\\\\ \\\\simplify{{a}x} &\\\\,= \\\\simplify[all, !noLeadingminus, fractionNumbers]{{c} -({(b*c)+b*sgna*c1*abs(a/a1)}/{(b)+sgna*b1*abs(a/a1)})} \\\\\\\\ \\\\simplify{{a}x} &\\\\,= \\\\simplify[all, !noLeadingminus, fractionNumbers]{{c -(b*c+b*sgna*c1*abs(a/a1))/(b+sgna*b1*abs(a/a1))}} \\\\\\\\ x &\\\\,=\\\\simplify[all, fractionNumbers]{{c/a -(b*c+b*sgna*c1*abs(a/a1))/(a*b+a*sgna*b1*abs(a/a1))}}. \\\\end{split} \\\\]

\\n

\"", "description": "", "templateType": "long string", "can_override": false}, "lcma1": {"name": "lcma1", "group": "Ungrouped variables", "definition": "\"

To get a solution for $y$, if we multiply equation (1) by $\\\\simplify{{abs(a1/a)}}$ we will have two equations with {eqoroppa} $x$-coefficients:

\\n

\\\\[ \\\\begin{split} \\\\simplify[!noLeadingminus,unitFactor]{{a*abs(a1/a)}x +{b*abs(a1/a)}y}  &\\\\,=\\\\var{c*abs(a1/a)} \\\\qquad\\\\qquad&(3) \\\\\\\\\\\\simplify[!noLeadingminus,unitFactor]{{a1}x+{b1}y} &\\\\,=\\\\var{c1} \\\\qquad\\\\qquad&(4) \\\\end{split}\\\\]

\\n

If we {aorsa} equation (4) {torfa} equation (3) this eliminates the $x$-terms, leaving us with one equation in terms of $y$:

\\n

\\\\[ \\\\begin{split} \\\\simplify[!collectNumbers, !noLeadingminus]{({(b*abs(a1/a))}+{sgna*b1})y} &\\\\,= \\\\simplify[!collectNumbers, !noLeadingminus]{{(c*abs(a1/a))}+{sgna*c1}}\\\\\\\\ \\\\simplify{{(b*abs(a1/a))+sgna*b1}y} &\\\\,= \\\\simplify{{(c*abs(a1/a))+sgna*c1}} \\\\\\\\ y &\\\\,= \\\\simplify[all, fractionNumbers]{{(c*abs(a1/a))+sgna*c1}/{(b*abs(a1/a))+sgna*b1}}. \\\\end{split} \\\\]

\\n

\\n

To obtain a solution for $x$ we can substitute this $y$-value into either of our initial equations. Using equation (1), we obtain

\\n

\\\\[ \\\\begin{split} \\\\simplify[all, !noLeadingminus, !expandBrackets, fractionNumbers]{{a}x + {b}}\\\\times \\\\simplify[all, !noLeadingminus, !expandBrackets, fractionNumbers]{({c*abs(a1/a)+sgna*c1}/{(b*abs(a1/a))+sgna*b1})} &\\\\,= \\\\var{c} \\\\\\\\ \\\\simplify{{a}x} &\\\\,= \\\\simplify[all, !noLeadingminus, fractionNumbers]{{c} -({(b*c*abs(a1/a))+b*sgna*c1}/{(b*abs(a1/a))+sgna*b1})} \\\\\\\\ \\\\simplify{{a}x} &\\\\,= \\\\simplify[all, !noLeadingminus, fractionNumbers]{{c -(b*c*abs(a1/a)+b*sgna*c1)/(b*abs(a1/a)+sgna*b1)}} \\\\\\\\ x &\\\\,=\\\\simplify[all, fractionNumbers]{{c/a -(b*c*abs(a1/a)+b*sgna*c1)/(a*b*abs(a1/a)+a*sgna*b1)}}. \\\\end{split} \\\\]

\\n

\"", "description": "", "templateType": "long string", "can_override": false}, "next2a": {"name": "next2a", "group": "Ungrouped variables", "definition": "if(lcm(abs(a),abs(a1))=abs(a),{lcma},{next3a})", "description": "", "templateType": "anything", "can_override": false}, "next3a": {"name": "next3a", "group": "Ungrouped variables", "definition": "if(lcm(abs(a),abs(a1))=abs(a1),{lcma1},{full})", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "xn/xd=round(xn/xd) and\n(c-a*xsimp)/b=round((c-a*xsimp)/b)", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "a1", "b1", "c", "c1", "aorsa", "torfa", "aorsb", "torfb", "sgna", "sgn", "xn", "xd", "xsimp", "eqoroppa", "eqoroppb", "advice", "next", "next2", "next3", "next2a", "next3a", "samey", "samex", "lcmb", "lcmb1", "lcma", "lcma1", "full"], "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": "

$x=$ [[0]]

\n

$y=$ [[1]]

", "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": "{(c*abs(b1)+sgn*c1*abs(b))/(a*abs(b1)+sgn*a1*abs(b))}", "answerSimplification": "basic, fractionNumbers", "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": []}, {"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": "{(c-a*xsimp)/b}", "answerSimplification": "basic, fractionNumbers", "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": "Quadratics: Solving a Quadratic Equation", "extensions": [], "custom_part_types": [{"source": {"pk": 2, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/2/edit"}, "name": "List of numbers", "short_name": "list-of-numbers", "description": "

The answer is a comma-separated list of numbers.

\n

The list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.

\n

You can optionally treat the answer as a set, so the number of occurrences doesn't matter, only whether each number is included or not.

", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n settings[\"separator\"] + \" \"\n)", "hint": {"static": false, "value": "if(settings[\"show_input_hint\"],\n \"Enter a list of numbers separated by {settings['separator']}.\",\n \"\"\n)"}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "bits:\nlet(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)\n\nexpected_numbers:\nlet(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)\n\nvalid_numbers:\nif(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )\n\nis_sorted:\nassert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )\n\nincluded:\nmap(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentThe separate items in the student's answer

", "definition": "let(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)"}, {"name": "expected_numbers", "description": "", "definition": "let(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)"}, {"name": "valid_numbers", "description": "

Is every number in the student's list valid?

", "definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )"}, {"name": "is_sorted", "description": "

Are the student's answers in ascending order?

", "definition": "assert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )"}, {"name": "included", "description": "

Is each number in the expected answer present in the student's list the correct number of times?

", "definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentHas every number been included the right number of times?

", "definition": "all(included)"}, {"name": "no_extras", "description": "

True if the student's list doesn't contain any numbers that aren't in the expected answer.

", "definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(\"Your answer contains \"+extra_numbers[0]+\" but should not.\");\n false\n )"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "if(lower(studentAnswer) in [\"empty\",\"\u2205\"],[],\n map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n )\n)"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)"}, {"name": "notationStyles", "description": "", "definition": "[\"en\"]"}, {"name": "isSet", "description": "

Should the answer be considered as a set, so the number of times an element occurs doesn't matter?

", "definition": "settings[\"isSet\"]"}, {"name": "extra_numbers", "description": "

Numbers included in the student's answer that are not in the expected list.

", "definition": "filter(not (x in expected_numbers),x,interpreted_answer)"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The list of numbers that the student should enter. The order does not matter.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "allowFractions", "label": "Allow the student to enter fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "correctAnswerFractions", "label": "Display the correct answers as fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "isSet", "label": "Is the answer a set?", "help_url": "", "hint": "If ticked, the number of times an element occurs doesn't matter, only whether it's included at all.", "input_type": "checkbox", "default_value": false}, {"name": "show_input_hint", "label": "Show the input hint?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": true}, {"name": "separator", "label": "Separator", "help_url": "", "hint": "The substring that should separate items in the student's list", "input_type": "string", "default_value": ",", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "tags": [], "metadata": {"description": "

Solving a quadratic equation of the form $ax^2+bx+c=0$.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Solve the following quadratic equation:

\n

{question}

\n

", "advice": "

For a quadratic equation of the form \\[ ax^2+bx+c = 0,\\] we can use the quadratic formula to find solutions for $x$: \\[ x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}.\\]

\n

{advice}

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..2)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-5..5 except [0,a])", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-10..10 except [0,a,b])", "description": "", "templateType": "anything", "can_override": false}, "solx1": {"name": "solx1", "group": "Ungrouped variables", "definition": "if(f=1,(-b+sqrt(b^2-4*a*c))/(2*a),(-b1+sqrt(b1^2-4*a1*c1))/(2*a1))", "description": "", "templateType": "anything", "can_override": false}, "solx2": {"name": "solx2", "group": "Ungrouped variables", "definition": "if(f=1,(-b-sqrt(b^2-4*a*c))/(2*a),(-b1-sqrt(b1^2-4*a1*c1))/(2*a1))", "description": "", "templateType": "anything", "can_override": false}, "sol1": {"name": "sol1", "group": "Ungrouped variables", "definition": "precround(solx1,3)", "description": "", "templateType": "anything", "can_override": false}, "sol2": {"name": "sol2", "group": "Ungrouped variables", "definition": "precround(solx2,3)", "description": "", "templateType": "anything", "can_override": false}, "question": {"name": "question", "group": "Ungrouped variables", "definition": "if(f=1,'{q1}','{q2}')", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(1,2)", "description": "", "templateType": "anything", "can_override": false}, "q1": {"name": "q1", "group": "Ungrouped variables", "definition": "\"

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

\"", "description": "", "templateType": "long string", "can_override": false}, "q2": {"name": "q2", "group": "Ungrouped variables", "definition": "\"

\\\\[ \\\\simplify{{m*n}x^2+{m*q+n*p}x+{p*q}=0}\\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(1,2)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(1..2 except m)", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "random(-5..6 except 0)", "description": "", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "random(-5..6 except[0,p])", "description": "", "templateType": "anything", "can_override": false}, "advice": {"name": "advice", "group": "Ungrouped variables", "definition": "if(f=2,'{solfac}','{solquad}')", "description": "", "templateType": "anything", "can_override": false}, "solfac": {"name": "solfac", "group": "Ungrouped variables", "definition": "\"

Note: In this case it is also possible to use factorisation to find solutions for $x$:

\\n

\\\\[ \\\\simplify{{m*n}x^2+{m*q+n*p}x+{p*q} = ({m}x+{p})({n}x+{q})}.\\\\]

\\n

However, we will give a worked solution using the quadratic formula, as this method holds for all quadratic equations of the form $ax^2+bx+c=0$.

\\n

For the equation \\\\[\\\\simplify{{a1}x^2+{b1}x+{c1}=0}, \\\\]

\\n

the values of the coefficients are \\\\[a=\\\\var{a1}, \\\\quad b=\\\\var{b1}, \\\\quad c=\\\\var{c1}.\\\\]

\\n

Substituting these values into the quadratic formula:

\\n

\\\\[ \\\\begin{split} x &= \\\\frac{\\\\simplify{-{b1}} \\\\pm \\\\sqrt{(\\\\var{b1})^2 - (4 \\\\times \\\\var{a1} \\\\times \\\\var{c1})}}{2 \\\\times \\\\var{a1}} \\\\\\\\\\\\\\\\&= \\\\frac{\\\\simplify{-{b1}} \\\\pm \\\\simplify[!collectNumbers]{sqrt({b1^2}-{4*a1*c1})}}{\\\\var{2*a1}} \\\\\\\\\\\\\\\\&= \\\\frac{\\\\simplify{-{b1}} \\\\pm \\\\simplify[!collectNumbers]{sqrt({b1^2-4*a1*c1})}}{\\\\var{2*a1}} \\\\\\\\\\\\\\\\&= \\\\frac{\\\\simplify{-{b1}} \\\\pm \\\\simplify{sqrt({b1^2-4*a1*c1})}}{\\\\var{2*a1}}. \\\\end{split} \\\\]

\\n

Note the $\\\\pm$ symbol in the quadratic formula. This means that there are $2$ solutions for $x$: one using $+$ and one using $-$. 

\\n

Therefore,

\\n

\\\\[ \\\\begin{split} x_1 &\\\\,= \\\\frac{\\\\simplify{-{b1}} + \\\\simplify{sqrt({b1^2-4*a1*c1})}}{\\\\var{2*a1}} \\\\qquad \\\\text{and} \\\\qquad  x_2 &\\\\,= \\\\frac{\\\\simplify{-{b1}} - \\\\simplify{sqrt({b1^2-4*a1*c1})}}{\\\\var{2*a1}}\\\\\\\\\\\\\\\\ &\\\\,= \\\\var{sol1},\\\\quad &\\\\,=\\\\var{sol2}. \\\\end{split}\\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "solquad": {"name": "solquad", "group": "Ungrouped variables", "definition": "\"

For the equation \\\\[\\\\simplify{{a}x^2+{b}x+{c}=0}, \\\\]

\\n

the values of the coefficients are \\\\[a=\\\\var{a}, \\\\quad b=\\\\var{b}, \\\\quad c=\\\\var{c}.\\\\]

\\n

Substituting these values into the quadratic formula:

\\n

\\\\[ \\\\begin{split} x &= \\\\frac{\\\\simplify{-{b}} \\\\pm \\\\sqrt{(\\\\var{b})^2 - (4 \\\\times \\\\var{a} \\\\times \\\\var{c})}}{2 \\\\times \\\\var{a}} \\\\\\\\\\\\\\\\&= \\\\frac{\\\\simplify{-{b}} \\\\pm \\\\simplify[!collectNumbers]{sqrt({b^2}-{4*a*c})}}{\\\\var{2a}} \\\\\\\\\\\\\\\\&= \\\\frac{\\\\simplify{-{b}} \\\\pm \\\\simplify[!collectNumbers]{sqrt({b^2-4*a*c})}}{\\\\var{2a}} \\\\\\\\\\\\\\\\&= \\\\frac{\\\\simplify{-{b}} \\\\pm \\\\simplify{sqrt({b^2-4*a*c})}}{\\\\var{2a}}. \\\\end{split} \\\\]

\\n

Note the $\\\\pm$ symbol in the quadratic formula. This means that there are $2$ solutions for $x$: one using $+$ and one using $-$. 

\\n

Therefore,

\\n

\\\\[ \\\\begin{split} x_1 &\\\\,= \\\\frac{\\\\simplify{-{b}} + \\\\simplify{sqrt({b^2-4*a*c})}}{\\\\var{2a}} \\\\qquad \\\\text{and} \\\\qquad  x_2 &\\\\,= \\\\frac{\\\\simplify{-{b}} - \\\\simplify{sqrt({b^2-4*a*c})}}{\\\\var{2a}}\\\\\\\\\\\\\\\\ &\\\\,= \\\\var{sol1},\\\\quad &\\\\,=\\\\var{sol2}. \\\\end{split}\\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "m*n", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "m*q+n*p", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "p*q", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "b^2-4a*c >0", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "a1", "m", "b1", "n", "c1", "p", "q", "solx1", "solx2", "sol1", "sol2", "question", "f", "q1", "q2", "advice", "solfac", "solquad"], "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": "

$x=$[[0]] 

\n

Give your answers to 3 decimal places where necessary.

", "gaps": [{"type": "list-of-numbers", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "[{sol1},{sol2}]", "allowFractions": false, "correctAnswerFractions": false, "isSet": false, "show_input_hint": true, "separator": ","}}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Pythagoras: calculating side length", "extensions": ["eukleides"], "custom_part_types": [], "resources": ["question-resources/Picture1_caMIdF1.png", "question-resources/Picture2_6KE4ZpW.png"], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "David Wishart", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1461/"}, {"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "tags": [], "metadata": {"description": "

Draws a triangle based on 3 side lengths and randomises asking for hypotenuse or not.

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

{max_height(25,diagram)}

", "advice": "

Avoid using rounded values in calculations and just round for the final answer.

Pythagoras Theorem states that, in a right angled triangle, with hypotenuse $c$:

\n

\\[a^2 + b^2 = c^2\\]

\n

Let's call the unknown value $x$, therefore we can write:

\n

$a = x$,  $b =\\var{ac}$ and $c = \\var{ab}$

\n

So

\n

\\[x^2 + \\var{ac}^2 = \\var{ab}^2 \\]

\n

This is equivalent to

\n

\\[ \\begin{split} x^2 &= \\var{ab}^2 - \\var{ac}^2 \\\\ &= \\var{ab^2} - \\var{ac^2} \\\\ &= \\var{ab^2-ac^2} \\end{split}\\]

\n

Therefore,

\n

\\[ \\begin{split} x &= \\sqrt{\\var{ab^2-ac^2}} \\\\ &= \\var{precround(sqrt(ab^2-ac^2),3)} \\\\ &= \\var{ans} \\text{ (1 d.p.)} \\end{split} \\]

\n

\n

$a = \\var{bc}$,  $b =\\var{ac}$ and $c = x$

\n

So

\\[\\var{bc}^2 + \\var{ac}^2 = x^2\\]

\n

equivalently,

\n

\\[ \\begin{split} x^2 &=\\var{bc}^2 + \\var{ac}^2 \\\\ &=\\var{bc^2} + \\var{ac^2} \\\\ &=\\var{bc^2 +ac^2} \\end{split}\\]

\n

Therefore,

\n

\\[ \\begin{split} x &= \\sqrt{\\var{bc^2 +ac^2}} \\\\ &= \\var{precround(sides_unrounded[2],3)} \\\\ &= \\var{ans} \\text{ (1 d.p.)} \\end{split} \\]

\n

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"c": {"name": "c", "group": "Unnamed group", "definition": "[random(-5..5 #0.1),random(-5..5 #0.1)]", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Unnamed group", "definition": "[random(-5..5 #0.1 except c[0]),c[1]]", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Unnamed group", "definition": "[c[0],random(-5..5 #0.1 except c[1])]", "description": "", "templateType": "anything", "can_override": false}, "ab": {"name": "ab", "group": "Unnamed group", "definition": "precround(sqrt(ac^2 + bc^2),1)", "description": "", "templateType": "anything", "can_override": false}, "ac": {"name": "ac", "group": "Unnamed group", "definition": "precround(sqrt((a[0]-c[0])^2 + (a[1]-c[1])^2),1)", "description": "", "templateType": "anything", "can_override": false}, "bc": {"name": "bc", "group": "Unnamed group", "definition": "precround(sqrt((c[0]-b[0])^2 + (c[1]-b[1])^2),1)", "description": "", "templateType": "anything", "can_override": false}, "diagram": {"name": "diagram", "group": "Varying q and advice", "definition": "if(setup=1, diagram1, diagram2)", "description": "", "templateType": "anything", "can_override": false}, "questionside": {"name": "questionside", "group": "Varying q and advice", "definition": "\"

Given a right angled triangle with one side $ \\\\var{ac} cm$ and a hypotenuse $\\\\var{ab} cm$, calculate the length of the unlabelled side.

\\n


Give your answer correct to 1 decimal place.

\"", "description": "", "templateType": "long string", "can_override": false}, "questionhyp": {"name": "questionhyp", "group": "Varying q and advice", "definition": "\"

Given a right angled triangle with perpendicular sides $ \\\\var{ac} cm$ and $\\\\var{bc} cm$, calculate the length of the unlabelled side.

Give your answer correct to 1 decimal place.

\"", "description": "", "templateType": "long string", "can_override": false}, "question": {"name": "question", "group": "Varying q and advice", "definition": "if(setup=1,questionside,questionhyp)", "description": "", "templateType": "anything", "can_override": false}, "setup": {"name": "setup", "group": "Varying q and advice", "definition": "random(1,2)", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Varying q and advice", "definition": "if(setup=1,precround(sqrt(ab^2-ac^2),1),precround(sides_unrounded[2],1))", "description": "", "templateType": "anything", "can_override": false}, "diagram1": {"name": "diagram1", "group": "Varying q and advice", "definition": "eukleides(\"A right-angled triangle\",\n let(\n a, point(a[0],a[1])\n , b, point(b[0],b[1])\n , c, point(c[0],c[1])\n\n , [\n \n a..b..c\n , angle(a,c,b) right\n , a..b label(ab)\n , a..c label(ac)\n , a label('A')\n , b label('B')\n , c label('C')\n \n ]\n )\n)", "description": "", "templateType": "anything", "can_override": false}, "diagram2": {"name": "diagram2", "group": "Varying q and advice", "definition": "eukleides(\"A right-angled triangle\",\n let(\n a, point(a[0],a[1])\n , b, point(b[0],b[1])\n , c, point(c[0],c[1])\n\n , [\n \n a..b..c\n , angle(a,c,b) right\n , b..c label(bc)\n , a..c label(ac)\n , a label('A')\n , b label('B')\n , c label('C')\n \n ]\n )\n)", "description": "", "templateType": "anything", "can_override": false}, "sides_unrounded": {"name": "sides_unrounded", "group": "Unnamed group", "definition": "[sqrt((a[0]-c[0])^2 + (a[1]-c[1])^2),sqrt((c[0]-b[0])^2 + (c[1]-b[1])^2),sqrt((a[0]-b[0])^2 + (a[1]-b[1])^2)]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "12 > ab > 1.5 &&\n12 > bc > 1.5 &&\n12 > ac > 1.5", "maxRuns": "10"}, "ungrouped_variables": [], "variable_groups": [{"name": "Unnamed group", "variables": ["c", "a", "b", "ab", "ac", "bc", "sides_unrounded"]}, {"name": "Varying q and advice", "variables": ["questionside", "questionhyp", "diagram", "question", "setup", "ans", "diagram1", "diagram2"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "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": "

{question}

\n

", "minValue": "{ans}", "maxValue": "{ans}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "1", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Logarithms: Finding x - Exponentials and Natural Logarithms", "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": "

Solving $e^{\\ln(x)}+\\ln(e^x)=a$ for $x$.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Solve for $x$:

\n

\\[ e^{\\ln(x)}+\\ln(e^x) = \\var{a} . \\]

", "advice": "

To solve for $x$, recall that both $\\ln(e^x)=x$ and $e^{\\ln(x)}=x$. 

\n

Therefore,

\n

\\[ \\begin{split} e^{\\ln(x)}+\\ln(e^x) &\\,= \\var{a} \\\\ 2x&\\,=\\var{a} \\\\ x&\\,=\\simplify[fractionNumbers]{{a/2}}. \\end{split} \\]

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(3..10)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a"], "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": "

$x=$[[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": "{a/2}", "answerSimplification": "fractionNumbers", "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": "Logarithms: Expanding Expressions 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/"}], "tags": [], "metadata": {"description": "

Rewriting $\\log_{10}(x)$ in terms of $\\log_{10}(a)$ and $\\log_{10}(b)$, where $a$, $b$ and $x$ are given.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Rewrite the following expression in terms of $\\simplify{log({a})}$ and $\\simplify{log({b})}$:

\n

\\[ \\simplify{log({a^n * b})}.\\]

\n

\n

Note: To input $\\log_{10}(x)$, you only need to type log(x), it will automatically include the base 10.

", "advice": "

To rewrite $\\simplify{log({a^n*b})}$ in terms of $\\simplify{log({a})}$ and $\\simplify{log({b})}$, we want to use the following logarithm rules:

\n
    \n
  • $\\simplify{log(a*b) = log(a)+log(b)}$;
  • \n
  • $\\simplify{log(a^n) = n*log(a)}$.
  • \n
\n

Firstly, we want to express $\\var{a^n*b}$ in terms of $\\var{a}$ and $\\var{b}$:

\n

\\[ \\begin{split} \\var{a^n*b} &\\,= \\var{a^n} \\times \\var{b} \\\\ &\\,= \\var{a}^\\var{n} \\times \\var{b}. \\end{split} \\]

\n

Therefore, 

\n

\\[ \\begin{split} \\simplify{log({a^n*b})} &\\,= \\simplify[!collectNumbers]{log({a}^{n} * {b})} \\\\ &\\,= \\simplify[!collectNumbers]{log({a}^{n})+log({b})} \\\\ &\\,= \\simplify{{n}log({a})+log({b})} .\\end{split} \\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random([2,3,5])", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random([2,3,5] except a)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "if(a=5,2,random([2,3]))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "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": "

[[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": "{n}log({a})+log({b})", "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"}, {"name": "Logarithms: Expanding Expressions 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": "

Rewriting $\\log_{10}\\left(\\frac{x}{y}\\right)$ in terms of $\\log_{10}(a)$ and $\\log_{10}(b)$, where $a$, $b$, $x$ and $y$ are given.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Rewrite the following expression in terms of $\\simplify{log({a})}$ and $\\simplify{log({b})}$:

\n

\\[ \\simplify[fractionNumbers]{log({a^n / b^m})}.\\]

", "advice": "

To rewrite $\\simplify[fractionNumbers]{log({a^n/b^m})}$ in terms of $\\simplify{log({a})}$ and $\\simplify{log({b})}$, we want to use the following logarithm rules:

\n
    \n
  • $\\simplify{log(a/b) = log(a)-log(b)}$;
  • \n
  • $\\simplify{log(a^n) = n*log(a)}$.
  • \n
\n

Hence,

\n

\\[ \\begin{split} \\simplify[fractionNumbers]{log({a^n/b^m})} &\\,=  \\simplify{log({a^n}) - log({b^m})} \\\\ &\\,=  \\simplify[!collectNumbers]{log({a}^{n}) - log({b}^{m})} \\\\ &\\,= \\simplify{{n}log({a})-{m}log({b})} .\\end{split} \\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random([2,3,5,7])", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random([2,3,5,7] except a)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "if(a=5 or a=7,2,random([2,3]))", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "if(b=5 or b=7,2,random([2,3] except n))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "n", "m"], "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": "

[[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": "{n}log({a})-{m}log({b})", "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": "Equations: Linear equations 1", "extensions": [], "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/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "tags": [], "metadata": {"description": "

Solve linear equations with unknowns on one. Including brackets and fractions. Solutions may require rounding.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "

part a)

\n

\\[\\simplify{{a}x+{b} = {c}} \\]

\n

The first step is to isolate all the $x$-terms to one side of the equation.

\n

To do that we will {add} $\\var{abs(b)}$ {tofroma} both sides:

\n

\\[ \\begin{split} \\simplify{{a}x} = \\var{c} - \\var{b}  \\end{split} \\]

\n

Now we need to divide both sides by the coefficient of $x$, to leave just one $x$.

\n

Dividing both sides by $\\var{a}$,

\n

\\[ \\begin{split} x &= \\frac{\\simplify{{c}-{b}}}{\\var{a}} \\\\ &=\\simplify{{(c-b)/a}} \\end{split}\\]

\n

Rounding your answer as required,

\\[ x = \\var{precround((c-b)/a,2)} \\]

\n

\n

part b)

\n

 \\[ \\frac{\\simplify{{d}x + {f}}}{\\var{g}} = \\var{h} \\]

The first step is to rearrange by removing the fraction on the left.  To do this we mulitply both sides by $\\var{g}$ :

\\[ \\begin{split} \\frac{\\simplify{{d}x + {f}}}{\\var{g}} \\times \\var{g}  &= \\var{h} \\times \\var{g} \\\\\\\\ \\simplify{{d}x + {f}} &= \\var{h*g} \\end{split} \\]

Next we isolate all the $x$-terms to one side of the equation.

To do that we will {add2} $\\var{abs(f)}$ {tofromb} both sides:

\\[ \\begin{split} \\simplify{{d}x + {f}}   \\var{add2sym}   \\var{abs(f)} &= \\var{h*g} \\var{add2sym} \\var{abs(f)} \\\\ 
\\var{d}x &= \\simplify{{h*g}-{f}} \\end{split} \\]

Finally we need to divide both sides by the coefficient of $x$, to leave just one $x$.

\n

Dividing both sides by $\\var{d}$,

\\[ \\begin{split} x &= \\frac{\\simplify{{h*g}-{f}}}{\\var{d}} \\\\ &= \\var{(h*g-f)/d} \\end{split} \\]

\n

Rounding your answer as required,

\n

\\[ x = \\var{precround((h*g-f)/d,2)} \\]

\n

\n

part c)

\n

\\[ \\simplify{{b}({c}x+{g})} = \\var{d} \\]

\n

Even though this looks different, this is quite similar to part b).  We just have a multiplication rather than a division to deal with as the first step.

Rearrange to remove the multiplication on the left.  To do this we divide both sides by $\\var{b}$:

\\[ \\begin{split} \\frac{\\simplify{{b}({c}x+{g})}}{ \\var{b}} &= \\frac{\\var{d}}{\\var{b}} \\\\ \\\\ \\simplify{{c}x+{g}} &= \\var{precround(d/b,3)} \\end{split} \\]

Do the division on the right with a calculator and round to 3 decimal places.  Always use at least one more decimal place when rounding during the calculation than is required in your answer, to be on the safe side.

Next we isolate all the $x$-terms to one side of the equation.

To do that we will {add3} $\\var{abs(g)}$ {tofromc} both sides:

\\[ \\begin {split} \\simplify{{c}x + {g}}   \\var{add3sym}   \\var{abs(g)} &= \\var{precround(d/b,3)} \\var{add3sym} \\var{abs(g)} \\\\ \\var{c}x &= \\var{precround(d/b - g,3)} \\end{split} \\]

Finally we need to divide both sides by the coefficient of $x$, to leave just one $x$

\n

Dividing both sides by $\\var{c}$:

\\[ \\begin{split} x &= \\frac{\\var{precround(d/b - g,3)}}{\\var{c}} \\\\ &= \\var{(d/b-g)/c} \\end{split} \\]

\n

Rounding your answer as required,

\\[ x = \\var{precround((d/b - g)/c,2)} \\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-20..20 #0.1 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-20..20 #0.1 except 0)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-20..20 #0.1 except 0)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(-20..20 #0.1 except 0)", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(-20..20 #0.1 except 0)", "description": "", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "Ungrouped variables", "definition": "random(-20..20 #0.1 except 0)", "description": "", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "Ungrouped variables", "definition": "random(-20..20 #0.1 except 0)", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(-20..20 #0.1 except 0)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(-20..20 #0.1 except 0)", "description": "", "templateType": "anything", "can_override": false}, "add": {"name": "add", "group": "Ungrouped variables", "definition": "if(b>0, 'subtract', 'add')", "description": "", "templateType": "anything", "can_override": false}, "addsym": {"name": "addsym", "group": "Ungrouped variables", "definition": "if(add='add',' $+$ ',' $-$ ')", "description": "", "templateType": "anything", "can_override": false}, "add2": {"name": "add2", "group": "Ungrouped variables", "definition": "if(f>0, 'subtract', 'add')", "description": "", "templateType": "anything", "can_override": false}, "add2sym": {"name": "add2sym", "group": "Ungrouped variables", "definition": "if(add2='add',' $+$ ',' $-$ ')", "description": "", "templateType": "anything", "can_override": false}, "add3": {"name": "add3", "group": "Ungrouped variables", "definition": "if(g>0, 'subtract', 'add')", "description": "", "templateType": "anything", "can_override": false}, "add3sym": {"name": "add3sym", "group": "Ungrouped variables", "definition": "if(add3='add',' $+$ ',' $-$ ')", "description": "", "templateType": "anything", "can_override": false}, "tofroma": {"name": "tofroma", "group": "Ungrouped variables", "definition": "if(b>0, 'from', 'to')", "description": "", "templateType": "anything", "can_override": false}, "tofromb": {"name": "tofromb", "group": "Ungrouped variables", "definition": "if(f>0, 'from', 'to')", "description": "", "templateType": "anything", "can_override": false}, "tofromc": {"name": "tofromc", "group": "Ungrouped variables", "definition": "if(g>0, 'subtract', 'add')", "description": "", "templateType": "anything", "can_override": false}, "a3": {"name": "a3", "group": "Ungrouped variables", "definition": "(((d/b) - g)/c)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "d", "f", "g", "h", "m", "n", "add", "addsym", "add2", "add2sym", "add3", "add3sym", "tofroma", "tofromb", "tofromc", "a3"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "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": "

Solve

\n

$\\simplify{{a}x + {b}} = \\var{c}$

", "minValue": "(c-b)/a", "maxValue": "(c-b)/a", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "precround((c-b)/a,2)", "precisionType": "dp", "precision": "2", "precisionPartialCredit": "100", "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "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": "

Solve

\n

$\\dfrac{\\simplify{{d}x + {f}}}{\\var{g}} = \\var{h}$

", "minValue": "(g*h-f)/d", "maxValue": "(g*h-f)/d", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "precround((g*h-f)/d,2)", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "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": "

Solve

\n

$\\simplify{{b}({c}x+{g})} = \\var{d}$

", "minValue": "a3", "maxValue": "a3", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "precround(a3,2)", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Differentiation: Chain Rule 1", "extensions": [], "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/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "tags": [], "metadata": {"description": "

Calculating the derivative of a function of the form $(ax+b)^n$ using the chain rule.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Calculate the derivative of $y=\\simplify[fractionNumbers,unitFactor]{({a}x+{b})^{n}}$.

\n

", "advice": "

If we have a function of the form $y=f(g(x))$, sometimes described as a function of a function, to calculate its derivative we need to use the chain rule:

\n

\\[ \\frac{dy}{dx} = \\frac{du}{dx} \\times \\frac{dy}{du}.\\]

\n

\n

This can be split up into steps:

\n
    \n
  • Let $u=g(x)$;
  • \n
  • Rewrite $y$ in terms of $u$, such that $y=f(u)$;
  • \n
  • Calculate $\\frac{du}{dx}$ and $\\frac{dy}{du}$;
  • \n
  • Write $\\frac{dy}{dx}$ as a product of $\\frac{du}{dx}$ and $\\frac{dy}{du}$;
  • \n
  • Make sure $\\frac{dy}{dx}$ is only in terms of $x$. Ensure any $u$ terms have been replaced using the initial substitution.
  • \n
\n

\n

Following this process, we must first identify $g(x)$. Since the function is of the form $y=f(g(x))$, we are looking for the 'inner' function.

\n

So, for $y=\\simplify[all, fractionNumbers, unitFactor]{({a}x+{b})^{n}}$, \\[g(x)=\\simplify[all, fractionNumbers, unitFactor]{{a}x+{b}}.\\]

\n

If we now set $u=g(x)$, we can rewrite $y$ in terms of $u$ such that $y=f(u)$:

\n

\\[y=\\simplify[all, fractionNumbers, unitFactor]{u^{n}}.\\]

\n

Next, we calculate the two derivatives $\\frac{du}{dx}$ and $\\frac{dy}{du}$:

\n

\\[\\frac{du}{dx}=\\var{a}, \\quad \\frac{dy}{du}=\\simplify[all, fractionNumbers, unitFactor]{{n}*u^{n-1}}.\\]

\n

Plugging these into the chain rule:

\n

\\[ \\begin{split} \\frac{dy}{dx} &= \\frac{du}{dx} \\times \\frac{dy}{du}, \\\\&=\\var{a} \\times\\simplify[all, fractionNumbers, unitFactor]{{n}u^{n-1}}, \\\\ &=\\simplify[all, fractionNumbers, unitFactor]{{n*a}u^{n-1}}. \\end{split} \\]

\n

Finally, we need to express $\\frac{dy}{dx}$ only in terms of $x$, so we must replace the $u$ term using the initial substitution $u=\\simplify[all, fractionNumbers, unitFactor]{{a}x+{b}}$:

\n

\\[ \\frac{dy}{dx} = \\simplify[all, fractionNumbers, unitFactor]{{n*a}({a}x+{b})^{n-1}}.\\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..10)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(3..7)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "n"], "variable_groups": [{"name": "Unnamed group", "variables": []}], "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": "

$\\frac{dy}{dx}=$[[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}({a}x+{b})^{n-1}", "answerSimplification": "fractionNumbers, basic", "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": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Differentiation: Chain Rule 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": "

Calculating the derivative of a function of the form $k(ax^m+b)^n$ using the chain rule.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Calculate the derivative of $y=\\simplify[all,fractionNumbers]{{k}({a}*x^{m}+{b})^{n}}$.

\n

", "advice": "

If we have a function of the form $y=f(g(x))$, sometimes described as a function of a function, to calculate its derivative we need to use the chain rule:

\n

\\[ \\frac{dy}{dx} = \\frac{du}{dx} \\times \\frac{dy}{du}.\\]

\n

\n

This can be split up into steps:

\n
    \n
  • Let $u=g(x)$;
  • \n
  • Rewrite $y$ in terms of $u$, such that $y=f(u)$;
  • \n
  • Calculate $\\frac{du}{dx}$ and $\\frac{dy}{du}$;
  • \n
  • Write $\\frac{dy}{dx}$ as a product of $\\frac{du}{dx}$ and $\\frac{dy}{du}$;
  • \n
  • Make sure $\\frac{dy}{dx}$ is only in terms of $x$. Ensure any $u$ terms have been replaced using the initial substitution.
  • \n
\n

\n

Following this process, we must first identify $g(x)$. Since the function is of the form $y=f(g(x))$, we are looking for the 'inner' function.

\n

So, for $y=\\simplify[all,fractionNumbers]{{k}({a}*x^{m}+{b})^{n}}$, \\[g(x)=\\simplify[all, fractionNumbers, unitFactor]{{a}x^{m}+{b}}.\\]

\n

If we now set $u=g(x)$, we can rewrite $y$ in terms of $u$ such that $y=f(u)$:

\n

\\[y=\\simplify[all, fractionNumbers,unitFactor]{{k}u^{n}}.\\]

\n

Next, we calculate the two derivatives $\\frac{du}{dx}$ and $\\frac{dy}{du}$:

\n

\\[\\frac{du}{dx}=\\simplify[all,fractionNumbers]{{a*m}x^{m-1}}, \\quad \\frac{dy}{du}=\\simplify[all, fractionNumbers, unitFactor]{{k*n}*u^{n-1}}.\\]

\n

Plugging these into the chain rule:

\n

\\[ \\begin{split} \\frac{dy}{dx} &= \\frac{du}{dx} \\times \\frac{dy}{du}, \\\\&=\\simplify[all,fractionNumbers]{{a*m}x^{m-1}} \\times\\simplify[all, fractionNumbers, unitFactor]{{k*n}u^{n-1}}, \\\\ &=\\simplify[all, fractionNumbers, unitFactor]{{k*n*a*m}*x^{m-1}u^{n-1}}. \\end{split} \\]

\n

Finally, we need to express $\\frac{dy}{dx}$ only in terms of $x$, so we must replace the $u$ term using the initial substitution $u=\\simplify[all, fractionNumbers, unitFactor]{{a}x^{m}+{b}}$:

\n

\\[ \\frac{dy}{dx} = \\simplify[all, fractionNumbers, unitFactor]{{k*n*a*m}*x^{m-1}({a}x^{m}+{b})^{n-1}}.\\]

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..7)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(2..7)", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "k*n*a*m<150 and k*n*a*m>-150", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "n", "k", "m"], "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": "

$\\frac{dy}{dx}=$[[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*m*n*k}*x^{m-1}*({a}x^{m}+{b})^{n-1}", "answerSimplification": "fractionNumbers, 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, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Integration: Definite Integrals 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": "

Calculating the definite integral $\\int_{n_1}^{n_2}a_1x^{b_1}+a_2x^{b_2}+a_3x^{b_3} dx$.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Evaluate \\[ \\int_{\\var{n_1}}^{\\var{n_2}}\\simplify[unitFactor, unitPower, fractionNumbers]{{a_1}*x^{b_1}+{a_2}*x^{b_2}+{a_3}*x^{b_3}} \\,dx.\\]

\n

", "advice": "

Integrating a function of the form  \\[ f(x)=x^n \\] has the integral \\[ \\int_a^b x^n dx  =  \\left[\\frac{x^{n+1}}{n+1}\\right]_a^b,\\]

\n

and \\[\\int_a^b kf(x) dx = k \\int_a^b f(x) dx.\\]

\n

Additionally, the integral of the sum or difference of two or more functions is equal to the sum or difference of the integrals of each function: \\[ \\int(f(x)\\pm g(x))\\, dx = \\int f(x)\\, dx  \\pm \\int g(x) \\, dx.\\]

\n

\n

Therefore,

\n

\\[ \\begin{split}\\simplify[unitFactor,unitPower]{defint({a_1}*x^{b_1}+{a_2}*x^{b_2}+{a_3}*x^{b_3},x,{n_1},{n_2})} &\\,= \\simplify{{a_1}defint(x^{b_1},x,{n_1},{n_2})+{a_2}defint(x^{b_2},x,{n_1},{n_2})+{a_3}defint(x^{b_3},x,{n_1},{n_2})} \\\\ &\\,= \\left[\\simplify[all,fractionNumbers]{{a_1}x^{b_1+1}/{b_1+1}+{a_2}x^{b_2+1}/{b_2+1}+{a_3}x^{b_3+1}/{b_3+1}}\\right]_\\var{n_1}^\\var{n_2} \\\\ &\\,= \\left[\\simplify[all,fractionNumbers,!collectNumbers]{{a_1*n_2^(b_1+1)}/{b_1+1}+{a_2*n_2^(b_2+1)}/{b_2+1}+{a_3*n_2^(b_3+1)}/{b_3+1}}\\right] -\\left[\\simplify[all,fractionNumbers,!collectNumbers]{{a_1*n_1^(b_1+1)}/{b_1+1}+{a_2*n_1^(b_2+1)}/{b_2+1}+{a_3*n_1^(b_3+1)}/{b_3+1}}\\right] \\\\ &\\,= \\simplify[!collectNumbers]{{eval2a}-{eval1a}} \\\\ &\\,=\\var{sol1} \\end{split} \\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a_1": {"name": "a_1", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "b_1": {"name": "b_1", "group": "Ungrouped variables", "definition": "3", "description": "", "templateType": "anything", "can_override": false}, "a_2": {"name": "a_2", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b_2": {"name": "b_2", "group": "Ungrouped variables", "definition": "2", "description": "", "templateType": "anything", "can_override": false}, "b_3": {"name": "b_3", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything", "can_override": false}, "a_3": {"name": "a_3", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything", "can_override": false}, "n_1": {"name": "n_1", "group": "Ungrouped variables", "definition": "random(0..2)", "description": "", "templateType": "anything", "can_override": false}, "n_2": {"name": "n_2", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "eval2": {"name": "eval2", "group": "Ungrouped variables", "definition": "a_1*n_2^(b_1+1)/(b_1+1)+a_2*n_2^(b_2+1)/(b_2+1)+a_3*n_2^(b_3+1)/(b_3+1)", "description": "", "templateType": "anything", "can_override": false}, "eval1": {"name": "eval1", "group": "Ungrouped variables", "definition": "a_1*n_1^(b_1+1)/(b_1+1)+a_2*n_1^(b_2+1)/(b_2+1)+a_3*n_1^(b_3+1)/(b_3+1)", "description": "", "templateType": "anything", "can_override": false}, "eval2a": {"name": "eval2a", "group": "Ungrouped variables", "definition": "precround(eval2,3)", "description": "", "templateType": "anything", "can_override": false}, "eval1a": {"name": "eval1a", "group": "Ungrouped variables", "definition": "precround(eval1,3)", "description": "", "templateType": "anything", "can_override": false}, "sol": {"name": "sol", "group": "Ungrouped variables", "definition": "eval2-eval1", "description": "", "templateType": "anything", "can_override": false}, "sol1": {"name": "sol1", "group": "Ungrouped variables", "definition": "precround(sol,2)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "b_1>b_2 and b_2>b_3 and n_2>n_1", "maxRuns": "100"}, "ungrouped_variables": ["a_1", "a_2", "a_3", "b_1", "b_2", "b_3", "n_1", "n_2", "eval2", "eval1", "eval2a", "eval1a", "sol", "sol1"], "variable_groups": [{"name": "Unnamed group", "variables": []}], "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": "

[[0]] (Give answers to 2 decimal places where necessary)

", "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": "{sol1}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.01", "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": "Integration (Negative and Fractional Powers) 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/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

Using the Table of Integrals/Antiderivatives, calculate the integral of $y=\\simplify[all,fractionNumbers]{{a}x^{b/c}}$.

\n

", "advice": "

From the Table of Integrals we see that a function of the form \\[ f(x)=x^n \\] has the integral \\[ \\int x^n dx  =  \\frac{x^{n+1}}{n+1}+ c,\\]

\n

and \\[\\int kf(x) dx = k \\int f(x) dx.\\]

\n

So, for the function

\n

\\[ y=\\simplify[fractionNumbers]{{a}x^{b/c}}, \\]

\n

the integral  is

\n

\\[ \\begin{split}\\simplify[fractionNumbers]{int({a}x^{b/c},x)} = \\simplify[all,fractionNumbers]{{a}int(x^{b/c},x)}&\\,=\\simplify[fractionNumbers,alwaysTimes]{{a}{c/(b+c)}} \\simplify[all,fractionNumbers,!collectNumbers,!simplifyFractions,!expandBrackets]{x^({b/c+1})} + c,\\\\ \\\\&\\,= \\simplify[all,fractionNumbers]{{a/(b/c+1)}x^{b/c+1}}+c.\\end{split} \\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "b-1 ", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c"], "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": "

[[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, "alternatives": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "

You forgot the constant of integration

", "useAlternativeFeedback": false, "answer": "{a*c}x^{(b+c)/c}/{b+c}", "answerSimplification": "fractionNumbers", "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": ""}]}], "answer": "{(a*c)/(b+c)}x^{(b+c)/c}+c", "answerSimplification": "all,fractionNumbers,!noLeadingMinus", "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": "c", "value": ""}, {"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Integration (Negative and Fractional Powers) 3", "extensions": [], "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/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

Using the Table of Integrals/Antiderivatives, calculate the integral of $f(x)=\\var{a}e^{\\simplify[fractionNumbers]{{b}x}}$

\n

", "advice": "

From the Table of Integrals we see that a function of the form \\[ f(x)= e^{mx} \\] has the integral \\[ \\int e^{mx} dx  = \\frac{1}{m}e^{mx}+c,\\]

\n

and \\[ \\int kf(x) \\,dx = k \\int f(x) \\, dx.\\]

\n

So, for the function

\n

\\[f(x)=\\simplify[fractionNumbers]{{a}e^({b}x)},\\]

\n

the integral is

\n

\\[ \\begin{split} \\int\\simplify[fractionNumbers]{{a}e^({b}x)} dx \\,= \\simplify[unitFactor,fractionNumbers]{{a}int(e^({b}x),x)} &\\,=\\var{a}\\times\\simplify[unitFactor,fractionNumbers,unitDenominator]{(e^({b}x)/{b})} +c, \\\\ &\\,=\\simplify[unitFactor,fractionNumbers]{{a/b} e^({b}x)+c}. \\end{split}  \\]

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-7..7 except [0,1])/random(3..10)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "abs(b)<1", "maxRuns": "100"}, "ungrouped_variables": ["a", "b"], "variable_groups": [{"name": "Unnamed group", "variables": []}], "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": "

[[0]]

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "

Don't forget the constant of integration.

", "useAlternativeFeedback": true, "answer": "{a/b} e^({b}x)", "answerSimplification": "fractionNumbers, basic, unitFactor", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.01", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}], "answer": "{a/b} e^({b}x)+c", "answerSimplification": "fractionNumbers, basic, unitFactor", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.01", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "c", "value": ""}, {"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": false, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "navigatemode": "sequence", "onleave": {"action": "warnifunattempted", "message": "

WARNING: Question not attempted!

"}, "preventleave": true, "typeendtoleave": false, "startpassword": "", "autoSubmit": true, "allowAttemptDownload": true, "downloadEncryptionKey": "", "showresultspage": "review"}, "timing": {"allowPause": false, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "warn", "message": "

WARNING: 5 minutes remaining!

"}}, "feedback": {"enterreviewmodeimmediately": false, "showactualmarkwhen": "oncompletion", "showtotalmarkwhen": "oncompletion", "showanswerstatewhen": "inreview", "showpartfeedbackmessageswhen": "inreview", "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview", "allowrevealanswer": false, "intro": "", "end_message": "", "results_options": {"printquestions": true, "printadvice": true}, "feedbackmessages": [], "reviewshowexpectedanswer": true, "showanswerstate": false, "reviewshowfeedback": true, "showactualmark": false, "showtotalmark": false, "reviewshowscore": true, "reviewshowadvice": true}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Nick McCullen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/953/"}], "extensions": ["eukleides"], "custom_part_types": [{"source": {"pk": 2, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/2/edit"}, "name": "List of numbers", "short_name": "list-of-numbers", "description": "

The answer is a comma-separated list of numbers.

\n

The list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.

\n

You can optionally treat the answer as a set, so the number of occurrences doesn't matter, only whether each number is included or not.

", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n settings[\"separator\"] + \" \"\n)", "hint": {"static": false, "value": "if(settings[\"show_input_hint\"],\n \"Enter a list of numbers separated by {settings['separator']}.\",\n \"\"\n)"}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "bits:\nlet(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)\n\nexpected_numbers:\nlet(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)\n\nvalid_numbers:\nif(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )\n\nis_sorted:\nassert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )\n\nincluded:\nmap(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentThe separate items in the student's answer

", "definition": "let(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)"}, {"name": "expected_numbers", "description": "", "definition": "let(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)"}, {"name": "valid_numbers", "description": "

Is every number in the student's list valid?

", "definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )"}, {"name": "is_sorted", "description": "

Are the student's answers in ascending order?

", "definition": "assert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )"}, {"name": "included", "description": "

Is each number in the expected answer present in the student's list the correct number of times?

", "definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentHas every number been included the right number of times?

", "definition": "all(included)"}, {"name": "no_extras", "description": "

True if the student's list doesn't contain any numbers that aren't in the expected answer.

", "definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(\"Your answer contains \"+extra_numbers[0]+\" but should not.\");\n false\n )"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "if(lower(studentAnswer) in [\"empty\",\"\u2205\"],[],\n map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n )\n)"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)"}, {"name": "notationStyles", "description": "", "definition": "[\"en\"]"}, {"name": "isSet", "description": "

Should the answer be considered as a set, so the number of times an element occurs doesn't matter?

", "definition": "settings[\"isSet\"]"}, {"name": "extra_numbers", "description": "

Numbers included in the student's answer that are not in the expected list.

", "definition": "filter(not (x in expected_numbers),x,interpreted_answer)"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The list of numbers that the student should enter. The order does not matter.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "allowFractions", "label": "Allow the student to enter fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "correctAnswerFractions", "label": "Display the correct answers as fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "isSet", "label": "Is the answer a set?", "help_url": "", "hint": "If ticked, the number of times an element occurs doesn't matter, only whether it's included at all.", "input_type": "checkbox", "default_value": false}, {"name": "show_input_hint", "label": "Show the input hint?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": true}, {"name": "separator", "label": "Separator", "help_url": "", "hint": "The substring that should separate items in the student's list", "input_type": "string", "default_value": ",", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [["question-resources/Picture1_caMIdF1.png", "/srv/numbas/media/question-resources/Picture1_caMIdF1.png"], ["question-resources/Picture2_6KE4ZpW.png", "/srv/numbas/media/question-resources/Picture2_6KE4ZpW.png"]]}