// Numbas version: exam_results_page_options {"showQuestionGroupNames": false, "timing": {"allowPause": true, "timedwarning": {"message": "

You have 5 minutes left!!

", "action": "warn"}, "timeout": {"message": "", "action": "none"}}, "percentPass": 0, "navigation": {"preventleave": true, "browse": true, "showfrontpage": true, "onleave": {"message": "

You have not attempted this question as yet!!

", "action": "none"}, "allowregen": true, "reverse": true, "showresultspage": "oncompletion"}, "feedback": {"showtotalmark": true, "intro": "", "feedbackmessages": [], "allowrevealanswer": true, "advicethreshold": 0, "showanswerstate": true, "showactualmark": true}, "duration": 10800, "question_groups": [{"pickQuestions": 1, "pickingStrategy": "all-ordered", "name": "Exponential and Logarithmic Functions", "questions": [{"name": "Andrew's copy of Jinhua's copy of Logarithms 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "statement": "

Express each of the following in terms of $\\simplify{log(a)}$ and $\\simplify{log(b)}$

\n

To write $\\simplify{log(a)}$, use log$a$ with brackets around the $a$.

", "functions": {}, "variables": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": ""}, "ungrouped_variables": [], "advice": "", "variable_groups": [], "tags": [], "preamble": {"js": "", "css": ""}, "rulesets": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "parts": [{"answer": "log(a) + log(b)", "expectedvariablenames": [], "scripts": {}, "variableReplacements": [], "checkvariablenames": false, "prompt": "

$\\simplify{log(ab)}$

", "showpreview": true, "vsetrangepoints": 5, "checkingtype": "absdiff", "marks": 1, "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "musthave": {"strings": [")+"], "message": "", "partialCredit": 0, "showStrings": false}, "variableReplacementStrategy": "originalfirst", "type": "jme"}, {"answer": "log(a)-log(b)", "expectedvariablenames": [], "scripts": {}, "variableReplacements": [], "checkvariablenames": false, "prompt": "

$\\simplify{log({a}/{b})}$

", "showpreview": true, "vsetrangepoints": 5, "checkingtype": "absdiff", "marks": 1, "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "musthave": {"strings": [")-"], "message": "", "partialCredit": 0, "showStrings": false}, "variableReplacementStrategy": "originalfirst", "type": "jme"}, {"answer": "2*log(a)+log(b)", "expectedvariablenames": [], "scripts": {}, "variableReplacements": [], "checkvariablenames": false, "prompt": "

$\\simplify{log(a^2b)}$

", "showpreview": true, "vsetrangepoints": 5, "checkingtype": "absdiff", "marks": 1, "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "musthave": {"strings": [")+"], "message": "", "partialCredit": 0, "showStrings": false}, "variableReplacementStrategy": "originalfirst", "type": "jme"}, {"answer": "(1/2)*log(a)", "expectedvariablenames": [], "scripts": {}, "variableReplacements": [], "checkvariablenames": false, "prompt": "

$\\simplify{log(sqrt(a))}$

", "showpreview": true, "vsetrangepoints": 5, "checkingtype": "absdiff", "marks": 1, "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "musthave": {"strings": ["log(a)"], "message": "", "partialCredit": 0, "showStrings": false}, "variableReplacementStrategy": "originalfirst", "type": "jme"}, {"answer": "(-2)*(log(a))", "checkvariablenames": false, "scripts": {}, "variableReplacements": [], "notallowed": {"strings": ["/"], "message": "", "partialCredit": 0, "showStrings": false}, "showpreview": true, "vsetrangepoints": 5, "musthave": {"strings": ["log(a)"], "message": "", "partialCredit": 0, "showStrings": false}, "checkingtype": "absdiff", "marks": 1, "expectedvariablenames": [], "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "prompt": "

$\\simplify{log(1/a^2)}$

", "variableReplacementStrategy": "originalfirst", "type": "jme"}, {"answer": "log(a)+(1/2)*(log(b))", "expectedvariablenames": [], "scripts": {}, "variableReplacements": [], "checkvariablenames": false, "prompt": "

$\\simplify{log(a*sqrt(b))}$

", "showpreview": true, "vsetrangepoints": 5, "checkingtype": "absdiff", "marks": 1, "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "musthave": {"strings": [")+", "log(b)"], "message": "", "partialCredit": 0, "showStrings": false}, "variableReplacementStrategy": "originalfirst", "type": "jme"}, {"answer": "3*(log(a)) - log(b)", "expectedvariablenames": [], "scripts": {}, "variableReplacements": [], "checkvariablenames": false, "prompt": "

$\\simplify{log(a^3/b)}$

", "showpreview": true, "vsetrangepoints": 5, "checkingtype": "absdiff", "marks": 1, "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "musthave": {"strings": ["-log"], "message": "", "partialCredit": 0, "showStrings": false}, "variableReplacementStrategy": "originalfirst", "type": "jme"}, {"answer": "2*(log(a))-3*(log(b))", "expectedvariablenames": [], "scripts": {}, "variableReplacements": [], "checkvariablenames": false, "notallowed": {"strings": ["/"], "message": "", "partialCredit": 0, "showStrings": false}, "showpreview": true, "vsetrangepoints": 5, "checkingtype": "absdiff", "marks": 1, "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "prompt": "

$\\simplify{log(a^2/b^3)}$

", "variableReplacementStrategy": "originalfirst", "type": "jme"}, {"answer": "(1/2)*(log(a))-(1/2)*(log(b))", "checkvariablenames": false, "scripts": {}, "variableReplacements": [], "prompt": "

$\\simplify{log(sqrt(a/b))}$

", "showpreview": true, "vsetrangepoints": 5, "checkingtype": "absdiff", "marks": 1, "expectedvariablenames": [], "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answersimplification": "all", "variableReplacementStrategy": "originalfirst", "type": "jme"}, {"answer": "-log(a)-4*(log(b))", "expectedvariablenames": [], "scripts": {}, "variableReplacements": [], "checkvariablenames": false, "notallowed": {"strings": ["1"], "message": "", "partialCredit": 0, "showStrings": false}, "showpreview": true, "vsetrangepoints": 5, "checkingtype": "absdiff", "marks": 1, "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "prompt": "

$\\simplify{log(1/ab^4)}$

", "variableReplacementStrategy": "originalfirst", "type": "jme"}, {"answer": "(1/3)*(log(a))+(1/6)*(log(b))", "expectedvariablenames": [], "scripts": {}, "variableReplacements": [], "checkvariablenames": false, "prompt": "

$\\simplify{log(root(a^2b,6))}$

", "showpreview": true, "vsetrangepoints": 5, "checkingtype": "absdiff", "marks": 1, "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "musthave": {"strings": [")+"], "message": "", "partialCredit": "0", "showStrings": false}, "variableReplacementStrategy": "originalfirst", "type": "jme"}], "type": "question"}, {"name": "Logarithms: Using the Rules", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Clare Lundon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/492/"}], "variables": {"b2": {"definition": "random(2..19 except a1 except a2 except b1)", "name": "b2", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "f5": {"definition": "f1^2", "name": "f5", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "f4": {"definition": "f2-1", "name": "f4", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "i1": {"definition": "random(2..5)", "name": "i1", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "f1": {"definition": "random(2..9)", "name": "f1", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "i3": {"definition": "i1^3", "name": "i3", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "f2": {"definition": "random(3..5 except f1)", "name": "f2", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "d3": {"definition": "d1*d2", "name": "d3", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "e1": {"definition": "random(2..9)", "name": "e1", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "a2": {"definition": "random(2..9 except a1)", "name": "a2", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "d1": {"definition": "random(2..19)", "name": "d1", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "g1": {"definition": "random((2,3))", "name": "g1", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "a1": {"definition": "random(2..9)", "name": "a1", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "i2": {"definition": "random(2..9)", "name": "i2", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "f3": {"definition": "f1*f2", "name": "f3", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "b1": {"definition": "random(2..19 except a2 except a1)", "name": "b1", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "h1": {"definition": "random([4,9,16,25])", "name": "h1", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "e2": {"definition": "random(2..9 except e1)", "name": "e2", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "h2": {"definition": "random([2,3,5,7,8,10])", "name": "h2", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "g3": {"definition": "random(2..9 except g2 except g1)", "name": "g3", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "i4": {"definition": "i2^2", "name": "i4", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "g4": {"definition": "g2*g3", "name": "g4", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "d2": {"definition": "random(2..9 except d1)", "name": "d2", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "c2": {"definition": "random(2..9 except c1)", "name": "c2", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "g2": {"definition": "random(2..9 except g1)", "name": "g2", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "h3": {"definition": "h1*h2", "name": "h3", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "e3": {"definition": "random(2..9 except e1 except e2)", "name": "e3", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "c3": {"definition": "random(3..10)", "name": "c3", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "c1": {"definition": "random(2..19)", "name": "c1", "description": "", "group": "Ungrouped variables", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}, "parts": [{"customName": "", "sortAnswers": false, "showCorrectAnswer": true, "adaptiveMarkingPenalty": 0, "prompt": "

$\\log{\\var{a1}} + \\log{\\var{a2}} = \\log$ [[0]]

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

$\\log{\\var{b1}} - \\log{\\var{b2}} = \\log$ [[0]]

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

$2\\log{\\var{c3}} = \\log$ [[0]]

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

$\\log{\\var{f1}} + \\log{\\var{f3}} - \\log{\\var{f5}} = \\log$ [[0]]

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

$\\var{g1}\\log{\\var{g2}} - \\log{\\var{g4}}+ \\log{\\var{g3}}=\\log$ [[0]]

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

$\\frac{1}{2}\\log{\\var{h3}} - \\frac{1}{2}\\log{\\var{h2}}=\\log$ [[0]]

", "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "scripts": {}, "type": "gapfill", "useCustomName": false, "variableReplacements": [], "unitTests": [], "gaps": [{"customName": "", "allowFractions": true, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "type": "numberentry", "scripts": {}, "unitTests": [], "showFractionHint": true, "minValue": "(h3/h2)^0.5", "marks": 1, "mustBeReduced": false, "showCorrectAnswer": true, "adaptiveMarkingPenalty": 0, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "maxValue": "(h3/h2)^0.5", "correctAnswerFraction": true, "correctAnswerStyle": "plain"}], "marks": 0}], "functions": {}, "tags": [], "preamble": {"css": "", "js": ""}, "metadata": {"licence": "All rights reserved", "description": "

Practice using the log rules to add and subtract logarithms

"}, "statement": "

\n

Express each of the following as a single logarithm:

\n

", "variable_groups": [], "ungrouped_variables": ["a1", "a2", "b1", "b2", "c1", "c2", "c3", "d1", "d2", "d3", "e1", "e2", "e3", "f1", "f2", "f3", "f4", "f5", "g1", "g2", "g3", "g4", "h1", "h2", "h3", "i1", "i2", "i3", "i4"], "rulesets": {}, "advice": "

You need to use at least one of the laws of logarithms to answer each of the above:

\n

The Product Law:    $\\log_a{x} + \\log_a{y} = \\log_a{(xy)}$

\n

The Quotient Law:   $\\log_a{x} - \\log_a{y} = \\log_a\\left(\\dfrac{x}{y}\\right)$

\n

The Power Law:       $n\\log_a{x} = \\log_a{(x^n)}$

\n

"}, {"name": " Logarithms: Power & Quotient Rule Equation", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Clare Lundon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/492/"}], "functions": {}, "ungrouped_variables": ["a", "c", "b", "d", "s", "sol2", "sol1"], "preamble": {"css": "", "js": ""}, "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": "

We use the following rules for logs:

\n

1. $\\log_a(x^q)=q\\log_a(x)$

\n

2. $\\log_a(\\frac{x}{y})=\\log_a(x)-\\log_a(y)$

\n

3. $a^x=y \\iff \\log_a y=x$

\n

Using rule 1 we get
\\[2\\log_{\\var{a}}(\\simplify{x+{b}})- \\log_{\\var{a}}(\\simplify{(x+{c})})=\\log_{\\var{a}}((\\simplify{x+{b}})^2)- \\log_{\\var{a}}(\\simplify{(x+{c})})\\]
Using rule 2 gives
\\[\\log_{\\var{a}}(\\simplify{(x+{b})^2})- \\log_{\\var{a}}(\\simplify{(x+{c})})=\\log_{\\var{a}}\\left(\\simplify{(x+{b})^2/(x+{c})}\\right)\\]
So the equation to solve becomes:
\\[\\log_{\\var{a}}\\left(\\simplify{(x+{b})^2/(x+{c})}\\right)=\\var{d}\\]
and using rule 3 this gives:
\\[ \\begin{eqnarray} \\simplify{(x+{b})^2/(x+{c})}&=&{\\var{a}}^{\\var{d}}\\\\ \\simplify{(x+{b})^2}&=&{\\var{a}}^{\\var{d}}(\\simplify{x+{c}})=\\simplify{{a^d}(x+{c})}\\\\ \\simplify{x^2+{2*b-a^(d)}x+{b^2-a^(d)*c}}&=&0 \\end{eqnarray} \\]
Solving this quadratic we get two solutions:

\n

$x=\\var{sol1}$ and $x=\\var{sol2}$

\n

We should check that these solutions gives positive values for $\\simplify{x+{b}}$ and $\\simplify{x+{c}}$ as otherwise the logs are not defined.

\n

Check the value $x=\\var{sol1}$ : 

\n

Substituting this value for $x$ into $\\log_{\\var{a}}(\\simplify{x+{b}})$ we get $\\log_{\\var{a}}(\\simplify{{2*a^d}})$ so OK.

\n

Substituting this value for $x$ into $\\log_{\\var{a}}(\\simplify{x+{c}})$ we get $\\log_{\\var{a}}(\\simplify{{4*a^d}})$ so OK.

\n

Hence $x=\\var{sol1}$ is a solution to our original equation.

\n

Check the value $x=\\var{sol2}$ :

\n

Substituting this value for $x$ into $\\log_{\\var{a}}(\\simplify{x+{b}})$ we get $\\log_{\\var{a}}(\\simplify{{-a^d}})$ so NOT OK.

\n

Substituting this value for $x$ into $\\log_{\\var{a}}(\\simplify{x+{c}})$ we get $\\log_{\\var{a}}(\\simplify{{a^d}})$ so OK.

\n

Hence $x=\\var{sol2}$ is NOT a solution to our original equation as $\\log_{\\var{a}}(\\simplify{x+{b}})$ is not defined for this value of $x$.

\n

So there is only one solution $x=\\var{sol1}$.

", "statement": "

\n

Solve the following equation for $x$:

\n

\\[2\\log_{\\var{a}}(\\simplify{x+{b}})- \\log_{\\var{a}}(\\simplify{(x+{c})})=\\var{d}\\]

\n

\n

", "variables": {"a": {"definition": "random(2,3)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "sol2": {"definition": "-c+a^d", "templateType": "anything", "group": "Ungrouped variables", "name": "sol2", "description": ""}, "b": {"definition": "s*random(1..10)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "c": {"definition": "b+2*a^(d)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "d": {"definition": "random(1,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "s": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s", "description": ""}, "sol1": {"definition": "c-2*b", "templateType": "anything", "group": "Ungrouped variables", "name": "sol1", "description": ""}}, "parts": [{"extendBaseMarkingAlgorithm": true, "type": "gapfill", "marks": 0, "customMarkingAlgorithm": "", "customName": "", "unitTests": [], "useCustomName": false, "prompt": "

First express the left-hand side as a single logarithm

\n

Two rules for logs should be used to do this:

\n

1. $\\log_a(x^q)=q\\log_a(x)$

\n

2. $\\log_a(\\frac{x}{y})=\\log_a(x)-\\log_a(y)$

\n

Left-hand side  =  $\\log_{\\var{a}}$( [[0]] )

", "variableReplacements": [], "gaps": [{"scripts": {}, "type": "jme", "vsetRange": [0, 1], "showFeedbackIcon": true, "customName": "", "extendBaseMarkingAlgorithm": true, "answer": "((x+{b})^2/(x+{c}))", "checkingType": "absdiff", "showPreview": true, "notallowed": {"strings": ["."], "partialCredit": 0, "showStrings": false, "message": "

Input as an integer, not as a decimal.

"}, "adaptiveMarkingPenalty": 0, "marks": 2, "answerSimplification": "std", "variableReplacements": [], "vsetRangePoints": 5, "unitTests": [], "showCorrectAnswer": true, "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "failureRate": 1, "valuegenerators": [{"value": "", "name": "x"}], "variableReplacementStrategy": "originalfirst", "useCustomName": false, "checkVariableNames": false}], "showFeedbackIcon": true, "adaptiveMarkingPenalty": 0, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "sortAnswers": false}, {"extendBaseMarkingAlgorithm": true, "type": "gapfill", "marks": 0, "customMarkingAlgorithm": "", "customName": "", "unitTests": [], "useCustomName": false, "prompt": "

Now change to index form and rearrange the resulting equation into a  quadratic equation in standard form. 

\n

Solve the quadratic the equation for $x$ and check your answers in the original log equation.

\n

The solution of the log equation is $x$  [[0]]

\n

", "variableReplacements": [], "gaps": [{"notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "mustBeReduced": false, "correctAnswerStyle": "plain", "minValue": "{sol1}", "mustBeReducedPC": 0, "maxValue": "{sol1}", "customName": "", "type": "numberentry", "extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false, "adaptiveMarkingPenalty": 0, "marks": "2", "customMarkingAlgorithm": "", "unitTests": [], "showFeedbackIcon": true, "allowFractions": true, "scripts": {}, "showFractionHint": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "useCustomName": false}], "showFeedbackIcon": true, "adaptiveMarkingPenalty": 0, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "sortAnswers": false}], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers"]}, "tags": [], "metadata": {"licence": "All rights reserved", "description": ""}}, {"name": "Andrew's copy of Numerical skills Solving Logarithms ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "statement": "

Solve these equations for x, give your answer as integer or fraction.

", "question_groups": [{"pickQuestions": 0, "questions": [], "name": "", "pickingStrategy": "all-ordered"}], "variables": {"a3": {"group": "Ungrouped variables", "name": "a3", "definition": "a2/2", "templateType": "anything", "description": ""}, "a4": {"group": "Ungrouped variables", "name": "a4", "definition": "random(2..3 except a2 except a3)", "templateType": "anything", "description": ""}, "d3": {"group": "Ungrouped variables", "name": "d3", "definition": "a*b", "templateType": "anything", "description": ""}, "a2": {"group": "Ungrouped variables", "name": "a2", "definition": "random([4,6,8,10])", "templateType": "anything", "description": ""}, "b4": {"group": "Ungrouped variables", "name": "b4", "definition": "random(1..19)", "templateType": "anything", "description": ""}, "a1": {"group": "Ungrouped variables", "name": "a1", "definition": "2a2^((a4)-1)", "templateType": "anything", "description": ""}, "c2": {"group": "Ungrouped variables", "name": "c2", "definition": "random(2..19)", "templateType": "anything", "description": ""}, "b": {"group": "Ungrouped variables", "name": "b", "definition": "floor(3a/2)", "templateType": "anything", "description": ""}, "b1": {"group": "Ungrouped variables", "name": "b1", "definition": "random(2..6)", "templateType": "anything", "description": ""}, "d2": {"group": "Ungrouped variables", "name": "d2", "definition": "random(2..5)", "templateType": "anything", "description": ""}, "b2": {"group": "Ungrouped variables", "name": "b2", "definition": "random(2..9)", "templateType": "anything", "description": ""}, "c4": {"group": "Ungrouped variables", "name": "c4", "definition": "random(2..9 except c3)", "templateType": "anything", "description": ""}, "c1": {"group": "Ungrouped variables", "name": "c1", "definition": "random(2..5)", "templateType": "anything", "description": ""}, "c3": {"group": "Ungrouped variables", "name": "c3", "definition": "random(2..9 except c2)", "templateType": "anything", "description": ""}, "b3": {"group": "Ungrouped variables", "name": "b3", "definition": "random(2..5)", "templateType": "anything", "description": ""}, "a": {"group": "Ungrouped variables", "name": "a", "definition": "random(1..9)", "templateType": "anything", "description": ""}, "d4": {"group": "Ungrouped variables", "name": "d4", "definition": "+a+b", "templateType": "anything", "description": ""}, "d1": {"group": "Ungrouped variables", "name": "d1", "definition": "random(2..6)", "templateType": "anything", "description": ""}, "c5": {"group": "Ungrouped variables", "name": "c5", "definition": "random(1..5)", "templateType": "anything", "description": ""}}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": ""}, "ungrouped_variables": ["a1", "a2", "a3", "a4", "b1", "b2", "b3", "b4", "c1", "c2", "c3", "c4", "c5", "a", "b", "d1", "d2", "d3", "d4"], "advice": "

We want to solve for x. After simplifying, in each case we end up with $\\log_a{f(x)} = b$, so we raise both sides as a power of $a$ to get $a^{\\log_a{f(x)}} = a^b$ which simplifies (by laws of logarithms) to $f(x)=a^b$. We then solve for x accordingly.

\n

Use of the laws of logarithms is crucial here:

\n

$\\log{a} + \\log{b} = \\log{ab}$

\n

$\\log{a} - \\log{b} = \\log{\\frac{a}{b}}$

\n

$\\log{a^n} = n\\log{a}$

", "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "rulesets": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "showQuestionGroupNames": false, "type": "question", "tags": [], "parts": [{"marks": 0, "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "gaps": [{"showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "minValue": "{a1}", "marks": 1, "correctAnswerFraction": false, "allowFractions": false, "integerAnswer": true, "integerPartialCredit": 0, "maxValue": "{a1}", "variableReplacementStrategy": "originalfirst", "type": "numberentry"}], "prompt": "

$\\log_\\var{a2}\\var{a3}+\\log_\\var{a2}x = \\var{a4}$

\n

$x=$[[0]]

", "variableReplacementStrategy": "originalfirst", "type": "gapfill"}, {"marks": 0, "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "gaps": [{"showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "minValue": "{b2}*({b1}^{b3})-{b4}", "marks": 1, "correctAnswerFraction": false, "allowFractions": false, "integerAnswer": true, "integerPartialCredit": 0, "maxValue": "{b2}*({b1}^{b3})-{b4}", "variableReplacementStrategy": "originalfirst", "type": "numberentry"}], "prompt": "

$\\log_\\var{b1}(x+\\var{b4})-\\log_\\var{b1}\\var{b2} = \\var{b3}$

\n

$x=$[[0]]

", "variableReplacementStrategy": "originalfirst", "type": "gapfill"}]}, {"name": "Andrew's copy of Solve a logarithmic equation", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "preamble": {"css": "", "js": ""}, "tags": [], "functions": {}, "parts": [{"gaps": [{"correctAnswerStyle": "plain", "showFeedbackIcon": true, "correctAnswerFraction": false, "minValue": "((3^(d/a))-c)/b", "mustBeReduced": false, "precisionPartialCredit": 0, "maxValue": "((3^(d/a))-c)/b", "scripts": {}, "showPrecisionHint": false, "marks": 1, "mustBeReducedPC": 0, "precisionMessage": "You have not given your answer to the correct precision.", "type": "numberentry", "variableReplacements": [], "allowFractions": false, "showCorrectAnswer": true, "precision": "3", "variableReplacementStrategy": "originalfirst", "precisionType": "dp", "strictPrecision": false, "notationStyles": ["plain", "en", "si-en"]}], "type": "gapfill", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "prompt": "

Input your answer correct to three decimal places.

\n

\\(x = \\) [[0]]

", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0}], "rulesets": {}, "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "d"], "statement": "

Calculate the value of \\(x\\) that satisfies the following equation:

\n

\\(\\var{a}log_3(\\var{b}x+\\var{c})=\\var{d}\\)

", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Solve a logarithmic equation

"}, "variables": {"b": {"definition": "random(3..5#1)", "templateType": "randrange", "description": "", "name": "b", "group": "Ungrouped variables"}, "c": {"definition": "random(1..3#1)", "templateType": "randrange", "description": "", "name": "c", "group": "Ungrouped variables"}, "a": {"definition": "random(2..3#1)", "templateType": "randrange", "description": "", "name": "a", "group": "Ungrouped variables"}, "d": {"definition": "random(1..3#1)", "templateType": "randrange", "description": "", "name": "d", "group": "Ungrouped variables"}}, "advice": "

\\(\\var{a}log(\\var{b}x+\\var{c})=\\var{d}\\)

\n

Divide across by \\(\\var{a}\\)

\n

\\(log(\\var{b}x+\\var{c})=\\var{d}/\\var{a}=\\simplify{{d}/{a}}\\)

\n

\\(\\var{b}x+\\var{c}=10^{\\simplify{{d}/{a}}}\\)

\n

\\(\\var{b}x+\\var{c}=\\simplify{10^{{d}/{a}}}\\)

\n

\\(\\var{b}x=\\simplify{10^{{d}/{a}}}-\\var{c}\\)

\n

\\(\\var{b}x=\\simplify{10^{{d}/{a}}-{c}}\\)

\n

\\(x=\\simplify{(10^{{d}/{a}}-{c})/{b}}\\)

", "type": "question"}, {"name": "Logarithms: Quotient Rule Equation ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Clare Lundon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/492/"}], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "statement": "

\n

Solve the following logarithmic equation for $x$.

\n

Input your answer as a fraction or an integer as appropriate and not as a decimal.

\n

", "functions": {}, "variable_groups": [], "advice": "

We use the following two rules for logs :

\n

1. $\\log_a(\\frac{x}{y})=\\log_a(x)-\\log_a(y)$

\n

2. $a^x=y \\iff \\log_a y=x$

\n

Using rule 1 we get
\\[\\log_{\\var{a}}(x+\\var{b})- \\log_{\\var{a}}(\\simplify{(x+{c})})=\\log_{\\var{a}}\\left(\\simplify{(x+{b})/(x+{c})}\\right)\\]
So the equation to solve becomes:  \\[\\log_{\\var{a}}\\left(\\simplify{(x+{b})/(x+{c})}\\right)=\\var{d}\\]
and using rule 2 this gives:

\n

\\[ \\begin{eqnarray} \\simplify{(x+{b})/(x+{c})}&=&{\\var{a}}^{\\var{d}}\\\\ \\simplify{(x+{b})}&=&{\\var{a}}^{\\var{d}}(\\simplify{(x+{c})})=\\simplify{{a^d}x+{a^d*c}}\\\\ \\simplify{{a^d-1}x}&=&{\\var{b}}-{\\var{a^d*c}=\\simplify{{b-c*a^d}}}\\\\ x&=&\\simplify{{b-c*a^d}/{a^d-1}} \\end{eqnarray} \\]

\n

We should check that this solution gives positive values for $x+\\var{b}$ and $\\simplify{x+{c}}$ as otherwise the logs are not defined.

\n

Substituting this value for $x$ into $\\log_{\\var{a}}(x+\\var{b})$ we get $\\log_{\\var{a}}(\\simplify{({b-c }{a^d})/{a^d-1}})$ so OK.

\n

For $\\log_{\\var{a}}(\\simplify{x+{c}})$ we get on substituting for $x$, $\\log_{\\var{a}}(\\simplify{({b-c })/{a^d-1}})$ so OK.

\n

Hence the value we found for $x$ is a solution to the original equation.

", "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "metadata": {"description": "

Solve for $x$:  $\\log_{a}(x+b)  - \\log_{a}(x+c)=d$

", "licence": "All rights reserved"}, "ungrouped_variables": ["a", "c", "b", "d"], "parts": [{"unitTests": [], "sortAnswers": false, "marks": 0, "customMarkingAlgorithm": "", "prompt": "

\\[\\log_{\\var{a}}(x+\\var{b})- \\log_{\\var{a}}(\\simplify{(x+{c})})=\\var{d}\\]

\n

$x=\\;$ [[0]]

\n

Input all numbers as fractions or integers and not as decimals.

", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "type": "gapfill", "scripts": {}, "gaps": [{"expectedVariableNames": [], "unitTests": [], "notallowed": {"message": "

Input as a fraction or an integer, not as a decimal.

", "partialCredit": 0, "strings": ["."], "showStrings": false}, "marks": 2, "customMarkingAlgorithm": "", "checkingType": "absdiff", "checkingAccuracy": 0.001, "showPreview": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "answerSimplification": "std", "vsetRangePoints": 5, "type": "jme", "vsetRange": [0, 1], "scripts": {}, "answer": "{b-c*a^d}/{a^d-1}", "failureRate": 1, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "checkVariableNames": false}], "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true}], "variables": {"a": {"definition": "random(2..5)", "name": "a", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "b": {"definition": "random(1..20)", "name": "b", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "d": {"definition": "random(1,2)", "name": "d", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "c": {"definition": "b-random(1..20)", "name": "c", "group": "Ungrouped variables", "templateType": "anything", "description": ""}}, "preamble": {"js": "", "css": ""}, "type": "question"}]}, {"pickQuestions": 1, "pickingStrategy": "all-ordered", "name": "Systems of Equations", "questions": [{"name": "Andrew's copy of Solving quadratic equations 1(b)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "functions": {}, "advice": "

The formula for solving a quadratic equation of the form  \\(ax^2+bx+c=0\\)  is given by

\n

\\(x=\\frac{-b\\pm \\sqrt{b^2-4ac}}{2a}\\)

\n

In this example  \\(a=\\var{a1},\\,\\,\\,b=\\var{b1}\\)  and  \\(c=\\var{c1}\\)

\n

\\(x=\\frac{-\\var{b1}\\pm \\sqrt{\\var{b1}^2-4\\times\\var{a1}\\times\\var{c1}}}{2\\times\\var{a1}}\\)

\n

\\(x=\\frac{-\\var{b1}\\pm \\sqrt{\\simplify{{b1}^2-4*{a1}*{c1}}}}{\\simplify{2*{a1}}}\\)

\n

\\(x=\\simplify{(-{b1}+ ({b1}^2-4*{a1}*{c1})^0.5)/(2*{a1})}\\)   or   \\(x=\\simplify{(-{b1}- ({b1}^2-4*{a1}*{c1})^0.5)/(2*{a1})}\\)

", "parts": [{"prompt": "

Type in the greater of the two values that satisfies the equation. Input your answer correct to three decimal places.

\n

\\(x\\) = [[0]]

\n

Type in the lesser of the two values that satisfies the equation. Input your answer correct to three decimal places.

\n

\\(x\\) = [[1]]

", "scripts": {}, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "gaps": [{"allowFractions": false, "precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "minValue": "-{b1}/(2*{a1})+sqrt({b1}^2-4*{a1}*{c1})/(2*{a1})", "precision": "3", "correctAnswerFraction": false, "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "maxValue": "-{b1}/(2*{a1})+sqrt({b1}^2-4*{a1}*{c1})/(2*{a1})", "strictPrecision": false, "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}, {"allowFractions": false, "precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "minValue": "-{b1}/(2*{a1})-sqrt({b1}^2-4*{a1}*{c1})/(2*{a1})", "precision": "3", "correctAnswerFraction": false, "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "maxValue": "-{b1}/(2*{a1})-sqrt({b1}^2-4*{a1}*{c1})/(2*{a1})", "strictPrecision": false, "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "showCorrectAnswer": true}], "question_groups": [{"questions": [], "pickQuestions": 0, "name": "", "pickingStrategy": "all-ordered"}], "variable_groups": [], "variables": {"b1": {"description": "", "group": "Ungrouped variables", "name": "b1", "templateType": "randrange", "definition": "random(16..25#1)"}, "a1": {"description": "", "group": "Ungrouped variables", "name": "a1", "templateType": "randrange", "definition": "random(1..6#1)"}, "c1": {"description": "", "group": "Ungrouped variables", "name": "c1", "templateType": "randrange", "definition": "random(1..10#1)"}}, "statement": "

There are two values that satisfy the quadratic equation:

\n

\\(\\var{a1}x^2+\\var{b1}x+\\var{c1}=0\\)

", "tags": [], "showQuestionGroupNames": false, "ungrouped_variables": ["a1", "b1", "c1"], "preamble": {"js": "", "css": ""}, "variablesTest": {"maxRuns": "1", "condition": "b1^2>4*a1*c1"}, "type": "question", "rulesets": {}, "metadata": {"description": "

Solving quadratic equations using a formula,

", "licence": "Creative Commons Attribution 4.0 International"}}]}, {"pickQuestions": 1, "pickingStrategy": "all-ordered", "name": "Matrices and Determinants", "questions": [{"name": "14: Matrices - Basic Operations", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "John Hodkinson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/921/"}], "rulesets": {}, "variablesTest": {"maxRuns": "100", "condition": "det(a) <> 0 and det(b) <> 0 and a[0][1] <> a[1][0]"}, "ungrouped_variables": ["a", "b", "c", "d"], "functions": {"inverse": {"type": "matrix", "language": "jme", "definition": "matrix([mat[1][1],-mat[0][1]],[-mat[1][0],mat[0][0]])/det(mat)", "parameters": [["mat", "matrix"]]}}, "metadata": {"licence": "All rights reserved", "description": "

Perform basic operations with 2x2 matrices - addition, subtraction, multiplication by scalar, matrix multiplication, determinant, transpose

"}, "statement": "

The following questions use the matrices below.

\n

$A = \\left( \\begin{array}{cc}\\var{a[0][0]} & \\var{a[0][1]}\\\\\\var{a[1][0]} & \\var{a[1][1]}\\end{array} \\right)$, $B =\\left( \\begin{array}{cc}\\var{b[0][0]} & \\var{b[0][1]}\\\\\\var{b[1][0]} & \\var{b[1][1]}\\end{array} \\right)$, $C =\\left( \\begin{array}{cc}\\var{c[0][0]} & \\var{c[0][1]}\\\\\\var{c[1][0]} & \\var{c[1][1]}\\end{array} \\right)$, $D = \\left( \\begin{array}{cc}\\var{d[0][0]} & \\var{d[0][1]}\\\\\\var{d[1][0]} & \\var{d[1][1]}\\end{array} \\right)$

\n

\n

Make sure to read through the explanation in the advice section at the bottom of the page after revealing the answers if you have any difficulties with these questions.

", "advice": "

An n x m matrix has n rows and m columns.

\n

a) Matrix addition is the 'slotwise' addition of each element in the two matrices, i.e. every element which is in the same location in the matrix is added together. It requires that both matrices are of the same size. For example,

\n

$\\left( \\begin{array}{ccc}3 & 2 & 2\\\\4 & 2& 0\\\\1 & 0 & 1\\end{array} \\right) + \\left( \\begin{array}{ccc}2 & 1 & 0\\\\7 & -3& 7\\\\-2 & 4 & 1\\end{array} \\right) = \\left( \\begin{array}{ccc}3 + 2& 2 +1& 2+0\\\\4+7 & 2-3& 0+7\\\\1-2 & 0+4 & 1+1\\end{array} \\right)=\\left( \\begin{array}{ccc}5 & 3 & 2\\\\11 & -1& 7\\\\-1 & 4 & 2\\end{array} \\right)$.

\n

This is a commutative operation (order doesn't matter).

\n

Scalar multiplication of a matrix is achieved by multiplying each element in the matrix by the scalar indivudually. For example,

\n

$3\\times\\left( \\begin{array}{cc}1 & -1\\\\3 & 0\\end{array} \\right) =\\left( \\begin{array}{cc}3 & -3 \\\\12 &0\\end{array} \\right)$

\n


This is again a commutative operation (order doesn't matter), since it boils down to slotwise multiplication, and multiplication of two numbers is a commutative operation. 

\n

b) Matrix multiplication is not quite as simple. It is a non-commutative operation, so the order matters. We can only multiply two matrices if the number of columns in the first matrix is the same as the number of rows in the second matrix. The dimension of the resulting matrix will be (no. rows in first matrix) x (no. columns in second matrix). For example, if we have a 2x4 matrix, $A$, and a 4x3 matrix, $B$, then $AB$ has dimension 2x3, i.e. 2 rows and 3 columns.

\n

The process of matrix multiplication is as follows:

\n\n

Here is an example of matrix multiplication of a 2x3 matrix and a 3x2 matrix. The resulting matrix is 2x2 as explained above.

\n

$\\left( \\begin{array}{ccc}2 & 4 & 3\\\\1 & -1 & 2\\end{array}\\right) \\times \\left(\\begin{array}{cc}1 & 4\\\\-2 & 0\\\\3 & -1\\end{array}\\right) = \\left(\\begin{array}{cc}3 & 5\\\\9 & 2\\end{array}\\right)$

\n

Here is an expanded form of the element in the second row and first column of the answer matrix: $9 = (1\\times1) + (-1\\times-2) + (2\\times3) = 1 + 2 + 6$. The first number in each bracket is taken from the second row of the first matrix, going left to right, and the second number is taken from the first column of the second matrix, going top to bottom. Check that you understand this process by finding the expanded form of the other 3 elements of the 2x2 answer matrix.

\n

It is obvious that for two non-square matrices that we are allowed to multiply together, the operation of matrix multiplication is non-commutative, since the dimension of the answer matrix will be different in each case. For two square matrices of the same dimension, in general, $AB \\neq BA$, so it is non-commutative. However, sometimes we find matrices which do commute. For example, the identity matrix, $I_n$, which is an nxn square matrix consisting of zeros with ones along the diagonal from top left to bottom right, commutes with all other matrices. Always assume that we cannot switch around the order of matrix multiplication unless we know for certain that we have two matrices which commute with each other, e.g. any nxn matrix and the nxn identity matrix, $I_n$, or an (invertible) matrix and its inverse.

\n

c) We usually label the elements in a matrix with lowercase letters. For example, we write a general 2x2 matrix, $M$, as $M = \\left(\\begin{array}{cc}a&b\\\\c&d\\end{array}\\right)$. The determinant of a 2x2 matrix, $M$, denoted $det(M)$ or $\\begin{vmatrix}M\\end{vmatrix}$, is $det(M) = ad - bc$. For example,

\n

$\\begin{vmatrix}\\left(\\begin{array}{cc}3&5\\\\-2&1\\end{array}\\right)\\end{vmatrix}  = 3\\times 1 - (5 \\times -2) = 3 -(-10) = 13$

\n

d) To transpose a matrix we switch its rows and columns. For example, 

\n

$\\left(\\begin{array}{ccc}a & b & c\\\\d& e & f\\end{array}\\right)^\\textbf{T} = \\left(\\begin{array}{cc}a &d\\\\b&e\\\\c&f\\end{array}\\right)$

\n

We can see that the first row becomes the first column and so on. We could also think of this as the first column becoming the first row and so on.

\n

\n

We can only find the inverse of a square matrix which has a non-zero determinant. For a 2x2 matrix, we use this formula to calculate the inverse of a matrix:

\n

$M^{-1} = \\left(\\begin{array}{cc}a & b\\\\c&d\\end{array}\\right)^{-1} = \\dfrac{1}{\\begin{vmatrix}M\\end{vmatrix}}\\left(\\begin{array}{cc}d & -b\\\\-c & a\\end{array}\\right)$

\n

You might wish to check that this is correct by multiplying $M$ and $M^{-1}$ both ways around to check that you get the 2x2 identity matrix, $I_2$.

\n

", "preamble": {"css": "", "js": ""}, "parts": [{"type": "gapfill", "scripts": {}, "gaps": [{"numColumns": "2", "allowResize": false, "allowFractions": false, "numRows": "2", "marks": 1, "tolerance": 0, "type": "matrix", "scripts": {}, "markPerCell": false, "correctAnswer": "a+b", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "correctAnswerFractions": false}, {"numColumns": "2", "allowResize": false, "allowFractions": false, "numRows": "2", "marks": 1, "tolerance": 0, "type": "matrix", "scripts": {}, "markPerCell": false, "correctAnswer": "a-b", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "correctAnswerFractions": false}, {"numColumns": "2", "allowResize": false, "allowFractions": false, "numRows": "2", "marks": 1, "tolerance": 0, "type": "matrix", "scripts": {}, "markPerCell": false, "correctAnswer": "c+d", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "correctAnswerFractions": false}, {"numColumns": "2", "allowResize": false, "allowFractions": false, "numRows": "2", "marks": 1, "tolerance": 0, "type": "matrix", "scripts": {}, "markPerCell": false, "correctAnswer": "scalarCoeff[0]*a", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "correctAnswerFractions": false}, {"numColumns": "2", "allowResize": false, "allowFractions": false, "numRows": "2", "marks": 1, "tolerance": 0, "type": "matrix", "scripts": {}, "markPerCell": false, "correctAnswer": "scalarCoeff[1]*a + scalarCoeff[2]*b", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "correctAnswerFractions": false}, {"numColumns": "2", "allowResize": false, "allowFractions": false, "numRows": "2", "marks": 1, "tolerance": 0, "type": "matrix", "scripts": {}, "markPerCell": false, "correctAnswer": "scalarCoeff[3]*d", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "correctAnswerFractions": false}], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "prompt": "

Find the following using matrix addition/subtraction and scalar multiplication:

\n

i) $A + B = $ [[0]]

\n

ii) $A - B = $ [[1]]

\n

iii) $C + D =$ [[2]]

\n

iv) $\\simplify{{scalarCoeff[0]}A}=$ [[3]]

\n

v) $\\simplify{{scalarCoeff[1]}A + {scalarCoeff[2]}B} =$ [[4]]

\n

vi) $\\simplify{{scalarCoeff[3]}D} = $ [[5]]

\n

", "variableReplacements": [], "marks": 0}, {"type": "gapfill", "scripts": {}, "gaps": [{"numColumns": "2", "allowResize": false, "allowFractions": false, "numRows": "2", "marks": 1, "tolerance": 0, "type": "matrix", "scripts": {}, "markPerCell": false, "correctAnswer": "a*b", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "correctAnswerFractions": false}, {"numColumns": "2", "allowResize": false, "allowFractions": false, "numRows": "2", "marks": 1, "tolerance": 0, "type": "matrix", "scripts": {}, "markPerCell": false, "correctAnswer": "b*c", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "correctAnswerFractions": false}, {"numColumns": "2", "allowResize": false, "allowFractions": false, "numRows": "2", "marks": 1, "tolerance": 0, "type": "matrix", "scripts": {}, "markPerCell": false, "correctAnswer": "c*d", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "correctAnswerFractions": false}, {"numColumns": "2", "allowResize": false, "allowFractions": false, "numRows": "2", "marks": 1, "tolerance": 0, "type": "matrix", "scripts": {}, "markPerCell": false, "correctAnswer": "d*c", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "correctAnswerFractions": false}], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "prompt": "

$A = \\left( \\begin{array}{cc}\\var{a[0][0]} & \\var{a[0][1]}\\\\\\var{a[1][0]} & \\var{a[1][1]}\\end{array} \\right)$, $B =\\left( \\begin{array}{cc}\\var{b[0][0]} & \\var{b[0][1]}\\\\\\var{b[1][0]} & \\var{b[1][1]}\\end{array} \\right)$, $C =\\left( \\begin{array}{cc}\\var{c[0][0]} & \\var{c[0][1]}\\\\\\var{c[1][0]} & \\var{c[1][1]}\\end{array} \\right)$, $D = \\left( \\begin{array}{cc}\\var{d[0][0]} & \\var{d[0][1]}\\\\\\var{d[1][0]} & \\var{d[1][1]}\\end{array} \\right)$

\n

Find the following using matrix multiplication:

\n

i) $AB =$ [[0]]

\n

ii $BC =$ [[1]]

\n

iii) $CD =$ [[2]]

\n

iv) $DC =$ [[3]]

", "variableReplacements": [], "marks": 0}, {"type": "gapfill", "scripts": {}, "gaps": [{"type": "numberentry", "showCorrectAnswer": true, "correctAnswerFraction": false, "maxValue": "det(a)", "allowFractions": false, "variableReplacementStrategy": "originalfirst", "minValue": "det(a)", "scripts": {}, "showPrecisionHint": false, "variableReplacements": [], "marks": 1}, {"type": "numberentry", "showCorrectAnswer": true, "correctAnswerFraction": false, "maxValue": "det(b)", "allowFractions": false, "variableReplacementStrategy": "originalfirst", "minValue": "det(b)", "scripts": {}, "showPrecisionHint": false, "variableReplacements": [], "marks": 1}, {"type": "numberentry", "showCorrectAnswer": true, "correctAnswerFraction": false, "maxValue": "det(c)", "allowFractions": false, "variableReplacementStrategy": "originalfirst", "minValue": "det(c)", "scripts": {}, "showPrecisionHint": false, "variableReplacements": [], "marks": 1}, {"type": "numberentry", "showCorrectAnswer": true, "correctAnswerFraction": false, "maxValue": "det(d)", "allowFractions": false, "variableReplacementStrategy": "originalfirst", "minValue": "det(d)", "scripts": {}, "showPrecisionHint": false, "variableReplacements": [], "marks": 1}], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "prompt": "

$A = \\left( \\begin{array}{cc}\\var{a[0][0]} & \\var{a[0][1]}\\\\\\var{a[1][0]} & \\var{a[1][1]}\\end{array} \\right)$, $B =\\left( \\begin{array}{cc}\\var{b[0][0]} & \\var{b[0][1]}\\\\\\var{b[1][0]} & \\var{b[1][1]}\\end{array} \\right)$, $C =\\left( \\begin{array}{cc}\\var{c[0][0]} & \\var{c[0][1]}\\\\\\var{c[1][0]} & \\var{c[1][1]}\\end{array} \\right)$, $D = \\left( \\begin{array}{cc}\\var{d[0][0]} & \\var{d[0][1]}\\\\\\var{d[1][0]} & \\var{d[1][1]}\\end{array} \\right)$

\n

$\\begin{vmatrix}M\\end{vmatrix}$ is another way of writing $det(M)$.

\n

Find the following determinants: 

\n

i) $\\begin{vmatrix}A\\end{vmatrix} = $ [[0]]

\n

ii) $\\begin{vmatrix}B\\end{vmatrix} = $ [[1]]

\n

\n

iii) $\\begin{vmatrix}C\\end{vmatrix} = $ [[2]]

\n

\n

iv) $\\begin{vmatrix}D\\end{vmatrix} = $ [[3]]

\n

", "variableReplacements": [], "marks": 0}, {"type": "gapfill", "scripts": {}, "gaps": [{"numColumns": "2", "allowResize": false, "allowFractions": false, "numRows": "2", "marks": 1, "tolerance": 0, "type": "matrix", "scripts": {}, "markPerCell": false, "correctAnswer": "transpose(a)", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "correctAnswerFractions": false}, {"numColumns": "2", "allowResize": false, "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": true, "precisionPartialCredit": 0, "numRows": "2", "type": "matrix", "correctAnswerFractions": false, "marks": 1, "tolerance": 0, "precisionType": "dp", "scripts": {}, "markPerCell": false, "strictPrecision": false, "correctAnswer": "inverse(a)", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "precision": "3"}, {"numColumns": "2", "allowResize": false, "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": true, "precisionPartialCredit": 0, "numRows": "2", "type": "matrix", "correctAnswerFractions": false, "marks": 1, "tolerance": 0, "precisionType": "dp", "scripts": {}, "markPerCell": false, "strictPrecision": false, "correctAnswer": "inverse(b)", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "precision": "3"}, {"numColumns": "2", "allowResize": false, "allowFractions": false, "numRows": "2", "marks": 1, "tolerance": 0, "type": "matrix", "scripts": {}, "markPerCell": false, "correctAnswer": "matrix([1,0],[0,1])", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "correctAnswerFractions": false}], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "prompt": "

$A = \\left( \\begin{array}{cc}\\var{a[0][0]} & \\var{a[0][1]}\\\\\\var{a[1][0]} & \\var{a[1][1]}\\end{array} \\right)$, $B =\\left( \\begin{array}{cc}\\var{b[0][0]} & \\var{b[0][1]}\\\\\\var{b[1][0]} & \\var{b[1][1]}\\end{array} \\right)$, $C =\\left( \\begin{array}{cc}\\var{c[0][0]} & \\var{c[0][1]}\\\\\\var{c[1][0]} & \\var{c[1][1]}\\end{array} \\right)$, $D = \\left( \\begin{array}{cc}\\var{d[0][0]} & \\var{d[0][1]}\\\\\\var{d[1][0]} & \\var{d[1][1]}\\end{array} \\right)$

\n

$A^\\textbf{T}$ is the transpose of $A$ and $A^{-1}$ is the inverse of $A$.

\n

Find the following: (give your answers to 3 decimal places where applicable)

\n

i) $A^\\textbf{T} =$ [[0]]

\n

ii) $A^{-1} =$ [[1]]

\n

iii) $B^{-1} =$ [[2]]

\n

iv) $A\\space A^{-1}$ [[3]]

", "variableReplacements": [], "marks": 0}], "variables": {"d": {"group": "Ungrouped variables", "name": "d", "definition": "matrix(repeat(repeat(random(-5..5),2),2))", "templateType": "anything", "description": ""}, "b": {"group": "Ungrouped variables", "name": "b", "definition": "matrix(repeat(repeat(random(-5..5),2),2))", "templateType": "anything", "description": ""}, "scalarCoeff": {"group": "Part a)", "name": "scalarCoeff", "definition": "repeat(random(-5..5 except 0..1),4)", "templateType": "anything", "description": ""}, "a": {"group": "Ungrouped variables", "name": "a", "definition": "matrix(repeat(repeat(random(-5..5),2),2))", "templateType": "anything", "description": ""}, "c": {"group": "Ungrouped variables", "name": "c", "definition": "matrix(repeat(repeat(random(-5..5),2),2))", "templateType": "anything", "description": ""}}, "tags": [], "type": "question", "variable_groups": [{"name": "Part a)", "variables": ["scalarCoeff"]}], "showQuestionGroupNames": false, "question_groups": [{"pickingStrategy": "all-ordered", "name": "", "pickQuestions": 0, "questions": []}]}, {"name": "Andrew's copy of Solve a system of three simultaneous linear equations", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "functions": {}, "advice": "

(i)    \\(\\var{a1}x+2y+4z=\\var{r1}\\)

\n

(ii)   \\(2x+\\var{b1}y+3z=\\var{r2}\\)

\n

(iii)  \\(5x+6y+\\var{c1}z=\\var{r3}\\)

\n

First reduce the three equations in three unknowns to a two equations in two unknowns problem by eliminating one of the variables.

\n

We can eliminate \\(x\\) using equations (i) and (ii)

\n

2*(i)     \\(\\simplify{2*{a1}}x+4y+8z=\\simplify{2*{r1}}\\)

\n

\\(\\var{a1}\\)*(ii)    \\(\\simplify{2*{a1}}x+\\simplify{{a1}*{b1}}y+\\simplify{3*{a1}}z=\\simplify{{a1}*{r2}}\\)

\n

Subtracting gives us a new equation

\n

(iv)    \\(\\simplify{(4-{a1}{b1})y+(8-3*{a1})z}=\\simplify{2*{r1}-{a1}*{r2}}\\)

\n

We can also eliminate \\(x\\) using equations (ii) and (iii)

\n

5*(ii)    \\(10x +\\simplify{5*{b1}}y+15z=\\simplify{5*{r2}}\\)

\n

2*(iii)   \\(10x+12y+\\simplify{2*{c1}}z=\\simplify{2*{r3}}\\)

\n

Subtracting gives us another new equation

\n

(v)     \\(\\simplify{(5*{b1}-12)y+(15-2*{c1})z}=\\simplify{5*{r2}-2*{r3}}\\)

\n

We could then eliminate the \\(y\\) from these two new equations

\n

\\(\\simplify{5*{b1}-12}\\)*(iv)    \\(\\simplify{(5*{b1}-12)*(4-{a1}{b1})y+(5*{b1}-12)*(8-3*{a1})z}=\\simplify{(5*{b1}-12)*(2*{r1}-{a1}*{r2})}\\)

\n

\\(\\simplify{4-{a1}{b1}}\\)*(v)    \\(\\simplify{(4-{a1}{b1})*(5*{b1}-12)y+(4-{a1}{b1})*(15-2*{c1})z}=\\simplify{(4-{a1}{b1})*(5*{r2}-2*{r3})}\\)

\n

Subtracting gives us

\n

\\(\\simplify{(5*{b1}-12)*(8-3*{a1})-(4-{a1}{b1})*(15-2*{c1})}z=\\simplify{(5*{b1}-12)*(2*{r1}-{a1}*{r2})-(4-{a1}{b1})*(5*{r2}-2*{r3})}\\)

\n

Thus

\n

\\(z=\\frac{\\simplify{(5*{b1}-12)*(2*{r1}-{a1}*{r2})-(4-{a1}{b1})*(5*{r2}-2*{r3})}}{\\simplify{(5*{b1}-12)*(8-3*{a1})-(4-{a1}{b1})*(15-2*{c1})}}=\\simplify{decimal{((5*{b1}-12)*(2*{r1}-{a1}*{r2})-(4-{a1}*{b1})*(5*{r2}-2*{r3}))/(  (5*{b1}-12)*(8-3*{a1})-(4-{a1}*{b1})*(15-2*{c1}))}}\\)

\n

We can now back substitute this value for \\(z\\) into equation (iv) to find the correct value for \\(y\\) and then back substitute both these values into equation (i) to calculate \\(x\\). 

\n

", "parts": [{"prompt": "

Input the value of \\(x\\) that satisfies the three equations.

\n

\\(x = \\) [[0]]

\n

Input the value of \\(y\\) that satisfies the three equations.

\n

\\(y = \\) [[1]]

\n

Input the value of \\(z\\) that satisfies the three equations.

\n

\\(z = \\) [[2]]

", "scripts": {}, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "showFeedbackIcon": true, "gaps": [{"correctAnswerStyle": "plain", "precisionType": "dp", "mustBeReducedPC": 0, "strictPrecision": false, "precision": "3", "showPrecisionHint": true, "type": "numberentry", "correctAnswerFraction": false, "precisionMessage": "You have not given your answer to the correct precision.", "scripts": {}, "mustBeReduced": false, "marks": 1, "minValue": "((18-{b1}*{c1})*(3*{r1}-{r3})+({c1}-12)*(6*{r2}-{b1}*{r3}))/((3*{a1}-5)*(18-{b1}*{c1})-(12-5*{b1})*(12-{c1}))", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "variableReplacements": [], "precisionPartialCredit": 0, "maxValue": "((18-{b1}*{c1})*(3*{r1}-{r3})+({c1}-12)*(6*{r2}-{b1}*{r3}))/((3*{a1}-5)*(18-{b1}*{c1})-(12-5*{b1})*(12-{c1}))", "showCorrectAnswer": true}, {"correctAnswerStyle": "plain", "precisionType": "dp", "mustBeReducedPC": 0, "strictPrecision": false, "precision": "3", "showPrecisionHint": true, "type": "numberentry", "correctAnswerFraction": false, "precisionMessage": "You have not given your answer to the correct precision.", "scripts": {}, "mustBeReduced": false, "marks": 1, "minValue": "((15-2*{c1})*(2*{r1}-{a1}*{r2})+(3*{a1}-8)*(5*{r2}-2*{r3}))/((4-{a1}*{b1})*(15-2*{c1})-(5*{b1}-12)*(8-3*{a1}))", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "variableReplacements": [], "precisionPartialCredit": 0, "maxValue": "((15-2*{c1})*(2*{r1}-{a1}*{r2})+(3*{a1}-8)*(5*{r2}-2*{r3}))/((4-{a1}*{b1})*(15-2*{c1})-(5*{b1}-12)*(8-3*{a1}))", "showCorrectAnswer": true}, {"correctAnswerStyle": "plain", "precisionType": "dp", "mustBeReducedPC": 0, "strictPrecision": false, "precision": "3", "showPrecisionHint": true, "type": "numberentry", "correctAnswerFraction": false, "precisionMessage": "You have not given your answer to the correct precision.", "scripts": {}, "mustBeReduced": false, "marks": 1, "minValue": "((12-5*{b1})*(2*{r1}-{a1}*{r2})+(4-{b1}*{a1})*(5*{r2}-2*{r3}))/((4-{a1}*{b1})*(15-2*{c1})-(5*{b1}-12)*(8-3*{a1}))", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "variableReplacements": [], "precisionPartialCredit": 0, "maxValue": "((12-5*{b1})*(2*{r1}-{a1}*{r2})+(4-{b1}*{a1})*(5*{r2}-2*{r3}))/((4-{a1}*{b1})*(15-2*{c1})-(5*{b1}-12)*(8-3*{a1}))", "showCorrectAnswer": true}], "showCorrectAnswer": true}], "variable_groups": [], "variables": {"b1": {"description": "", "group": "Ungrouped variables", "name": "b1", "templateType": "randrange", "definition": "random(2..10#1)"}, "r2": {"description": "", "group": "Ungrouped variables", "name": "r2", "templateType": "randrange", "definition": "random(18..50#1)"}, "r1": {"description": "", "group": "Ungrouped variables", "name": "r1", "templateType": "randrange", "definition": "random(20..42#1)"}, "r3": {"description": "", "group": "Ungrouped variables", "name": "r3", "templateType": "randrange", "definition": "random(30..60#1)"}, "c1": {"description": "", "group": "Ungrouped variables", "name": "c1", "templateType": "randrange", "definition": "random(3..12#1)"}, "a1": {"description": "", "group": "Ungrouped variables", "name": "a1", "templateType": "randrange", "definition": "random(2..8#1)"}}, "statement": "

Solve the following system of three simultaneous linear equations:

\n

\\(2x+\\var{b1}y+3z=\\var{r2}\\)

\n

\\(5x+6y+\\var{c1}z=\\var{r3}\\)

\n

\\(\\var{a1}x+2y+4z=\\var{r1}\\)

", "tags": [], "ungrouped_variables": ["a1", "b1", "c1", "r1", "r2", "r3"], "preamble": {"js": "", "css": ""}, "variablesTest": {"maxRuns": 100, "condition": ""}, "metadata": {"description": "

Solve a system of three simultaneous linear equations

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}, "type": "question"}, {"name": "Andrew's copy of Matrices: Inverse Matrix Method ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "preamble": {"css": "", "js": ""}, "tags": [], "functions": {}, "parts": [{"gaps": [{"allowFractions": false, "marks": 1, "tolerance": 0, "numColumns": "2", "markPerCell": true, "allowResize": false, "showFeedbackIcon": true, "correctAnswer": "matrix([\n [a,b],\n [a1,b1]\n])", "numRows": "2", "correctAnswerFractions": false, "type": "matrix", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}, {"checkingtype": "absdiff", "marks": "0.25", "expectedvariablenames": [], "vsetrangepoints": 5, "vsetrange": [0, 1], "showFeedbackIcon": true, "checkingaccuracy": 0.001, "answer": "x", "type": "jme", "variableReplacements": [], "showpreview": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false}, {"checkingtype": "absdiff", "marks": "0.25", "expectedvariablenames": [], "vsetrangepoints": 5, "vsetrange": [0, 1], "showFeedbackIcon": true, "checkingaccuracy": 0.001, "answer": "y", "type": "jme", "variableReplacements": [], "showpreview": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false}, {"allowFractions": true, "marks": "0.5", "tolerance": 0, "numColumns": 1, "markPerCell": true, "allowResize": false, "showFeedbackIcon": true, "correctAnswer": "matrix([\n [c],\n [c1]\n])", "numRows": "2", "correctAnswerFractions": true, "type": "matrix", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}], "type": "gapfill", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "prompt": "

$A = $ [[0]]

\n\n\n\n\n\n\n\n\n\n\n\n
$v = \\;\\;\\Bigg($[[1]]$\\Bigg)$
[[2]]
\n

$b = $ [[3]]

", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0}, {"gaps": [{"allowFractions": true, "marks": "2", "tolerance": 0, "numColumns": "2", "markPerCell": true, "allowResize": false, "showFeedbackIcon": true, "correctAnswer": "matrix([\n [b1,-b],\n [-a1,a]\n])", "numRows": "2", "correctAnswerFractions": true, "type": "matrix", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}, {"checkingtype": "absdiff", "marks": 1, "expectedvariablenames": [], "vsetrangepoints": 5, "vsetrange": [0, 1], "showFeedbackIcon": true, "checkingaccuracy": 0.001, "answer": "1/{da}", "type": "jme", "variableReplacements": [], "showpreview": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false}], "type": "gapfill", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "prompt": "

Find the inverse of $A$. Input all numbers as fractions or integers and not as decimals. Simplify your fractions as much as possible!

\n

$A^{-1} = $ [[1]][[0]]

", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0}, {"gaps": [{"allowFractions": true, "marks": 1, "tolerance": 0, "numColumns": 1, "markPerCell": true, "allowResize": false, "showFeedbackIcon": true, "correctAnswer": "matrix([{c*b1-c1*b}/{b1*a-a1*b}],[{-c*a1+c1*a}/{b1*a-a1*b}])", "numRows": "2", "correctAnswerFractions": true, "type": "matrix", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}], "type": "gapfill", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "prompt": "

$A^{-1}b = $ [[0]]

", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0}, {"gaps": [{"checkingtype": "absdiff", "marks": 0.5, "expectedvariablenames": [], "vsetrangepoints": 5, "vsetrange": [0, 1], "showFeedbackIcon": true, "checkingaccuracy": 0.001, "answer": "{c*b1-c1*b}/{b1*a-a1*b}", "notallowed": {"message": "

Input as a fraction or an integer, not as a decimal

", "strings": ["."], "partialCredit": 0, "showStrings": false}, "type": "jme", "variableReplacements": [], "answersimplification": "std", "showpreview": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false}, {"checkingtype": "absdiff", "marks": 0.5, "expectedvariablenames": [], "vsetrangepoints": 5, "vsetrange": [0, 1], "showFeedbackIcon": true, "checkingaccuracy": 0.001, "answer": "{-c*a1+c1*a}/{b1*a-a1*b}", "notallowed": {"message": "

Input as a fraction or an integer, not as a decimal

", "strings": ["."], "partialCredit": 0, "showStrings": false}, "type": "jme", "variableReplacements": [], "answersimplification": "std", "showpreview": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false}], "type": "gapfill", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "prompt": "\n \n \n

Now solve the equations, inputting all numbers as fractions or integers and not as decimals.
$x = \\;\\;$[[0]]

\n \n \n \n

$y = \\;\\;$[[1]]

\n \n \n \n ", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0}], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "addortakeaway", "c", "b", "da", "a1", "sc", "ab", "sb1", "b1", "test", "sb", "sa", "sc1", "sa1", "c1", "inc"], "statement": "

Write the following equations as a matrix equation
\\[Av=b\\]for a matrix $A$ and column vectors $v$ and $b$
\\[ \\begin{eqnarray*} \\simplify[std]{{a}x+{b}y}&=&\\var{c}\\\\ \\simplify[std]{{a1}x+{b1}y}&=&\\var{c1} \\end{eqnarray*} \\]

", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Putting a pair of linear equations into matrix notation and then solving by finding the inverse of the coefficient matrix. 

"}, "variables": {"c": {"definition": "sc*random(1..9)", "templateType": "anything", "description": "", "name": "c", "group": "Ungrouped variables"}, "sc1": {"definition": "random(1,-1)", "templateType": "anything", "description": "", "name": "sc1", "group": "Ungrouped variables"}, "sa1": {"definition": "random(1,-1)", "templateType": "anything", "description": "", "name": "sa1", "group": "Ungrouped variables"}, "sb1": {"definition": "random(1,-1)", "templateType": "anything", "description": "", "name": "sb1", "group": "Ungrouped variables"}, "b": {"definition": "sb*random(1..9)", "templateType": "anything", "description": "", "name": "b", "group": "Ungrouped variables"}, "sb": {"definition": "random(1,-1)", "templateType": "anything", "description": "", "name": "sb", "group": "Ungrouped variables"}, "b1": {"definition": "if(ab=1,sb1*random(2..9),if(ab=2 or ab=4 or ab=8,sb1*random(1,3,5,7,9), if(ab=3 or ab=6 or ab=9,sb1*random(1,2,4,5,6,8),if(ab=5,sb1*random(1,2,3,4,6,7,8,9),sb1*random(1,2,3,4,5,6,8,9)))))", "templateType": "anything", "description": "", "name": "b1", "group": "Ungrouped variables"}, "a": {"definition": "sa*random(1..9)", "templateType": "anything", "description": "", "name": "a", "group": "Ungrouped variables"}, "test": {"definition": "round(a*b1/b)", "templateType": "anything", "description": "", "name": "test", "group": "Ungrouped variables"}, "sa": {"definition": "random(1,-1)", "templateType": "anything", "description": "", "name": "sa", "group": "Ungrouped variables"}, "ab": {"definition": "abs(b)", "templateType": "anything", "description": "", "name": "ab", "group": "Ungrouped variables"}, "inc": {"definition": "sa*random(1..9)", "templateType": "anything", "description": "", "name": "inc", "group": "Ungrouped variables"}, "a1": {"definition": "if(test+inc=0,test+inc+1,test+inc)", "templateType": "anything", "description": "", "name": "a1", "group": "Ungrouped variables"}, "c1": {"definition": "sc1*random(1..9)", "templateType": "anything", "description": "", "name": "c1", "group": "Ungrouped variables"}, "addortakeaway": {"definition": "if(b*b1<0,'add the equation','take away the equation')", "templateType": "anything", "description": "", "name": "addortakeaway", "group": "Ungrouped variables"}, "da": {"definition": "a*b1-a1*b", "templateType": "anything", "description": "", "name": "da", "group": "Ungrouped variables"}, "sc": {"definition": "random(1,-1)", "templateType": "anything", "description": "", "name": "sc", "group": "Ungrouped variables"}}, "advice": "

a)

\n

The equations can be written in the matrix form:

\n

\\[\\begin{pmatrix} \\var{a} & \\var{b}\\\\ \\var{a1}&\\var{b1} \\end{pmatrix} \\begin{pmatrix} x \\\\ y \\end{pmatrix} = \\begin{pmatrix} \\var{c} \\\\ \\var{c1} \\end{pmatrix}\\]

\n

b)

\n

Since $\\mathrm{det}(A) = \\simplify[]{{a}*{b1}-{b}*{a1}={dA}} \\neq 0$, $A$ is invertible and

\n

\\[A^{-1} = \\begin{pmatrix} \\simplify[std]{{b1}/{dA}}&\\simplify[std]{{-b}/{dA}}\\\\\\simplify[std]{{-a1}/{dA}}&\\simplify[std]{{a}/{dA}} \\end{pmatrix}\\]

\n

c)

\n

We have:

\n

\\[ \\begin{eqnarray*} A^{-1}b &=& \\begin{pmatrix} \\simplify[std]{{b1}/{dA}}&\\simplify[std]{{-b}/{dA}}\\\\\\simplify[std]{{-a1}/{dA}}&\\simplify[std]{{a}/{dA}} \\end{pmatrix}\\begin{pmatrix} \\var{c}\\\\\\var{c1}\\end{pmatrix} \\\\ &=& \\begin{pmatrix} \\simplify[std]{{c*b1-c1*b}/{dA}}\\\\\\simplify[std]{{c1*a-c*a1}/{dA}}\\end{pmatrix} \\end{eqnarray*} \\]

\n

d)

\n

Note that $Av = b \\Rightarrow v = A^{-1}b$ hence we can read the solution from the last part as this gives:

\n

\\[\\begin{pmatrix} x\\\\y \\end{pmatrix} = \\begin{pmatrix} \\simplify[std]{{c*b1-c1*b}/{dA}}\\\\ \\simplify[std]{{c1*a-c*a1}/{dA}}\\end{pmatrix}\\]

\n

Hence \\[\\begin{eqnarray*} x&=& \\simplify[std]{{c*b1-c1*b}/{dA}}\\\\ y&=& \\simplify[std]{{c1*a-c*a1}/{dA}} \\end{eqnarray*} \\]

", "type": "question"}, {"name": "Andrew's copy of Matrices: Multiplication 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "functions": {}, "advice": "

a)

\n

\\[ \\begin{eqnarray*} AB &=& \\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22}\\\\ \\end{pmatrix}\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22}\\\\ \\end{pmatrix}\\\\ &=& \\begin{pmatrix} \\simplify[]{{a11}{b11}+{a12}{b21}}&\\simplify[]{{a11}{b12}+{a12}{b22}}\\\\ \\simplify[]{{a21}{b11}+{a22}{b21}}&\\simplify[]{{a21}{b12}+{a22}{b22}}\\\\ \\end{pmatrix}\\\\ &=& \\begin{pmatrix} \\var{ab11}&\\var{ab12}\\\\ \\var{ab21}&\\var{ab22}\\\\ \\end{pmatrix} \\end{eqnarray*} \\]

\n

b)

\n

\\[ \\begin{eqnarray*} BA &=& \\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22}\\\\ \\end{pmatrix}\\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22}\\\\ \\end{pmatrix}\\\\ &=& \\begin{pmatrix} \\simplify[]{{b11}{a11}+{b12}{a21}}&\\simplify[]{{b11}{a12}+{b12}{a22}}\\\\ \\simplify[]{{b21}{a11}+{b22}{a21}}&\\simplify[]{{b21}{a12}+{b22}{a22}}\\\\ \\end{pmatrix}\\\\ &=& \\begin{pmatrix} \\var{ba11}&\\var{ba12}\\\\ \\var{ba21}&\\var{ba22}\\\\ \\end{pmatrix} \\end{eqnarray*} \\]

\n

c)

\n

\\[ \\begin{eqnarray*} CB &=& \\begin{pmatrix} \\var{c11}&\\var{c12}\\\\ \\var{c21}&\\var{c22}\\\\ \\end{pmatrix}\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22}\\\\ \\end{pmatrix}\\\\ &=& \\begin{pmatrix} \\simplify[]{{c11}{b11}+{c12}{b21}}&\\simplify[]{{c11}{b12}+{c12}{b22}}\\\\ \\simplify[]{{c21}{b11}+{c22}{b21}}&\\simplify[]{{c21}{b12}+{a22}{b22}}\\\\ \\end{pmatrix}\\\\ &=& \\begin{pmatrix} \\var{cb11}&\\var{cb12}\\\\ \\var{cb21}&\\var{cb22}\\\\ \\end{pmatrix} \\end{eqnarray*} \\]

\n

d)

\n

\\[ \\begin{eqnarray*} AC &=& \\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22}\\\\ \\end{pmatrix}\\begin{pmatrix} \\var{c11}&\\var{c12}\\\\ \\var{c21}&\\var{c22}\\\\ \\end{pmatrix}\\\\ &=& \\begin{pmatrix} \\simplify[]{{a11}{c11}+{a12}{c21}}&\\simplify[]{{a11}{c12}+{a12}{c22}}\\\\ \\simplify[]{{a21}{c11}+{a22}{c21}}&\\simplify[]{{a21}{c12}+{a22}{c22}}\\\\ \\end{pmatrix}\\\\ &=& \\begin{pmatrix} \\var{ac11}&\\var{ac12}\\\\ \\var{ac21}&\\var{ac22}\\\\ \\end{pmatrix} \\end{eqnarray*} \\]

", "parts": [{"prompt": "

$\\mathbf{AB} = \\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22}\\\\ \\end{pmatrix}\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22}\\\\ \\end{pmatrix} = $ [[0]]

", "scripts": {}, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "showFeedbackIcon": true, "gaps": [{"allowFractions": false, "correctAnswer": "matrix([\n [ab11,ab12],\n [ab21,ab22]\n])", "allowResize": false, "markPerCell": false, "numColumns": "2", "tolerance": 0, "scripts": {}, "type": "matrix", "correctAnswerFractions": false, "variableReplacementStrategy": "originalfirst", "numRows": "2", "showFeedbackIcon": true, "variableReplacements": [], "marks": "1", "showCorrectAnswer": true}], "showCorrectAnswer": true}, {"prompt": "

$\\mathbf{BA} = \\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22}\\\\ \\end{pmatrix}\\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22}\\\\ \\end{pmatrix}=$ [[0]]

", "scripts": {}, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "showFeedbackIcon": true, "gaps": [{"allowFractions": false, "correctAnswer": "matrix([\n [ba11,ba12],\n [ba21,ba22]\n])", "allowResize": false, "markPerCell": false, "numColumns": "2", "tolerance": 0, "scripts": {}, "type": "matrix", "correctAnswerFractions": false, "variableReplacementStrategy": "originalfirst", "numRows": "2", "showFeedbackIcon": true, "variableReplacements": [], "marks": "1", "showCorrectAnswer": true}], "showCorrectAnswer": true}], "variable_groups": [], "variables": {"ba21": {"description": "", "group": "Ungrouped variables", "name": "ba21", "templateType": "anything", "definition": "b21*a11+b22*a21"}, "b12": {"description": "", "group": "Ungrouped variables", "name": "b12", "templateType": "anything", "definition": "random(-3..1)"}, "ba11": {"description": "", "group": "Ungrouped variables", "name": "ba11", "templateType": "anything", "definition": "b11*a11+b12*a21"}, "a22": {"description": "", "group": "Ungrouped variables", "name": "a22", "templateType": "anything", "definition": "random(1..3)"}, "ab12": {"description": "", "group": "Ungrouped variables", "name": "ab12", "templateType": "anything", "definition": "a11*b12+a12*b22"}, "a11": {"description": "", "group": "Ungrouped variables", "name": "a11", "templateType": "anything", "definition": "random(-2,1,2)"}, "b11": {"description": "", "group": "Ungrouped variables", "name": "b11", "templateType": "anything", "definition": "random(-3,-1,0,3)"}, "b21": {"description": "", "group": "Ungrouped variables", "name": "b21", "templateType": "anything", "definition": "random(2,3)"}, "a12": {"description": "", "group": "Ungrouped variables", "name": "a12", "templateType": "anything", "definition": "random(1..4)"}, "a21": {"description": "", "group": "Ungrouped variables", "name": "a21", "templateType": "anything", "definition": "random(-2..2)"}, "ab22": {"description": "", "group": "Ungrouped variables", "name": "ab22", "templateType": "anything", "definition": "a21*b12+a22*b22"}, "b22": {"description": "", "group": "Ungrouped variables", "name": "b22", "templateType": "anything", "definition": "random(-3..-1)"}, "ab11": {"description": "", "group": "Ungrouped variables", "name": "ab11", "templateType": "anything", "definition": "a11*b11+a12*b21"}, "ab21": {"description": "", "group": "Ungrouped variables", "name": "ab21", "templateType": "anything", "definition": "a21*b11+a22*b21"}, "ba22": {"description": "", "group": "Ungrouped variables", "name": "ba22", "templateType": "anything", "definition": "b21*a12+b22*a22"}, "ba12": {"description": "", "group": "Ungrouped variables", "name": "ba12", "templateType": "anything", "definition": "b11*a12+b12*a22"}}, "statement": "

Given the square matrices:

\n


\\[\\mathbf{A}=\\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22}\\\\ \\end{pmatrix},\\;\\; \\mathbf{B}=\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22}\\\\ \\end{pmatrix}\\]

\n


Evaluate the following products:

", "tags": [], "ungrouped_variables": ["ba21", "a21", "a22", "ba22", "b22", "b21", "ab22", "ab21", "b12", "b11", "a11", "a12", "ba11", "ba12", "ab12", "ab11"], "preamble": {"js": "", "css": ""}, "variablesTest": {"maxRuns": 100, "condition": ""}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "metadata": {"description": "

Multiplication of $2 \\times 2$ matrices.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question"}, {"name": "Andrew's copy of Matrices: Cramers Rule 3x3", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "tags": [], "preamble": {"css": "", "js": ""}, "statement": "

Using Cramer's rule , solve the system of equations:

\n

$\\var{a11}x_1+\\var{a12}x_2+\\var{a13}x_3=\\var{c1}$

\n

$\\var{a21}x_1+\\var{a22}x_2+\\var{a23}x_3=\\var{c2}$

\n

$\\var{a31}x_1+\\var{a32}x_2+\\var{a33}x_3=\\var{c3}$

\n

\n

", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Cramers Rule applied to 3 simultaneous equations

"}, "rulesets": {}, "variables": {"a13": {"name": "a13", "definition": "random(0..100)/10", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "a33": {"name": "a33", "definition": "random(0..100)/10", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "c2": {"name": "c2", "definition": "a21*x1+a22*x2+a23*x3", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "a12": {"name": "a12", "definition": "random(0..100)/10", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "matrixA1": {"name": "matrixA1", "definition": "matrix([c1,a12,a13],[c2,a22,a23],[c3,a32,a33])", "description": "", "group": "Cramer determinants", "templateType": "anything"}, "matrixA": {"name": "matrixA", "definition": "matrix([a11,a12,a13],[a21,a22,a23],[a31,a32,a33])", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "c3": {"name": "c3", "definition": "a31*x1+a32*x2+a33*x3", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "a31": {"name": "a31", "definition": "random(0..100)/10", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "x3": {"name": "x3", "definition": "random(-100..100 except 0)/10", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "a11": {"name": "a11", "definition": "random(0..100)/10", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "a21": {"name": "a21", "definition": "random(0..100)/10", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "a22": {"name": "a22", "definition": "random(0..100 except(a21*a12/a11))/10", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "x1": {"name": "x1", "definition": "random(-100..100 except 0)/10", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "c1": {"name": "c1", "definition": "a11*x1+a12*x2+a13*x3", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "x2": {"name": "x2", "definition": "random(-100..100 except 0)/10", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "matrixA2": {"name": "matrixA2", "definition": "matrix([a11,c1,a13],[a21,c2,a23],[a31,c3,a33])", "description": "", "group": "Cramer determinants", "templateType": "anything"}, "a23": {"name": "a23", "definition": "random(0..100)/10", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "matrixA3": {"name": "matrixA3", "definition": "matrix([a11,a12,c1],[a21,a22,c2],[a31,a32,c3])", "description": "", "group": "Cramer determinants", "templateType": "anything"}, "a32": {"name": "a32", "definition": "random(0..100)/10", "description": "", "group": "Ungrouped variables", "templateType": "anything"}}, "advice": "

If \\[  A=\\left( \\begin{array}{ccc}
a_{11} & a_{12} & a_{13} \\\\a_{21} & a_{22} & a_{23}\\\\ a_{31} & a_{32} & a_{33}\\end{array} \\right),\\]

\n

\\[  C=\\left( \\begin{array}{ccc}
c_{1} \\\\ c_{2} \\\\c_{3} \\end{array} \\right),\\]

\n

Cramer's Rule : ${x_1}=\\frac{\\Delta_1}{\\Delta_0}$ ,  ${x_2}=\\frac{\\Delta_2}{\\Delta_0}$ , ${x_3}=\\frac{\\Delta_3}{\\Delta_0}$

\n

Where:\\[ \\Delta_0=\\left| \\begin{array}{ccc}
a_{11} & a_{12} & a_{13} \\\\a_{21} & a_{22} & a_{23}\\\\ a_{31} & a_{32} & a_{33}\\end{array} \\right|\\]

\n

\\[ \\Delta_1=\\left| \\begin{array}{ccc}
c_{1} & a_{12} & a_{13} \\\\c_{2} & a_{22} & a_{23}\\\\ c_{3} & a_{32} & a_{33}\\end{array} \\right|\\]

\n

\\[ \\Delta_2=\\left| \\begin{array}{ccc}
a_{11} & c_{1} & a_{13} \\\\a_{21} & c_{2} & a_{23}\\\\ a_{31} & c_{3} & a_{33}\\end{array} \\right|\\]

\n

\\[ \\Delta_3=\\left| \\begin{array}{ccc}
a_{11} & a_{12} & c_{1} \\\\a_{21} & a_{22} & c_{2}\\\\ a_{31} & a_{32} & c_{3}\\end{array} \\right|\\]

\n

 

\n

 

\n

 

\n

", "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["matrixA", "a11", "a12", "a21", "a22", "a13", "a23", "a31", "a32", "a33", "x1", "x2", "x3", "c1", "c2", "c3"], "parts": [{"marks": 0, "scripts": {}, "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

What is the determinant of A=$\\var{matrixA}$? i.e $\\Delta_0$

\n

[[0]]

", "type": "gapfill", "variableReplacements": [], "gaps": [{"marks": 1, "showFeedbackIcon": true, "showCorrectAnswer": true, "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "variableReplacementStrategy": "originalfirst", "minValue": "det(matrixA)", "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "maxValue": "det(matrixA)", "variableReplacements": [], "type": "numberentry", "correctAnswerFraction": false, "allowFractions": false}], "variableReplacementStrategy": "originalfirst"}, {"marks": 0, "scripts": {}, "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

Calculate $\\Delta_1$ [[0]]

\n

Hence, calculate ${x_1}$  [[1]]

", "type": "gapfill", "variableReplacements": [], "gaps": [{"marks": 1, "showFeedbackIcon": true, "showCorrectAnswer": true, "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "variableReplacementStrategy": "originalfirst", "minValue": "det(matrixA1)", "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "maxValue": "det(matrixA1)", "variableReplacements": [], "type": "numberentry", "correctAnswerFraction": false, "allowFractions": false}, {"marks": 1, "showFeedbackIcon": true, "showCorrectAnswer": true, "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "variableReplacementStrategy": "originalfirst", "minValue": "{x1}", "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "maxValue": "{x1}", "variableReplacements": [], "type": "numberentry", "correctAnswerFraction": false, "allowFractions": false}], "variableReplacementStrategy": "originalfirst"}, {"marks": 0, "scripts": {}, "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

Calculate $\\Delta_2$[[0]]

\n

Hence, calculate ${x_2}$  [[1]]

", "type": "gapfill", "variableReplacements": [], "gaps": [{"marks": 1, "showFeedbackIcon": true, "showCorrectAnswer": true, "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "variableReplacementStrategy": "originalfirst", "minValue": "det(matrixA2)", "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "maxValue": "det(matrixA2)", "variableReplacements": [], "type": "numberentry", "correctAnswerFraction": false, "allowFractions": false}, {"marks": 1, "showFeedbackIcon": true, "showCorrectAnswer": true, "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "variableReplacementStrategy": "originalfirst", "minValue": "{x2}", "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "maxValue": "{x2}", "variableReplacements": [], "type": "numberentry", "correctAnswerFraction": false, "allowFractions": false}], "variableReplacementStrategy": "originalfirst"}, {"marks": 0, "scripts": {}, "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

Calculate $\\Delta_3$[[0]]

\n

Hence, calculate ${x_3}$  [[1]]

", "type": "gapfill", "variableReplacements": [], "gaps": [{"marks": 1, "showFeedbackIcon": true, "showCorrectAnswer": true, "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "variableReplacementStrategy": "originalfirst", "minValue": "det(matrixA3)", "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "maxValue": "det(matrixA3)", "variableReplacements": [], "type": "numberentry", "correctAnswerFraction": false, "allowFractions": false}, {"marks": 1, "showFeedbackIcon": true, "showCorrectAnswer": true, "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "mustBeReduced": false, "variableReplacementStrategy": "originalfirst", "minValue": "{x3}", "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "maxValue": "{x3}", "variableReplacements": [], "type": "numberentry", "correctAnswerFraction": false, "allowFractions": false}], "variableReplacementStrategy": "originalfirst"}], "variable_groups": [{"name": "Cramer determinants", "variables": ["matrixA1", "matrixA2", "matrixA3"]}], "functions": {}, "type": "question"}]}, {"pickQuestions": 1, "pickingStrategy": "all-shuffled", "name": "Series and Progressions", "questions": [{"name": "Andrew's copy of Arithmetic progression: The nth term of a series", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "statement": "

The first three terms of a series are given by:  

\n

\\(\\var{a} + \\simplify{{a}+{d}} + \\simplify{{a}+2*{d}}\\,+ \\, ...........\\)

", "functions": {}, "variables": {"n": {"group": "Ungrouped variables", "name": "n", "definition": "random(4..19#1)", "templateType": "randrange", "description": ""}, "d": {"group": "Ungrouped variables", "name": "d", "definition": "random(2..11#1)", "templateType": "randrange", "description": ""}, "a": {"group": "Ungrouped variables", "name": "a", "definition": "random(1..12#1)", "templateType": "randrange", "description": ""}}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find the nth term of an Arithmetic progression

"}, "ungrouped_variables": ["a", "d", "n"], "advice": "

If the difference between successive pairs of terms is a constant then the series under examination is an arithmetic progression.

\n

Ths first term is \\(a\\) and the common difference is \\(d\\).

\n

The formula for the nth term of the series is given by:    \\(T_n=a+(n-1)d\\)

\n

In this example \\(a=\\var{a}\\),  \\(d = \\var{d}\\)  and  \\(n = \\var{n}\\)

\n

\\(T_\\var{n}=\\var{a}+\\simplify{{n}-1}*\\var{d}\\)

\n

\\(T_\\var{n}=\\var{a}+\\simplify{({n}-1)*{d}}\\)

\n

\\(T_\\var{n}=\\simplify{{a}+({n}-1)*{d}}\\)

", "variable_groups": [], "tags": [], "preamble": {"js": "", "css": ""}, "rulesets": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "parts": [{"marks": 0, "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "gaps": [{"strictPrecision": false, "precision": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "precisionPartialCredit": 0, "showPrecisionHint": true, "maxValue": "{a}+({n}-1)*{d}", "precisionMessage": "You have not given your answer to the correct precision.", "marks": 1, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "minValue": "{a}+({n}-1)*{d}", "precisionType": "dp", "allowFractions": false, "type": "numberentry"}], "prompt": "

Calculate the \\(\\var{n}th\\) term of the series.

\n

\\(T_\\var{n}=\\) [[0]]

", "variableReplacementStrategy": "originalfirst", "type": "gapfill"}], "type": "question"}, {"name": "Andrew's copy of Arithmetic progression: The sum of the first n terms of a series", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "advice": "

If the difference between successive pairs of terms is a constant then the series under examination is an arithmetic progression.

\n

Ths first term is \\(a\\) and the common difference is \\(d\\).

\n

The formula for the nth term of the series is given by:    \\(S_n=\\frac{n}{2}\\left(2a+(n-1)d\\right)\\)

\n

In this example \\(a=\\var{a}\\),  \\(d = \\var{d}\\)  and  \\(n = \\var{n}\\)

\n

\\(S_\\var{n}=\\frac{\\var{n}}{2}\\left(2*\\var{a}+(\\var{n}-1)\\var{d}\\right)\\)

\n

\\(S_\\var{n}=\\simplify{{n}/{2}}\\left(\\simplify{2{a}}+\\simplify{({n}-1)*{d}}\\right)\\)

\n

\\(S_\\var{n}=\\simplify{{n}/{2}}\\left(\\simplify{2{a}+({n}-1)*{d}}\\right)\\)

\n

\\(S_\\var{n}=\\simplify{{n}*{a}+{n}*({n}-1)*{d}/2}\\)

\n

", "functions": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

The first three terms of a series are given by:  

\n

\\(\\var{a} + \\simplify{{a}+{d}} + \\simplify{{a}+2*{d}}\\,+ \\, ...........\\)

", "ungrouped_variables": ["a", "d", "n"], "variables": {"n": {"definition": "random(4..19#1)", "templateType": "randrange", "name": "n", "description": "", "group": "Ungrouped variables"}, "d": {"definition": "random(2..11#1)", "templateType": "randrange", "name": "d", "description": "", "group": "Ungrouped variables"}, "a": {"definition": "random(1..12#1)", "templateType": "randrange", "name": "a", "description": "", "group": "Ungrouped variables"}}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find the sum of the first n terms of an arithmetic progression

"}, "rulesets": {}, "variable_groups": [], "tags": [], "preamble": {"js": "", "css": ""}, "parts": [{"marks": 0, "variableReplacements": [], "gaps": [{"showCorrectAnswer": true, "variableReplacements": [], "precisionType": "dp", "precisionPartialCredit": 0, "showPrecisionHint": true, "minValue": "{n}*{a}+({n}-1)*{n}*{d}/2", "marks": 1, "variableReplacementStrategy": "originalfirst", "precisionMessage": "You have not given your answer to the correct precision.", "type": "numberentry", "scripts": {}, "allowFractions": false, "correctAnswerFraction": false, "strictPrecision": false, "maxValue": "{n}*{a}+({n}-1)*{n}*{d}/2", "precision": "1"}], "type": "gapfill", "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "prompt": "

Calculate the sum of the first \\(\\var{n}\\) terms of this series.

\n

\\(S_\\var{n}=\\) [[0]]

"}], "type": "question"}, {"name": "Andrew's copy of Geometric progression: The nth term of a series", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "preamble": {"css": "", "js": ""}, "statement": "

The first three terms of a series are given by:  

\n

\\(\\var{a} + \\simplify{{a}*{r}} + \\simplify{{a}*{r}^2}\\,+ \\, ...........\\)

", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find the nth term of a Geometric progression

"}, "rulesets": {}, "variables": {"a": {"name": "a", "definition": "random(1..12#1)", "templateType": "randrange", "group": "Ungrouped variables", "description": ""}, "n": {"name": "n", "definition": "random(4..19#1)", "templateType": "randrange", "group": "Ungrouped variables", "description": ""}, "r": {"name": "r", "definition": "random(0.2..3#0.2)", "templateType": "randrange", "group": "Ungrouped variables", "description": ""}}, "advice": "

If the ratio between successive pairs of terms is a constant then the series under examination is a geometric progression.

\n

Ths first term is \\(a\\) and the common ratio is \\(r\\).

\n

The formula for the nth term of the series is given by:    \\(T_n=ar^{n-1}\\)

\n

In this example \\(a=\\var{a}\\),   \\(r = \\frac{\\simplify{{a}*{r}}}{\\var{a}}=\\var{r}\\)  and  \\(n = \\var{n}\\)

\n

\\(T_\\var{n}=\\var{a}*\\var{r}^{\\simplify{{n}-1}}\\)

\n

\\(T_\\var{n}=\\var{a}*\\simplify{{r}^{{n}-1}}\\)

\n

\\(T_\\var{n}=\\simplify{{a}*{r}^{{n}-1}}\\)

", "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "r", "n"], "functions": {}, "variable_groups": [], "tags": [], "parts": [{"marks": 0, "scripts": {}, "showCorrectAnswer": true, "prompt": "

Calculate the \\(\\var{n}th\\) term of the series.

\n

\\(T_\\var{n}=\\) [[0]]

", "type": "gapfill", "variableReplacements": [], "gaps": [{"minValue": "{a}*r^({n}-1)", "precisionPartialCredit": 0, "precisionType": "dp", "showCorrectAnswer": true, "maxValue": "{a}*r^({n}-1)", "strictPrecision": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "showPrecisionHint": true, "scripts": {}, "type": "numberentry", "precisionMessage": "You have not given your answer to the correct precision.", "precision": "1", "correctAnswerFraction": false, "allowFractions": false}], "variableReplacementStrategy": "originalfirst"}], "type": "question"}, {"name": "Andrew's copy of Solving for a geometric series", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "preamble": {"css": "", "js": ""}, "tags": [], "functions": {}, "parts": [{"marks": 0, "gaps": [{"marks": 1, "variableReplacements": [], "correctAnswerFraction": false, "minValue": "{r}", "precisionMessage": "You have not given your answer to the correct precision.", "precisionPartialCredit": 0, "maxValue": "{r}", "allowFractions": false, "precisionType": "dp", "type": "numberentry", "precision": "2", "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "showPrecisionHint": true, "strictPrecision": false}, {"marks": 1, "variableReplacements": [], "correctAnswerFraction": false, "minValue": "{a}", "precisionMessage": "You have not given your answer to the correct precision.", "precisionPartialCredit": 0, "maxValue": "{a}", "allowFractions": false, "precisionType": "dp", "type": "numberentry", "precision": "2", "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "showPrecisionHint": true, "strictPrecision": false}], "scripts": {}, "showCorrectAnswer": true, "prompt": "

Determine the value of the common ratio.    \\(r\\) = [[0]]

\n

Calculate the value of the first term.    \\(a\\) = [[1]]

", "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst"}], "rulesets": {}, "statement": "

The sum of the first \\(\\var{n}\\) terms of a geometric series is \\(\\var{s_1}\\) and the sum of the first \\(\\simplify{2*{n}}\\) terms is \\(\\var{s_2}\\).

", "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["n", "s_1", "s_2", "r", "a"], "variable_groups": [], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Solving for a geometric series

"}, "variables": {"r": {"definition": "({s_2}/{s_1}-1)^(1/{n})", "description": "", "templateType": "anything", "name": "r", "group": "Ungrouped variables"}, "n": {"definition": "random(2..6#1)", "description": "", "templateType": "randrange", "name": "n", "group": "Ungrouped variables"}, "a": {"definition": "{s_1}*(1-{r})/(1-{r}^{n})", "description": "", "templateType": "anything", "name": "a", "group": "Ungrouped variables"}, "s_2": {"definition": "random(36..50#1)", "description": "", "templateType": "randrange", "name": "s_2", "group": "Ungrouped variables"}, "s_1": {"definition": "random(12..36#1)", "description": "", "templateType": "randrange", "name": "s_1", "group": "Ungrouped variables"}}, "advice": "

\\(S_{\\var{n}}=\\frac{a(1-r^{\\var{n}})}{1-r}=\\var{s_1}\\)

\n

\\(S_{\\simplify{2*{n}}}=\\frac{a(1-r^{\\simplify{2*{n}}})}{1-r}=\\var{s_2}\\)

\n

If we divide one by the other we get:

\n

\\(\\frac{S_{\\simplify{2*{n}}}}{S_{\\var{n}}}=\\frac{\\frac{a(1-r^{\\simplify{2*{n}}})}{1-r}}{\\frac{a(1-r^{\\var{n}})}{1-r}}=\\frac{\\var{s_2}}{\\var{s_1}}\\)

\n

\\(\\frac{S_{\\simplify{2*{n}}}}{S_{\\var{n}}}=\\frac{a(1-r^{\\simplify{2*{n}}})}{1-r}*\\frac{1-r}{a(1-r^{\\var{n}})}=\\frac{\\var{s_2}}{\\var{s_1}}\\)

\n

\\(\\frac{1-r^{\\simplify{2*{n}}}}{1-r^{\\var{n}}}=\\frac{\\var{s_2}}{\\var{s_1}}\\)

\n

\\(\\frac{(1-r^\\var{n})(1+r^{\\var{n}})}{1-r^{\\var{n}}}=\\frac{\\var{s_2}}{\\var{s_1}}\\)

\n

\\(1+r^{\\var{n}}=\\frac{\\var{s_2}}{\\var{s_1}}\\)

\n

\\(r^{\\var{n}}=\\frac{\\var{s_2}}{\\var{s_1}}-1\\)

\n

\\(r^{\\var{n}}=\\simplify{{s_2}/{s_1}-1}\\)

\n

\\(r=\\simplify{(({s_2})/{s_1}-1)^{1/{n}}}\\)

\n

\\(r=\\simplify{(({s_2}-{s_1})/{s_1})^{1/{n}}}=\\var{r}\\)

\n

Recall \\(S_{\\var{n}}=\\frac{a(1-r^{\\var{n}})}{1-r}=\\var{s_1}\\)

\n

\\(a=\\frac{\\var{s_1}*(1-{r})}{1-r^{\\var{n}}}\\)

\n

Inserting the value for \\(r\\) in this equation gives

\n

\\(a=\\frac{\\var{s_1}*(\\simplify{(1-{r})})}{\\simplify{{1-r^{{n}}}}}\\)

\n

\\(a=\\var{a}\\)

\n

", "type": "question"}]}, {"pickQuestions": 1, "pickingStrategy": "all-ordered", "name": "Set Theory", "questions": [{"name": "Andrew's copy of Union, complement, intersection v2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "advice": "", "functions": {"mod_set": {"definition": "//returns all integers which are divisible by c betweeen a and b\nvar l=[];\nfor(var i=a;iIn this question, the universal set is  $\\mathcal{U}=\\{x \\in \\mathbb{N}\\; | \\;x \\leq \\var{a}\\}$.

\n

Let:

\n

$A=\\{x \\in \\mathbb{N}\\;|\\;\\var{b}\\leq x \\leq \\var{c}\\}$.

\n

$B=\\{x \\in \\mathbb{N}\\;|\\;x \\gt \\var{d}\\}$.

\n

$C=\\{ x \\in \\mathbb{N}\\;|\\; x \\text{ divisible by } \\var{f}\\}$.

\n

\n

", "ungrouped_variables": ["a", "b", "c", "d", "f", "universal", "set1", "set2", "set3"], "variables": {"set1": {"definition": "set(b..c)", "description": "", "name": "set1", "templateType": "anything", "group": "Ungrouped variables"}, "set2": {"definition": "set(d+1..a)", "description": "", "name": "set2", "templateType": "anything", "group": "Ungrouped variables"}, "d": {"definition": "random(5..c-1)", "description": "", "name": "d", "templateType": "anything", "group": "Ungrouped variables"}, "universal": {"definition": "set(0..a)", "description": "", "name": "universal", "templateType": "anything", "group": "Ungrouped variables"}, "b": {"definition": "random(3..8)", "description": "", "name": "b", "templateType": "anything", "group": "Ungrouped variables"}, "f": {"definition": "random(2,3,5,6)", "description": "", "name": "f", "templateType": "anything", "group": "Ungrouped variables"}, "set3": {"definition": "set(mod_set(0,a,f))", "description": "", "name": "set3", "templateType": "anything", "group": "Ungrouped variables"}, "a": {"definition": "random(15..30)", "description": "", "name": "a", "templateType": "anything", "group": "Ungrouped variables"}, "c": {"definition": "b+random(10..a-b)", "description": "", "name": "c", "templateType": "anything", "group": "Ungrouped variables"}}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Given some random finite subsets of the natural numbers, perform set operations $\\cap,\\;\\cup$ and complement.

"}, "rulesets": {}, "variable_groups": [], "tags": [], "preamble": {"js": "", "css": ""}, "parts": [{"marks": 0, "variableReplacementStrategy": "originalfirst", "gaps": [{"checkvariablenames": false, "showCorrectAnswer": false, "showFeedbackIcon": true, "checkingaccuracy": 0.001, "marks": 1, "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetrange": [0, 1], "variableReplacements": [], "vsetrangepoints": 5, "checkingtype": "absdiff", "scripts": {}, "showpreview": true, "answer": "{set1 or set3}", "expectedvariablenames": []}, {"checkvariablenames": false, "showCorrectAnswer": false, "showFeedbackIcon": true, "checkingaccuracy": 0.001, "marks": "2", "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetrange": [0, 1], "variableReplacements": [], "vsetrangepoints": 5, "checkingtype": "absdiff", "scripts": {}, "showpreview": true, "answer": "{(universal - set2) and set3}", "expectedvariablenames": []}, {"checkvariablenames": false, "showCorrectAnswer": false, "showFeedbackIcon": true, "checkingaccuracy": 0.001, "marks": "2", "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetrange": [0, 1], "variableReplacements": [], "vsetrangepoints": 5, "checkingtype": "absdiff", "scripts": {}, "showpreview": true, "answer": "{set1 or (universal-set2)}", "expectedvariablenames": []}, {"checkvariablenames": false, "showCorrectAnswer": false, "showFeedbackIcon": true, "checkingaccuracy": 0.001, "marks": "1", "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetrange": [0, 1], "variableReplacements": [], "vsetrangepoints": 5, "checkingtype": "absdiff", "scripts": {}, "showpreview": true, "answer": "{(set1 and set2) or set3}", "expectedvariablenames": []}], "showFeedbackIcon": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "prompt": "

Enumerate the following sets:

\n

a) $A \\cup C=\\;$[[0]]

\n

b) $\\overline{B} \\cap C=\\;$[[1]]

\n

c) $A \\cup \\overline{B}=\\;$[[2]]

\n

d) $(A \\cap B) \\cup C=\\;$[[3]]

\n

\n

Note that you input sets in the form set(a,b,c,..,z) .

\n

For example set(1,2,3)gives the set $\\{1,2,3\\}$.

\n

The empty set is input as set().

\n

It is safest to list all of the elements explicitly.

\n

", "type": "gapfill"}], "type": "question"}, {"name": "Andrew's copy of Set theory: Union and Intersection", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "preamble": {"css": "", "js": ""}, "statement": "

Let:

\n

$A=\\{x \\in \\mathbb{N}\\;|\\;\\var{b}\\leq x \\leq \\var{c}\\}$.

\n

$B=\\{x \\in \\mathbb{N}\\;|\\;x \\gt \\var{d}\\}$.

\n

$C=\\{ x \\in \\mathbb{N}\\;|\\; x \\text{ divisible by } \\var{f}\\}$.

\n

\n

", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Given some random finite subsets of the natural numbers, perform set operations $\\cap,\\;\\cup$ and complement.

"}, "rulesets": {}, "variables": {"d": {"name": "d", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(5..c-1)", "description": ""}, "c": {"name": "c", "group": "Ungrouped variables", "templateType": "anything", "definition": "b+random(10..a-b)", "description": ""}, "set2": {"name": "set2", "group": "Ungrouped variables", "templateType": "anything", "definition": "set(d+1..a)", "description": ""}, "a": {"name": "a", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(15..30)", "description": ""}, "f": {"name": "f", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(2,3,5,6)", "description": ""}, "set1": {"name": "set1", "group": "Ungrouped variables", "templateType": "anything", "definition": "set(b..c)", "description": ""}, "set3": {"name": "set3", "group": "Ungrouped variables", "templateType": "anything", "definition": "set(mod_set(0,a,f))", "description": ""}, "universal": {"name": "universal", "group": "Ungrouped variables", "templateType": "anything", "definition": "set(0..a)", "description": ""}, "b": {"name": "b", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(3..8)", "description": ""}}, "advice": "", "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "d", "f", "universal", "set1", "set2", "set3"], "functions": {"mod_set": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"]], "type": "list", "definition": "//returns all integers which are divisible by c betweeen a and b\nvar l=[];\nfor(var i=a;iEnumerate the following sets:

\n

a) $A \\cup C=\\;$[[0]]

\n

b) $\\overline{B} \\cap C=\\;$[[1]]

\n

c) $A \\cup \\overline{B}=\\;$[[2]]

\n

d) $(A \\cap B) \\cup C=\\;$[[3]]

\n

\n

Note that you input sets in the form set(a,b,c,..,z) .

\n

For example set(1,2,3)gives the set $\\{1,2,3\\}$.

\n

The empty set is input as set().

\n

It is safest to list all of the elements explicitly.

\n

", "type": "gapfill", "variableReplacements": [], "gaps": [{"showFeedbackIcon": true, "checkingaccuracy": 0.001, "showCorrectAnswer": false, "expectedvariablenames": [], "variableReplacements": [], "checkvariablenames": false, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "marks": "2", "scripts": {}, "showpreview": true, "vsetrange": [0, 1], "answer": "{set1 or set3}", "type": "jme", "vsetrangepoints": 5}, {"showFeedbackIcon": true, "checkingaccuracy": 0.001, "showCorrectAnswer": false, "expectedvariablenames": [], "variableReplacements": [], "checkvariablenames": false, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "marks": "3", "scripts": {}, "showpreview": true, "vsetrange": [0, 1], "answer": "{(universal - set2) and set3}", "type": "jme", "vsetrangepoints": 5}, {"showFeedbackIcon": true, "checkingaccuracy": 0.001, "showCorrectAnswer": false, "expectedvariablenames": [], "variableReplacements": [], "checkvariablenames": false, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "marks": "3", "scripts": {}, "showpreview": true, "vsetrange": [0, 1], "answer": "{set1 or (universal-set2)}", "type": "jme", "vsetrangepoints": 5}, {"showFeedbackIcon": true, "checkingaccuracy": 0.001, "showCorrectAnswer": false, "expectedvariablenames": [], "variableReplacements": [], "checkvariablenames": false, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "marks": "2", "scripts": {}, "showpreview": true, "vsetrange": [0, 1], "answer": "{(set1 and set2) or set3}", "type": "jme", "vsetrangepoints": 5}], "variableReplacementStrategy": "originalfirst"}], "type": "question"}, {"name": "Andrew's copy of java", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "showQuestionGroupNames": false, "preamble": {"css": "", "js": ""}, "functions": {"mod_set": {"definition": "//returns all integers which are divisible by c betweeen a and b\nvar l=[];\nfor(var i=a;iEnumerate the following sets:

\n

a) $A \\cap B=\\;$[[0]]

\n

b) $B \\cap C=\\;$[[1]]

\n

c) $A \\cap \\overline{C}=\\;$[[2]]

\n

d) $(\\overline{A} \\cup C) \\cap B=\\;$[[3]]

\n

e) $\\overline{A \\cup C} \\cap \\overline{B}=\\;$[[4]]

\n

f) $(A \\cup \\overline{B}) \\cap C=\\;$[[5]]

\n

\n

Note that you input sets in the form set(a,b,c,..,z) .

\n

For example set(1,2,3)gives the set $\\{1,2,3\\}$.

\n

The empty set is input as set().

\n

Also some labour saving tips:

\n

If you want to input all integers between $a$ and $b$ inclusive then instead of writing all the elements you can input this as set(a..b).

\n

If you want to input all integers between $a$ and $b$ inclusive in steps of $c$ then this is input as set(a..b#c). So all odd integers from $-3$ to $28$ are input as set(-3..28#2).

", "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst"}], "rulesets": {}, "statement": "

In this question, the universal set is  $\\mathcal{U}=\\{x \\in \\mathbb{N}\\; | \\;x \\leq \\var{a}\\}$.

\n

Let:

\n

$A=\\{x \\in \\mathbb{N}\\;|\\;\\var{b}\\leq x \\leq \\var{c}\\}$.

\n

$B=\\{x \\in \\mathbb{N}\\;|\\;x \\gt \\var{d}\\}$.

\n

$C=\\{ x \\in \\mathbb{N}\\;|\\; x \\text{ divisible by } \\var{f}\\}$.

\n

\n

", "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "d", "f", "universal", "set1", "set2", "set3"], "type": "question", "tags": ["complement", "elements", "intersection", "predicates", "set operations", "sets", "subsets", "union"], "variable_groups": [], "question_groups": [{"pickQuestions": 0, "pickingStrategy": "all-ordered", "name": "", "questions": []}], "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Given some random finite subsets of the natural numbers, perform set operations $\\cap,\\;\\cup$ and complement.

"}, "variables": {"c": {"definition": "b+random(10..a-b)", "description": "", "templateType": "anything", "name": "c", "group": "Ungrouped variables"}, "f": {"definition": "random(2,3,5,6)", "description": "", "templateType": "anything", "name": "f", "group": "Ungrouped variables"}, "set2": {"definition": "set(d+1..a)", "description": "", "templateType": "anything", "name": "set2", "group": "Ungrouped variables"}, "d": {"definition": "random(5..c-1)", "description": "", "templateType": "anything", "name": "d", "group": "Ungrouped variables"}, "b": {"definition": "random(3..8)", "description": "", "templateType": "anything", "name": "b", "group": "Ungrouped variables"}, "universal": {"definition": "set(1..a)", "description": "", "templateType": "anything", "name": "universal", "group": "Ungrouped variables"}, "a": {"definition": "random(15..30)", "description": "", "templateType": "anything", "name": "a", "group": "Ungrouped variables"}, "set3": {"definition": "set(mod_set(1,a,f))", "description": "", "templateType": "anything", "name": "set3", "group": "Ungrouped variables"}, "set1": {"definition": "set(b..c)", "description": "", "templateType": "anything", "name": "set1", "group": "Ungrouped variables"}}, "advice": ""}, {"name": "Andrew's copy of Sets 2-4", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "preamble": {"css": "", "js": ""}, "tags": [], "functions": {"mod_set": {"definition": "//returns all integers which are divisible by c betweeen a and b\nvar l=[];\nfor(var i=a;ia) $A=\\{x \\in \\mathbb{N}\\;|\\;\\var{a} \\leq x \\leq \\var{b}\\text{ and } x \\text{ is divisible by }\\var{c}\\}$.

\n

$A=\\;$[[0]]

\n

b) $B=\\{x \\in \\mathbb{Z}\\;|\\;\\var{d} \\leq x \\leq \\var{f}\\text{ and } x^2 \\lt \\var{g}\\}$.

\n

$B=\\;$[[1]]

\n

c) $C=\\{x \\in \\mathbb{Z}\\;|\\;\\var{d} \\leq x \\leq \\var{f}\\text{ and } x^2 \\gt \\var{g}\\}$.

\n

$C=\\;$[[2]]

\n

d) $A \\cap C=\\;$[[3]]

\n

\n

Note that you input sets in the form set(a,b,c,..,z) .

\n

For example set(1,2,3)gives the set $\\{1,2,3\\}$.

\n

The empty set is input as set().

\n

Also some labour saving tips:

\n

If you want to input all integers between $a$ and $b$ inclusive then instead of writing all the elements you can input this as set(a..b).

\n

If you want to input all integers between $a$ and $b$ inclusive in steps of $c$ then this is input as set(a..b#c). So all odd integers from $-3$ to $28$ are input as set(-3..28#2).

", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0}], "rulesets": {}, "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "answer_set1", "d", "f", "g", "answer_set2", "r", "answer_set3", "answer_set4"], "statement": "

Write the following sets in enumerated form.

\n

Note that you enter an enumerated set such as $\\{35,67,99\\}$ as set(35,67,99).

\n

", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variables": {"c": {"definition": "random(3..7)", "templateType": "anything", "description": "", "name": "c", "group": "Ungrouped variables"}, "f": {"definition": "random(10..25)", "templateType": "anything", "description": "", "name": "f", "group": "Ungrouped variables"}, "answer_set2": {"definition": "set(-r+1..r-1)and set(d..f)", "templateType": "anything", "description": "", "name": "answer_set2", "group": "Ungrouped variables"}, "answer_set4": {"definition": "answer_set1 and answer_set3", "templateType": "anything", "description": "", "name": "answer_set4", "group": "Ungrouped variables"}, "d": {"definition": "random(-25..-5)", "templateType": "anything", "description": "", "name": "d", "group": "Ungrouped variables"}, "answer_set1": {"definition": "set(mod_set(a,b,c))", "templateType": "anything", "description": "", "name": "answer_set1", "group": "Ungrouped variables"}, "b": {"definition": "a+random(12..30)", "templateType": "anything", "description": "", "name": "b", "group": "Ungrouped variables"}, "r": {"definition": "random(8..15)", "templateType": "anything", "description": "", "name": "r", "group": "Ungrouped variables"}, "answer_set3": {"definition": "set(d..f) and(set(d-1..-r-1) or set(r+1..f+1))", "templateType": "anything", "description": "", "name": "answer_set3", "group": "Ungrouped variables"}, "a": {"definition": "random(8..20)", "templateType": "anything", "description": "", "name": "a", "group": "Ungrouped variables"}, "g": {"definition": "r^2", "templateType": "anything", "description": "", "name": "g", "group": "Ungrouped variables"}}, "advice": "", "type": "question"}]}], "metadata": {"licence": "Creative Commons Attribution-NonCommercial 4.0 International", "description": "

TCICC Semester 3

\n

Provo Campus

\n

2016 - 2017

\n

Course Work Paper 2

"}, "showstudentname": true, "name": "MTH2118 -Coursework Exam", "type": "exam", "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}], "extensions": [], "custom_part_types": [], "resources": []}