// Numbas version: exam_results_page_options {"name": "APEP Maths Practice Test", "metadata": {"description": "
No time limit - unlimited regeneration of questions allowed from these groups:
\nMobius - ENG
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Four students spent {x1}, {x2}, {x3} and {x4} pounds on train tickets last month.
\nLet $y$ denote last month's train ticket expenses for a student.
", "advice": "The symbol $\\Sigma$ means 'sum of' or 'total'.
\n\n\n", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"x2": {"name": "x2", "group": "Ungrouped variables", "definition": "random(1 .. 10#1)", "description": "", "templateType": "randrange", "can_override": false}, "x3": {"name": "x3", "group": "Ungrouped variables", "definition": "random(10 .. 15#1)", "description": "", "templateType": "randrange", "can_override": false}, "x1": {"name": "x1", "group": "Ungrouped variables", "definition": "random(1 .. 5#1)", "description": "", "templateType": "randrange", "can_override": false}, "x4": {"name": "x4", "group": "Ungrouped variables", "definition": "random(15 .. 20#1)", "description": "", "templateType": "randrange", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["x2", "x3", "x1", "x4"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Find $\\sum y = $ [[0]]
\n", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Remember that
\n$\\sum y = $ means the total of the values
\n"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{x1}+{x2}+{x3}+{x4}", "maxValue": "{x1}+{x2}+{x3}+{x4}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Find $(\\sum y)^2 = $ [[0]]
\n", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "$(\\sum y)^2 = $ means the square of the total of the values
\n"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "({x1}+{x2}+{x3}+{x4})^2", "maxValue": "({x1}+{x2}+{x3}+{x4})^2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Find
\n$\\sum y^2 = $ [[0]]
", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "$\\sum y^2 = $ means the total of the squares of the values
"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{x1}^2+{x2}^2+{x3}^2+{x4}^2", "maxValue": "{x1}^2+{x2}^2+{x3}^2+{x4}^2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "A1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}], "tags": [], "metadata": {"description": "Solve a simple linear equation algebraically. The unknown appears on both sides of the equation.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "We are asked to solve the equation
\n\\[ \\var{d}x-\\var{f}=\\var{g}x+\\var{h} \\]
\nIn this equation, there are $x$ terms and constant terms on both sides of the equals sign.
\nTo solve this equation, we must rearrange it to get $x$ on its own.
\n\\begin{align}
\\var{d}x-\\var{f} &= \\var{g}x+\\var{h} \\\\[0.5em]
\\var{d}x-\\var{g}x &= \\var{h}+\\var{f} & \\text{Move } x \\text{ terms to the left, and constant terms to the right.}\\\\[0.5em]
\\simplify{{d-g}*x} &= {\\var{h+f}} & \\text{Collect like terms together.}\\\\[0.5em]
x &=\\frac{\\var{h+f}}{\\var{d-g}} & \\text{Divide both sides by } \\var{d-g} \\text{.} \\\\[0.5em]
x &= \\simplify{{h+f}/{d-g}}
\\end{align}
$\\var{d}x-\\var{f}=\\var{g}x+\\var{h}$
\nWhat is the value of $x$?
\n$x = $ [[0]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "finalb", "maxValue": "finalb", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "A2", "extensions": [], "custom_part_types": [{"source": {"pk": 2, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/2/edit"}, "name": "List of numbers", "short_name": "list-of-numbers", "description": "The answer is a comma-separated list of numbers.
\nThe list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.
\nYou can optionally treat the answer as a set, so the number of occurrences doesn't matter, only whether each number is included or not.
", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n settings[\"separator\"] + \" \"\n)", "hint": {"static": false, "value": "if(settings[\"show_input_hint\"],\n \"Enter a list of numbers separated by{settings['separator']}
.\",\n \"\"\n)"}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "bits:\nlet(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)\n\nexpected_numbers:\nlet(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)\n\nvalid_numbers:\nif(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )\n\nis_sorted:\nassert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )\n\nincluded:\nmap(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentIs every number in the student's list valid?
", "definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )"}, {"name": "is_sorted", "description": "Are the student's answers in ascending order?
", "definition": "assert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )"}, {"name": "included", "description": "Is each number in the expected answer present in the student's list the correct number of times?
", "definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentTrue if the student's list doesn't contain any numbers that aren't in the expected answer.
", "definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(\"Your answer contains \"+extra_numbers[0]+\" but should not.\");\n false\n )"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "if(lower(studentAnswer) in [\"empty\",\"\u2205\"],[],\n map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n )\n)"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)"}, {"name": "notationStyles", "description": "", "definition": "[\"en\"]"}, {"name": "isSet", "description": "Should the answer be considered as a set, so the number of times an element occurs doesn't matter?
", "definition": "settings[\"isSet\"]"}, {"name": "extra_numbers", "description": "Numbers included in the student's answer that are not in the expected list.
", "definition": "filter(not (x in expected_numbers),x,interpreted_answer)"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The list of numbers that the student should enter. The order does not matter.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "allowFractions", "label": "Allow the student to enter fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "correctAnswerFractions", "label": "Display the correct answers as fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "isSet", "label": "Is the answer a set?", "help_url": "", "hint": "If ticked, the number of times an element occurs doesn't matter, only whether it's included at all.", "input_type": "checkbox", "default_value": false}, {"name": "show_input_hint", "label": "Show the input hint?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": true}, {"name": "separator", "label": "Separator", "help_url": "", "hint": "The substring that should separate items in the student's list", "input_type": "string", "default_value": ",", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}], "tags": [], "metadata": {"description": "Some quadratics are to be solved by factorising
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Solve the quadratic equation by factorising. Use fractions and integers instead od decimals for answers wherever possible.
\nFor parts b, If there is more than solution, enter them all separated by a comma.
", "advice": "", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"d": {"name": "d", "group": "Ungrouped variables", "definition": "map(num[j][3],j,0..4)", "description": "", "templateType": "anything", "can_override": false}, "solmin": {"name": "solmin", "group": "Ungrouped variables", "definition": "vector([min(-d[0]/c[0],-b[0]/a[0])]+[min(-d[1]/c[1],-b[1]/a[1])]+[min(-d[2]/c[2],-b[2]/a[2])]+[min(-d[3]/c[3],-b[3]/a[3])]+[min(-d[4]/c[4],-b[4]/a[4])])", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "map(num[j][1],j,0..4)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "map(num[j][2],j,0..4)", "description": "", "templateType": "anything", "can_override": false}, "solmax": {"name": "solmax", "group": "Ungrouped variables", "definition": "vector([max(-d[0]/c[0],-b[0]/a[0])]+[max(-d[1]/c[1],-b[1]/a[1])]+[max(-d[2]/c[2],-b[2]/a[2])]+[max(-d[3]/c[3],-b[3]/a[3])]+[max(-d[4]/c[4],-b[4]/a[4])])", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "map(num[j][0],j,0..4)", "description": "", "templateType": "anything", "can_override": false}, "num": {"name": "num", "group": "Ungrouped variables", "definition": "[[1,random(6..7),1,random(2..5)]] +\nshuffle([\n [1,random(-4..-6),1,random(-3..3 except 0)],\n [1,random(-4..-6),random(2..3),random(-1..1 except 0)],\n [1,random(1,3,5),4,random(1,3,5)*random([1,-1])],\n [1,random(-4..-6),3,random([-1,1,-2,2])]\n ])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["num", "a", "b", "c", "d", "solmax", "solmin"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Factorise $\\simplify{{a[1]*c[1]}x^2+{a[1]*d[1]+b[1]*c[1]}x+ {b[1]*d[1]}}$. [[0]]
\n", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "examples
\n$x^2$ + 5$x$ + 6 = ($x$ + 2) ($x$ + 3)
\n3$x^2$ + $x$ - 10 = (3$x$ - 5) ($x$ + 2)
\n"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({a[1]}x+{b[1]})({c[1]}x+{d[1]})", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "musthave": {"strings": [")("], "showStrings": false, "partialCredit": 0, "message": ""}, "notallowed": {"strings": ["x^2", "x*x", "x x", "x(", "x*("], "showStrings": false, "partialCredit": 0, "message": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Hence solve $\\simplify{{a[1]*c[1]}x^2+{a[1]*d[1]+b[1]*c[1]}x+ {b[1]*d[1]}}=0$.
\n[[0]]
", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "example
\n$x^2$ + 5$x$ + 6 = 0
\n($x$ + 2) ($x$ + 3) = 0
\n($x$ +2) = 0 , so $x$ = -2
\n($x$ + 3) = 0 , so $x$ = -3
\nenter this as -2,-3 or -3,-2
"}], "gaps": [{"type": "list-of-numbers", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "[solmin[1],solmax[1]]", "allowFractions": true, "correctAnswerFractions": true, "isSet": false, "show_input_hint": true, "separator": ","}}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "A3", "extensions": [], "custom_part_types": [{"source": {"pk": 2, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/2/edit"}, "name": "List of numbers", "short_name": "list-of-numbers", "description": "The answer is a comma-separated list of numbers.
\nThe list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.
\nYou can optionally treat the answer as a set, so the number of occurrences doesn't matter, only whether each number is included or not.
", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n settings[\"separator\"] + \" \"\n)", "hint": {"static": false, "value": "if(settings[\"show_input_hint\"],\n \"Enter a list of numbers separated by{settings['separator']}
.\",\n \"\"\n)"}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "bits:\nlet(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)\n\nexpected_numbers:\nlet(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)\n\nvalid_numbers:\nif(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )\n\nis_sorted:\nassert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )\n\nincluded:\nmap(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentIs every number in the student's list valid?
", "definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )"}, {"name": "is_sorted", "description": "Are the student's answers in ascending order?
", "definition": "assert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )"}, {"name": "included", "description": "Is each number in the expected answer present in the student's list the correct number of times?
", "definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentTrue if the student's list doesn't contain any numbers that aren't in the expected answer.
", "definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(\"Your answer contains \"+extra_numbers[0]+\" but should not.\");\n false\n )"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "if(lower(studentAnswer) in [\"empty\",\"\u2205\"],[],\n map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n )\n)"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)"}, {"name": "notationStyles", "description": "", "definition": "[\"en\"]"}, {"name": "isSet", "description": "Should the answer be considered as a set, so the number of times an element occurs doesn't matter?
", "definition": "settings[\"isSet\"]"}, {"name": "extra_numbers", "description": "Numbers included in the student's answer that are not in the expected list.
", "definition": "filter(not (x in expected_numbers),x,interpreted_answer)"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The list of numbers that the student should enter. The order does not matter.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "allowFractions", "label": "Allow the student to enter fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "correctAnswerFractions", "label": "Display the correct answers as fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "isSet", "label": "Is the answer a set?", "help_url": "", "hint": "If ticked, the number of times an element occurs doesn't matter, only whether it's included at all.", "input_type": "checkbox", "default_value": false}, {"name": "show_input_hint", "label": "Show the input hint?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": true}, {"name": "separator", "label": "Separator", "help_url": "", "hint": "The substring that should separate items in the student's list", "input_type": "string", "default_value": ",", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}], "tags": [], "metadata": {"description": "A few quadratic equations are given, to be solved by completing the square. The number of solutions is randomised.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Solve the quadratic equation by completing the square. If there is more than one solution, enter all the solutions separated by a comma.
\n------------------------------------
", "advice": "See 5.1 and 5.2 for examples and background on solving by completing the square
\nSee 3.3 for examples of completing the square
", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "vector([random(1..5)]+[random(-1..-5)]+[random(-1..-5)]+[random(-1..-5)]+[random(1..5)])", "description": "", "templateType": "anything", "can_override": false}, "xmax": {"name": "xmax", "group": "Ungrouped variables", "definition": "vector([-a[0]]+[-a[0]]+[-a[0]]+[-a[0]]+[-a[1]]+[-a[1]]+[-a[1]]+[-a[1]])+shift", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "vector([random(-10..25)] + [random(-10..25)] + [random(-10..25)] + [random(-10..25)] + [random(-10..25)] )", "description": "", "templateType": "anything", "can_override": false}, "xmin": {"name": "xmin", "group": "Ungrouped variables", "definition": "vector([-a[0]]+[-a[0]]+[-a[0]]+[-a[0]]+[-a[1]]+[-a[1]]+[-a[1]]+[-a[1]])-shift", "description": "", "templateType": "anything", "can_override": false}, "fx": {"name": "fx", "group": "Ungrouped variables", "definition": "vector([(xmax[0]+a[0])^2+b[0]]+[(xmax[1]+a[0])^2+b[0]]+[(xmax[2]+a[0])^2+b[0]]+[(xmax[3]+a[0])^2+b[0]]+[(xmax[4]+a[1])^2+b[1]]+[(xmax[5]+a[1])^2+b[1]]+[(xmax[6]+a[1])^2+b[1]]+[(xmax[7]+a[1])^2+b[1]])", "description": "", "templateType": "anything", "can_override": false}, "shift": {"name": "shift", "group": "Ungrouped variables", "definition": "vector(shuffle(1..9#4)+[0]+shuffle(1..9#4)+[0])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "shift", "xmin", "xmax", "fx"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Complete the square on $\\simplify{x^2+{2*a[0]}x+ {a[0]^2+b[0]}}$ [[0]]
\nHence solve $\\simplify{x^2+{2*a[0]}x+ {a[0]^2+b[0]}} = \\var{fx[0]}$ [[1]]
\nAlso solve $\\simplify{x^2+{2*a[0]}x+ {a[0]^2+b[0]}} = \\var{fx[3]}$ [[2]]
", "stepsPenalty": "2", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "completing the square:
\n--------------------------------------------------------
\nsolving examples:
\n$x^2 -6x+8=0$ so $(x-3)^2-3^2+8 =0$
\n$(x-3)^2-1 =0$
\n$(x-3)^2=1$
\n$(x-3) =+/- 1$
\n$x=+1+3$ , $x=-1+3$
\n$x=4$ , $x=2$
\n---------------------------------------------------------
\n$x^2 -6x+8=15$ so $(x-3)^2-3^2+8 =15$
\n$(x-3)^2-1 =15$
\n$(x-3)^2=16$
\n$(x-3) =+/- 4$
\n$x=+4+3$ , $x=-4+3$
\n$x=7$ , $x=-1$
"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "(x+{a[0]})^2+{b[0]}", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "musthave": {"strings": ["(", ")", "^"], "showStrings": false, "partialCredit": 0, "message": "please input in the form $(x+a)^2+b$
"}, "notallowed": {"strings": ["x^2", "x*x", "x x", "x(", "x*("], "showStrings": false, "partialCredit": 0, "message": "Input your answer in the form $(x+a)^2+b$.
"}, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "list-of-numbers", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "[xmin[0],xmax[0]]", "allowFractions": true, "correctAnswerFractions": true, "isSet": false}}, {"type": "list-of-numbers", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "[xmin[3]]", "allowFractions": true, "correctAnswerFractions": true, "isSet": false}}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "A4", "extensions": [], "custom_part_types": [], "resources": [["question-resources/A5_example.JPG", "/srv/numbas/media/question-resources/A5_example.JPG"], ["question-resources/mathcentre_CC.JPG", "/srv/numbas/media/question-resources/mathcentre_CC.JPG"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}], "tags": [], "metadata": {"description": "Solve for $x$ and $y$: \\[ \\begin{eqnarray} a_1x+b_1y&=&c_1\\\\ a_2x+b_2y&=&c_2 \\end{eqnarray} \\]
\n", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Solve the following simultaneous equations for $x$ and $y$.
\nNote, You must input your answers as fractions or integers, not as decimals.
", "advice": "\n\t\\[ \\begin{eqnarray} \\simplify[std]{{a}x+{b}y}&=&\\var{c}&\\mbox{ ........(1)}\\\\ \\simplify[std]{{a1}x+{b1}y}&=&\\var{c1}&\\mbox{ ........(2)} \\end{eqnarray} \\]
To get a solution for $x$ multiply equation (1) by {this} and equation (2) by {that}
This gives:
\\[ \\begin{eqnarray} \\simplify[std]{{a*this}x+{b*this}y}&=&\\var{this*c}&\\mbox{ ........(3)}\\\\ \\simplify[std]{{a1*that}x+{b1*that}y}&=&\\var{that*c1}&\\mbox{ ........(4)} \\end{eqnarray} \\]
Now {aort} (4) {fromorto} equation (3) to get
\\[\\simplify[std]{({a*this}+{s6*a1*that})x={this*c}+{s6*that*c1}}\\]
And so we get the solution for $x$:
\\[x = \\simplify{{c*b1-b*c1}/{b1*a-a1*b}}\\]
Substituting this value into any of the equations (1) and (2) gives:
\\[y = \\simplify{{c*a1-a*c1}/{b*a1-a*b1}}\\]
You can check that these solutions are correct by seeing if they satisfy both equations (1) and (2) by substituting these values into the equations.
\\[ \\begin{eqnarray} \\simplify[std]{{a}x+{b}y}&=&\\var{c}\\\\ \\simplify[std]{{a1}x+{b1}y}&=&\\var{c1} \\end{eqnarray} \\]
\n$x=\\phantom{{}}$[[0]], $y=\\phantom{{}}$[[1]]
\nRemember to input your answers as fractions or integers, not as decimals.
\n", "stepsPenalty": "2", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "HINT:
Input as a fraction or an integer not as a decimal
"}, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 2, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{c*a1-a*c1}/{b*a1-a*b1}", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "Input as a fraction or an integer not as a decimal
"}, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "A5", "extensions": ["geogebra", "jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}, {"name": "Nick Walker", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2416/"}, {"name": "Thomas Waters", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3649/"}], "tags": [], "metadata": {"description": "A graph (of a cubic) is given. The question is to determine the number of roots and number of stationary points the graph has. Non-calculator. Advice is given.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"num_roots": {"name": "num_roots", "group": "Ungrouped variables", "definition": "if(num_stat = 2, random(1..3), 1)", "description": "The number of roots.
", "templateType": "anything", "can_override": false}, "vshift": {"name": "vshift", "group": "Ungrouped variables", "definition": "random(-2..2)", "description": "Random amount of vertifical shift for sake of variability.
", "templateType": "anything", "can_override": false}, "num_stat": {"name": "num_stat", "group": "Ungrouped variables", "definition": "random(0..2)", "description": "Number of stationary points
", "templateType": "anything", "can_override": false}, "hshift": {"name": "hshift", "group": "Ungrouped variables", "definition": "random(-2..2)", "description": "Random amount of horizontal shift to create variability.
", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-1..1 except 0)", "description": "Coefficient of x^3
", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["num_roots", "num_stat", "a", "hshift", "vshift"], "variable_groups": [], "functions": {"plotgraph": {"parameters": [["num_stat", "number"], ["num_roots", "number"], ["a", "number"], ["h", "number"], ["v", "number"]], "type": "html", "language": "javascript", "definition": "// This functions plots a cubic with a certain number of\n// stationary points and roots.\n// It creates the board, sets it up, then returns an\n// HTML div tag containing the board.\n\n\n// Max and min x and y values for the axis.\nvar x_min = -6;\nvar x_max = 6;\nvar y_min = -10;\nvar y_max = 10;\n\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '500px',\n '600px',\n {\n boundingBox: [x_min,y_max,x_max,y_min],\n axis: false,\n showNavigation: true,\n grid: true\n }\n);\n\n\n\n\n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar board = div.board; \n\n// create the x-axis.\nvar xaxis = board.create('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\nvar xticks = board.create('ticks',[xaxis,1],{\n drawLabels: true,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n\n// create the y-axis\nvar yaxis = board.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\nvar yticks = board.create('ticks',[yaxis,1],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n\n\n\n\n// Plot the function.\n\nswitch (num_stat) {\n case 0:\n board.create('functiongraph',\n [function(x){ return a*(Math.pow(x+h,3)+2*(x+h)+v);},x_min,x_max]);\n break;\n \n case 1:\n board.create('functiongraph',\n [function(x){ return a*(Math.pow(x+h,3)+v);},x_min,x_max]);\n break;\n \n case 2:\n switch (num_roots) {\n case 1:\n board.create('functiongraph',\n [function(x){ return a*((x+2+h)*(x+h)*(x-2+h)+5);},x_min,x_max]);\n break;\n \n case 2:\n board.create('functiongraph',\n [function(x){ return a*((x+1+h)*(x+1+h)*(x-2+h));},x_min,x_max]);\n break;\n break;\n \n case 3:\n board.create('functiongraph',\n [function(x){ return a*((x+2+h)*(x+h)*(x-2+h));},x_min,x_max]);\n break;\n }\n \n \n break;\n}\n\n\n// num_stat\n\n\n\n\n\nreturn div;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "{plotgraph(num_stat,num_roots, a, hshift, vshift)}
\nAbove is the graph of some function $f$.
\nHow many roots does $f$ have? [[0]] (2 marks)
\nHow many stationary points does $f$ have? [[1]] (2 marks)
", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Differentiate $\\displaystyle ax^b+cx^{1/d} with respect to $x$.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Differentiate the following with respect to $x$.
\nInput all numbers as fractions or integers, not as decimals.
", "advice": "", "rulesets": {"std": ["all", "fractionNumbers"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "ee": {"name": "ee", "group": "Ungrouped variables", "definition": "random(0..10)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "c", "b", "d", "f", "ee"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\n$f(x)=\\var{a}x^{\\var{b}}+\\var{c}x^{1/\\var{d}}$
\n$\\displaystyle \\frac{df}{dx}=\\;$[[0]]
\n ", "stepsPenalty": 0, "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "The derivative of $x^n$ is $nx^{n-1}$
"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a*b}*x^{b-1}+{c}/{d}*x^({1-d}/{d})", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [1, 2], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "Input all numbers as fractions or integers, not as decimals.
"}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "C2", "extensions": [], "custom_part_types": [], "resources": [["question-resources/Table_of_Derivatives_UV2rNbD.pdf", "/srv/numbas/media/question-resources/Table_of_Derivatives_UV2rNbD.pdf"], ["question-resources/C2_example.JPG", "/srv/numbas/media/question-resources/C2_example.JPG"], ["question-resources/C2_example_938dLmT.JPG", "/srv/numbas/media/question-resources/C2_example_938dLmT.JPG"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}], "tags": [], "metadata": {"description": "Instructional questions (non-randomized) to emphasize the method.", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "", "advice": "We are asked to differentiate:
\n\\[ y=\\var{bCF}x^{\\var{bP1}} \\cos{(\\var{bCF2}x)}\\]
\n\nRecognising that the function to differentiate is the product of two functions, we identify the two functions that are involved.
\n\n$u$ is the first function, $v$ is second:
\n\n$\\large u=\\var{bCF}x^{\\var{bP1}} $ $\\large v=\\cos{(\\var{bCF2}x)} $
\n\n
Now, we need to use the approriate techniques to differentiate each of these, for $u$ we can use the Power Rule and for $v$ your Table of Derivatives:
\n\nThis gives us:
\n$\\large \\frac{du}{dx}=\\simplify{ {bP1}*{bCF}*x^({bP1}-1) }$ and $ \\large \\frac{dv}{dx}=- \\var{bCF2} \\sin{(\\var{bCF2}x)}$
\n\nWe now use the formula:
\n$ \\large \\frac{dy}{dx}=u \\frac{dv}{dx} + v \\frac{du}{dx} $
\nMake the appropriate substitutions into the formula:
\n\n$ \\large \\frac{dy}{dx}= \\var{bCF}x^{\\var{bP1}} \\times - \\var{bCF2}\\sin{(\\var{bCF2}x)} + \\cos{(\\var{bCF2}x)} \\times \\simplify{ {bP1}*{bCF}*x^({bP1}-1) } $
\n\n\n
Finally, we need to use our basic algebra to simplify this as much as possible. Multiply out any brackets where it would simplify and collect like terms:
\n\n$ \\large \\frac{dy}{dx}= \\simplify{ - {bCF2}* {bCF} x^{{bP1}}} \\sin{(\\var{bCF2}x)} + \\simplify{ {bP1}*{bCF}*x^({bP1}-1) } \\cos{(\\var{bCF2}x)} $
\n", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"bCF": {"name": "bCF", "group": "Part (b)", "definition": "random(2..6)", "description": "", "templateType": "anything", "can_override": false}, "bP1": {"name": "bP1", "group": "Part (b)", "definition": "random(2..6 except bCF)", "description": "", "templateType": "anything", "can_override": false}, "bCF2": {"name": "bCF2", "group": "Part (b)", "definition": "random(2..6 except bCF)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Part (b)", "variables": ["bCF", "bP1", "bCF2"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "
Use the product rule to differentiate $ y=\\var{bCF}x^{\\var{bP1}} \\cos{(x)}$
\n\n\n$ \\large \\frac{dy}{dx}= $[[0]]
\nWhen inputting trig functions brackets should be used e.g. cos(x)
", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Hint:
\nExample with product rule
\n\n"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({bCF}x^{{bP1}})*(-sin(x))+(cos(x))*({bP1}*{bCF}x^{{bP1}-1})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "C3", "extensions": [], "custom_part_types": [], "resources": [["question-resources/C3_example.JPG", "/srv/numbas/media/question-resources/C3_example.JPG"], ["question-resources/mathcentre_CC_pyzfvWo.JPG", "/srv/numbas/media/question-resources/mathcentre_CC_pyzfvWo.JPG"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}], "tags": [], "metadata": {"description": "Differentiate $\\displaystyle \\frac{ax+b}{cx+d}$.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Differentiate the following function $y$ using the quotient rule.
", "advice": "\n\t \n\t \n\tThe quotient rule says that if $u$ and $v$ are functions of $x$ then
\\[\\simplify[std]{Diff(u/v,x,1) = (v * Diff(u,x,1) - u * Diff(v,x,1))/v^2}\\]
For this example:
\n\t \n\t \n\t \n\t\\[\\simplify[std]{u = ({a}x+{b})}\\Rightarrow \\simplify[std]{Diff(u,x,1) = {a}}\\]
\n\t \n\t \n\t \n\t\\[\\simplify[std]{v = ({c} * x+{d})} \\Rightarrow \\simplify[std]{Diff(v,x,1) = {c}}\\]
\n\t \n\t \n\t \n\tHence on substituting into the quotient rule above we get:
\n\t \n\t \n\t \n\t\\[\\begin{eqnarray*} \\frac{df}{dx}&=&\\simplify[std]{({a}({c}x+{d})-{c}({a}x+{b}))/({c}x+{d})^2}\\\\\n\t \n\t &=&\\simplify[std]{({a*c}x+{a*d}-{c*a}x-{c*b})/({c}x+{d})^2}\\\\\n\t \n\t &=&\\simplify[std]{{det}/({c}x+{d})^2}\n\t \n\t \\end{eqnarray*}\\]
\n\t \n\t \n\t", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers"], "surdf": [{"result": "(sqrt(b)*a)/b", "pattern": "a/sqrt(b)"}]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"s1": {"name": "s1", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "random(1..8)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "s1*random(1..9)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "if(a*d=b*c1,c1+1,c1)", "description": "", "templateType": "anything", "can_override": false}, "det": {"name": "det", "group": "Ungrouped variables", "definition": "a*d-b*c", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "s2*random(1..9)", "description": "", "templateType": "anything", "can_override": false}, "s2": {"name": "s2", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "c", "b", "d", "s2", "s1", "det", "c1"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\\[\\simplify[std]{y = ({a} * x+{b})/({c}*x+{d})}\\]
\n$\\displaystyle \\frac{dy}{dx}=\\;$[[0]]
", "stepsPenalty": "2", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Example of quotient rule:
\n\n"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{det}/({c}x+{d})^2", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [10, 11], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "C5", "extensions": [], "custom_part_types": [], "resources": [["question-resources/C5_example_start.JPG", "/srv/numbas/media/question-resources/C5_example_start.JPG"], ["question-resources/C5i_example.JPG", "/srv/numbas/media/question-resources/C5i_example.JPG"], ["question-resources/C5ii_example.JPG", "/srv/numbas/media/question-resources/C5ii_example.JPG"], ["question-resources/mathcentre_CC_uGtA73X.JPG", "/srv/numbas/media/question-resources/mathcentre_CC_uGtA73X.JPG"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Adrian Jannetta", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/164/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}, {"name": "Johnny Yi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2810/"}], "tags": [], "metadata": {"description": "Differentiate $f(x) = x^m(a x+b)^n$.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Differentiate $y$ using the product and function of a function rules.
", "advice": "\n \n \nThe product rule says that if $u$ and $v$ are functions of $x$ then
\\[\\simplify[std]{Diff(u * v,x,1) = u * Diff(v,x,1) + v * Diff(u,x,1)}\\]
For this example:
\n \n \n \n\\[\\simplify[std]{u = x ^ {m}}\\Rightarrow \\simplify[std]{Diff(u,x,1) = {m}x ^ {m -1}}\\]
\n \n \n \n\\[\\simplify[std]{v = ({a} * x+{b})^{n}} \\Rightarrow \\simplify[std]{Diff(v,x,1) = {n*a} * ({a} * x+{b})^{n-1}}\\]
\n \n \n \nHence on substituting into the product rule above we get:
\n \n \n \n\\[\\simplify[std]{Diff(f,x,1) = {m}x ^ {m-1} * ({a} * x+{b})^{n}+{n*a}x^{m} * ({a} * x+{b})^{n-1}}\\]
\n \n \n ", "rulesets": {"surdf": [{"pattern": "a/sqrt(b)", "result": "(sqrt(b)*a)/b"}], "std": ["all", "!collectNumbers", "fractionNumbers"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "s1": {"name": "s1", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "s1*random(1..9)", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(3..9)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(3..9)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "s1", "b", "m", "n"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "$\\displaystyle \\simplify[std]{y = x ^ {m} * ({a} * x+{b})^{n}}$
\n$\\displaystyle \\frac{dy}{dx}=\\;$[[0]]
\n", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Example of Function of Function Rule (also known as Chain Rule):
\n\n\n\n"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{m}x ^ {m-1} * ({a} * x+{b})^{n}+{n*a}x^{m} * ({a} * x+{b})^{n-1}", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "C6", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}], "tags": [], "metadata": {"description": "Find the stationary points of a cubic which has 2 turning points.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Find the coordinates of the stationary points of the function and determine their nature:
\n$y=\\simplify[all,!collectNumbers]{{a}x^3+{b}x^2+{c}x+{d}}$
\n", "advice": "
On differentiating we get $\\displaystyle \\frac{df}{dx}=\\simplify[std]{{3*a}x^2+{2*b}x+{c}}$.
\nTo find the stationary points we have to solve $\\displaystyle \\frac{df}{dx}=0$ for $x$.
\nSo we have to solve $\\simplify[std]{{3*a}x^2+{2*b}x+{c}=0}$.
\nNote that the quadratic factorises and the equation becomes $\\simplify[std]{({3a}x-{r1})(x-{r2})=0}$.
\nHence we have two stationary points: $x=\\simplify[std]{{r1}/{3a}}$ and $x=\\var{r2}$.
\nTo find out the types of these stationary points we look at the sign of $\\displaystyle \\frac{d^2y}{dx^2} = \\simplify{{6a}*x+{2*b}}$ at the stationary points.
\nIf $\\displaystyle \\frac{d^2y}{dx^2} \\lt 0 $ at a stationary point then it is a MAXIMUM.
\nIf $\\displaystyle \\frac{d^2y}{dx^2} \\gt 0 $ at a stationary point then it is a MINIMUM.
\nIf $\\displaystyle \\frac{d^2y}{dx^2} = 0 $ at a stationary point then we have to do more work!
\nAt $x=\\var{r2}$ we have $\\displaystyle \\frac{d^2y}{dx^2} = \\simplify{{6*a*r2+2*b}}${lg1}$0$ hence is a {type1}.
\nAt $\\displaystyle x=\\simplify[std]{{r1}/{3a}}$ we have $\\displaystyle \\frac{d^2y}{dx^2} = \\simplify{{2*r1+2*b}}${lg2}$0$ hence is a {type2}.
\n", "rulesets": {"std": ["all", "fractionNumbers", "!noLeadingMinus", "!collectNumbers"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-2..2 except 0)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "r1*r2", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "round(-(3*a*r2+r1)/2)", "description": "", "templateType": "anything", "can_override": false}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "random(-4..4#2 except 0)-3*a*r2", "description": "", "templateType": "anything", "can_override": false}, "r2": {"name": "r2", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything", "can_override": false}, "mn": {"name": "mn", "group": "Ungrouped variables", "definition": "if(3a*r2+b<0,1,0)", "description": "", "templateType": "anything", "can_override": false}, "type2": {"name": "type2", "group": "Ungrouped variables", "definition": "if(mx=1, 'maximum','minimum')", "description": "", "templateType": "anything", "can_override": false}, "lg2": {"name": "lg2", "group": "Ungrouped variables", "definition": "if(mx=0,'$\\\\gt$','$\\\\lt$')", "description": "", "templateType": "anything", "can_override": false}, "lg1": {"name": "lg1", "group": "Ungrouped variables", "definition": "if(mx=0,'$\\\\lt$','$\\\\gt$')", "description": "", "templateType": "anything", "can_override": false}, "type1": {"name": "type1", "group": "Ungrouped variables", "definition": "if(mx=0, 'maximum','minimum')", "description": "", "templateType": "anything", "can_override": false}, "mx": {"name": "mx", "group": "Ungrouped variables", "definition": "if(3a*r2+b<0,0,1)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(-10..10)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "c", "b", "r1", "r2", "mn", "d", "lg2", "lg1", "type1", "mx", "type2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "
$x$-coordinate of the stationary point giving a minimum: [[0]]
\n$x$-coordinate of the stationary point giving a maximum: [[1]]
\nInput your answers as fractions or integers and not as decimals.
", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "To locate the stationary points:
\n
To determine the nature of the stationary points:
Note that you will not have to deal with stationary points that are points of inflexion in this question.
"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{mx*r2}+{(1-mx)}*{(r1)}/{(3*a)}", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{mn*r2}+{(1-mn)}*{(r1)}/{(3*a)}", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "C7", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [["question-resources/C7_example.JPG", "/srv/numbas/media/question-resources/C7_example.JPG"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}, {"name": "Johnny Yi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2810/"}], "tags": [], "metadata": {"description": "A quadratic and a graph of it is given. A tangent is also sketched. The equation of the tangent line is asked for.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"x": {"name": "x", "group": "part a", "definition": "random(-3..3 except 0)", "description": "", "templateType": "anything", "can_override": false}, "fx": {"name": "fx", "group": "part a", "definition": "a*x*x+b*x+c", "description": "", "templateType": "anything", "can_override": false}, "absfx": {"name": "absfx", "group": "part a", "definition": "abs(fx)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "part a", "definition": "random(-2..2 except 0)", "description": "", "templateType": "anything", "can_override": false}, "x0": {"name": "x0", "group": "part a", "definition": "-b/(2a)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "part a", "definition": "random(-2..2 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "part a", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "part a", "definition": "2*a*x+b", "description": "", "templateType": "anything", "can_override": false}, "fx0": {"name": "fx0", "group": "part a", "definition": "a*x0*x0+b*x0+c", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "and(m<>0,(absfx<15))", "maxRuns": "200"}, "ungrouped_variables": [], "variable_groups": [{"name": "part a", "variables": ["a", "b", "c", "x", "fx", "m", "absfx", "x0", "fx0"]}], "functions": {"plot": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["x0", "number"], ["y0", "number"]], "type": "html", "language": "javascript", "definition": "// This functions plots a cubic with a certain number of\n// stationary points and roots.\n// It creates the board, sets it up, then returns an\n// HTML div tag containing the board.\n\n\n// Max and min x and y values for the axis.\nvar x_min = -7;\nvar x_max = 7;\nvar y_min = -20;\nvar y_max = 20;\n\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '500px',\n '600px',\n {\n boundingBox: [x_min,y_max,x_max,y_min],\n axis: false,\n showNavigation: false,\n grid: false,\n axis:false,\n }\n);\n\n\n\n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar board = div.board; \n\n// create the x-axis and y-axis\nvar xaxis = board.create('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\nvar xticks = board.create('ticks',[xaxis,1],{\n drawLabels: true,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n\n// create the y-axis\nvar yaxis = board.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\n\n\n\n\n// Plot the function.\n board.create('functiongraph',\n [function(x){ return a*x*x+b*x+c},x_min,x_max],\n {strokeWidth:2});\n\n//Plot the tangent.\n board.create('functiongraph',\n [function(x){ return y0+(x-x0)*(2*x0*a+b)},x_min,x_max]);\n\n// Plot coordinates.\n board.create('circle',[[x0,y0],0.1],{color:'red'});\n\n\nreturn div;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "The curve with equation $y = \\simplify{{2}x^2+{2}x+{2}}$ is sketched below.
\n{plot(2,2,2,2, 14)}
\nIn addition, the tangent to the curve at $x=2$ has been drawn.
\nUse fractions or integers in your answers.
\n\n(a) What is the gradient of the tagent at $x=2$? [[0]]
\n(b) What is the $y$ coordinate at the point of contact between the tangent and the parabola? That is, what is the $y$ value when $x=2$? [[1]]
\n\n(c) What is the equation of the tangent? $y= $[[2]]
\n\n(d) $L$ is a horizontal straight line which is tangent to the curve. Determine the coordinates of where the line $L$ touches the curve. [[3]]
\n\n\n\n\n", "stepsPenalty": "2", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "example:
\n"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "10", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "14", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "10x-6", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix([-1/2,3/2])", "correctAnswerFractions": true, "numRows": 1, "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}, {"name": "Calculus - Integration", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", ""], "variable_overrides": [[], [], [], [], []], "questions": [{"name": "C8", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Martin Jones", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/145/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}], "tags": [], "metadata": {"description": "Indefinite integration of basic functions.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Integrate the follwing expression with respect to ${x}$.
\nType the letter e for the exponential constant.
\nDon't forget the constant of integration + c
", "advice": "\\[\\int\\simplify[all]{{c}x+{b}*exp(x)}\\,dx\\]
= [[0]]
Remember that the intgeral of $x^n$ is ${x^{(n+1)}}/{n+1}$
"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "jme", "useCustomName": true, "customName": "No constant", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "You have forgotten the constant of integration, which is needed when doing indefinite integration.
", "useAlternativeFeedback": false, "answer": "{c}*x^2/2+{b/a}*exp({a}*x)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}], "answer": "{c}*x^2/2+{b}*exp(x)+c", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "c", "value": ""}, {"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "C9", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Martin Jones", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/145/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}], "tags": [], "metadata": {"description": "Definite integation of basic functions.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Make sure your calculator is in radians for this question.
\n", "advice": "(a) and (b):
\n\\[\\int_\\var{d-2}^\\var{d}\\simplify[all]{{a}*x-sin({b}*x)}\\,dx=\\left[\\simplify{{a}*x^2/2+cos({b}*x)/{b}}\\right]_\\var{d-2}^\\var{d}=\\var{a1}\\]
\n(c) and (d):
\n\\[\\int_\\var{d}^\\var{d+3}\\simplify[all]{{c}/x^{a+1}+{b}*sqrt(x)}\\,dx=\\left[\\simplify{{-c/a}/x^{a}+{2*b/3}*x^(3/2)}\\right]_\\var{d}^\\var{d+3}=\\var{a2}\\]
\n(e) and (f):
\n\\[\\int_{-2}^\\var{a-2}\\simplify[all]{{c+1}*exp(x/{b})-{a}}\\,dx=\\left[\\simplify{{b*(c+1)}*exp(x/{b})-{a}*x}\\right]_{-2}^\\var{a-2}=\\var{a3}\\]
\n(g) and (h):
\n\\[\\int_\\var{b}^\\var{b+a}\\simplify[all]{{c}/({b}*x)+{b}/{a+1}*cos({c}*x)}\\,dx=\\left[\\simplify{{c}/{b}*ln(x)+{b}/{c*(a+1)}*sin({c}*x)}\\right]_\\var{b}^\\var{b+a}=\\var{a4}\\]
\n(i) and (j):
\n\\[\\int_\\var{a}^\\var{a+1}\\simplify[all]{x^{b-1}/{b+2}-{d}+{c}*exp({-a}*x)}\\,dx=\\left[\\simplify{x^{b}/{b*(b+2)}-{d}*x-{c/a}*exp({-a}*x)}\\right]_\\var{a}^\\var{a+1}=\\var{a5}\\]
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a2": {"name": "a2", "group": "Ungrouped variables", "definition": "-c/(a*(d+3)^a)+(2*b/3)*(d+3)^(3/2)+c/(a*d^a)-(2*b/3)*d^(3/2)", "description": "", "templateType": "anything", "can_override": false}, "a3": {"name": "a3", "group": "Ungrouped variables", "definition": "b*(c+1)*exp((a-2)/b)-a*(a-2)-b*(c+1)*exp(-2/b)-2*a", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..8)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-5..5 except [-1,0])", "description": "", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "a*d^2/2+cos(b*d)/b-a*(d-2)^2/2-cos(b*(d-2))/b", "description": "", "templateType": "anything", "can_override": false}, "a5": {"name": "a5", "group": "Ungrouped variables", "definition": "(a+1)^b/(b*(b+2))-d*(a+1)-c/a*exp(-a*(a+1))-a^{b}/(b*(b+2))+d*a+c/a*exp(-a^2)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..8)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(1..15)", "description": "", "templateType": "anything", "can_override": false}, "a4": {"name": "a4", "group": "Ungrouped variables", "definition": "c/b*ln(b+a)+b/(c*(a+1))*sin(c*(b+a))-c/b*ln(b)-b/(c*(a+1))*sin(c*b)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "d", "a1", "a2", "a3", "a4", "a5"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Integrate this expression with respect to x
\nDon't forget the constant of integration + c
\n\\[\\int\\simplify[all]{{a}*x-sin({b}*x)}\\,dx\\]
", "stepsPenalty": 0, "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Remember that
\n
the integral of $x^n$ is $x^{n+1} / {n+1}$ , and
the integral of sin$(ax)$ is $-$cos$(ax) / a$
"}], "alternatives": [{"type": "jme", "useCustomName": true, "customName": "No constant", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "You have forgotten the constant of integration (condoned on this occasion).
", "useAlternativeFeedback": false, "answer": "{a}*x^2/2+cos({b}*x)/{b}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}], "answer": "{a}*x^2/2+cos({b}*x)/{b}+c", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "c", "value": ""}, {"name": "x", "value": ""}]}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Hence evaluate
\n\\[\\int_\\var{d-2}^\\var{d}\\simplify[all]{{a}*x-sin({b}*x)}\\,dx\\]
\n\nRemember to use radians and give your answer correct to 3 significant figures.
", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Example:
\nThe definite intgeral is calculated by substituting $x$ with the values of the limits.
e.g.
$ \\int_1^4\\ {{x}^4}\\,dx = 4^5 / 5 - 1^4/5=204.6=205$ (3 significant figures)
"}], "minValue": "{a1}", "maxValue": "{a1}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "C10", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Vaughan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1135/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}], "tags": [], "metadata": {"description": "Find $\\displaystyle I=\\int \\frac{2 a x + b} {a x ^ 2 + b x + c}\\;dx$ by substitution or otherwise.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Use substitution to find the following integral.
\nNote that $\\displaystyle \\int \\frac{1}{x}\\;dx=\\ln(|x|)+c$.
\nDon't forget the constant of integration $+c$.
\nInput all numbers as integers or fractions - do not use decimals.
\n\n\n", "advice": "\nThis exercise is best solved by using substitution.
\nNote that the numerator $\\simplify[std]{{2 * a} * x + {b}}$ of \\[\\simplify[std]{({2 * a} * x + {b}) / ({a} * x ^ 2 + {b} * x + {c})}\\] is the derivative of the denominator $\\simplify[std]{{a} * x ^ 2 + {b} * x + {c}}$
\nSo if you use as your substitution $u=\\simplify[std]{{a} * (x ^ 2) + ({b} * x) + {c}}$ you then have $\\simplify[std]{ du = ({2 * a} * x + {b}) * dx}$
\nHence we can replace $\\simplify[std]{ ({2 * a} * x + {b}) * dx}$ by $du$
\nHence the integral becomes:
\n\\[\\begin{eqnarray*} I&=&\\int\\;\\frac{du}{u}\\\\ &=&\\ln(|u|)+C\\\\ &=& \\simplify[std]{ln(abs({a} * (x ^ 2) + ({b} * x) + {c}))+C} \\end{eqnarray*}\\]
A Useful Result
This example can be generalised.
Suppose \\[I = \\int\\; \\frac{f'(x)}{f(x)}\\;dx\\]
\nThe using the substitution $u=f(x)$ we find that $du=f'(x)\\;dx$ and so using the same method as above:
\\[I = \\int \\frac{du}{u} = \\ln(|u|)+ C = \\ln(|f(x)|)+C\\]
\\[\\simplify[std]{Int(({2 * a} * x + {b}) / ({a} * x ^ 2 + {b} * x + {c}),x)}\\]
\n$=\\;$[[0]]
\n\nYou should input $|x|$ as abs(x)
\nYou should use brackets after ln e.g ln x = ln(x)
\nUse the format ln ( abs(x) ) for $ln (|x|)$
", "stepsPenalty": 1, "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Try the substitution $u=\\simplify[std]{{a} * (x ^ 2) + ({b} * x) + {c}}$
\n\n"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "ln(abs((({a} * (x ^ 2)) + ({b} * x) + {c})))+c", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "musthave": {"strings": ["abs"], "showStrings": false, "partialCredit": 0, "message": "Note that \\[\\int \\frac{1}{x}\\;dx=\\ln(|x|)+C\\] and you must input the absolute value of the argument of the natural logarithm. You input the absolute value using abs, for example abs(x)=$\\simplify{abs(x)}$
"}, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "Do not input numbers as decimals, only as integers without the decimal point, or fractions
"}, "valuegenerators": [{"name": "c", "value": ""}, {"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "C13", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "TEAME UCC", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/351/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}], "tags": [], "metadata": {"description": "Integration by Parts
\nrebelmaths
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "Use Integration by Parts
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..4 except a)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Evaluate $\\int_0^\\pi x \\cos(x) \\mathrm{dx}$ using integration by parts.
\n", "stepsPenalty": "2", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "$\\int (u*dv) dx= u*v-\\int(v*du) dx$
\n"}], "minValue": "-2", "maxValue": "-2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "C14", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [["question-resources/C14_example.JPG", "/srv/numbas/media/question-resources/C14_example.JPG"], ["question-resources/C14ii.JPG", "/srv/numbas/media/question-resources/C14ii.JPG"], ["question-resources/mathcentre_CC_KqimMkH.JPG", "/srv/numbas/media/question-resources/mathcentre_CC_KqimMkH.JPG"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}, {"name": "Kevin Bohan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3363/"}], "tags": [], "metadata": {"description": "Three graphs are given with areas underneath them shaded. The student is asked to calculate their areas, using integration. Q1 has a polynomial. Q2 has exponentials and fractional functions. Q3 requires solving a trig equation and integration by parts.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "(i) Area $ = -\\int_{\\var{x11}}^0 \\simplify{{a1}*x^2+{b1}*x+{c1}} \\, dx +\\int^{\\var{x12}}_0 \\simplify{{a1}*x^2+{b1}*x+{c1}} \\, dx$
\n$ = -\\left[ \\simplify{ {a1}/3*x^3 + {b1}/2*x^2 + {c1}*x } \\right]_{\\var{x11}}^0 + \\left[\\simplify{ {a1}/3*x^3 + {b1}/2*x^2 + {c1}*x } \\right]^{\\var{x12}}_0 $
\n$ =-\\left[ (0) - (\\simplify{{a1}/3{x11}^3 +{b1}/2{x11}^2 +{c1}{x11}} ) \\right] + \\left[(\\simplify{{a1}/3({x12})^3 +{b1}/2({x12})^2 +{c1}{x12}}) -(0) \\right] $
\n$ = \\var{area1}$, to 3.s.f.
\n\n\n\n\n\n\n(ii) Area $ = \\int_{\\var{x21}}^{\\var{x22}} \\simplify{{a2}e^({b2}*x-3)+1/({c2}+x)} \\, dx$
\n$ = \\left[ \\simplify{{a2}/{b2}*e^({b2}*x-3) + ln(x+{c2}) } \\right]_{\\var{x21}}^{\\var{x22}}$
\n$ = \\var{area2}$, to 3.s.f.
\n\n\n\n\n\n\n(iii) First we need to work out the minimum and maximum $x$-values. The minimum can be read from the graph, it is $0$. The maximum is found by solving an equation:
\n$\\simplify{{a3}*x*sin(x/{b3})} =0$
\n$\\sin(\\frac{x}{\\var{b3}}) = 0 $
\n$\\simplify{x/{b3}} =\\ldots,-2\\pi, -\\pi,0,\\pi,2\\pi,3\\pi,\\ldots$, (obtained by looking at the graph of $\\sin(x)$)
\n$ x = \\ldots, -\\var{2*b3} \\pi, -\\var{b3}\\pi, 0 , \\var{b3}\\pi,\\var{2*b3}\\pi,\\var{2*b3}\\pi, \\ldots$. (These values were obtained by multiplying the previous line by $\\var{b3}$.)
\nWe need the smallest positive value, which is $\\var{b3}\\pi$.
\n\n\nNow we can set-up the integral:
\nArea $ = \\int^{\\var{b3}\\pi}_0 \\simplify{{a3}*x*sin(x/{b3})} \\, dx$.
\nTo integrate one can use integration by parts. First we let $u = x$ and $\\frac{dv}{dx}=\\simplify{{a3}sin(x/{b3})}$.
\nDifferentiating $u$ gives $\\frac{du}{dx} = 1$ and integrating gives $v = \\simplify{-{a3*b3}cos(x/{b3})}$.
\nHence, using the integration by parts formula we get:
\nArea $= \\left[ x \\times \\simplify{-{a3*b3}cos(x/{b3})} \\right]^{\\var{b3}\\pi}_0 - \\int^{\\var{b3}\\pi}_0 1 \\times \\simplify{-{a3*b3}cos(x/{b3})} \\, dx$
\n$ =\\left[ \\simplify{-{a3*b3}*x*cos(x/{b3})} \\right]^{\\var{b3}\\pi}_0 + \\left[ \\simplify{{a3*b3*b3}sin(x/{b3}) }\\right]^{\\var{b3}\\pi}_0 $
\n$ = [( -\\var{a3*b3*b3}\\pi \\times \\cos(\\pi)) - (0) ] + [\\var{a3*b3*b3}\\sin(\\pi) -\\var{a3*b3*b3}\\sin(0)]$
\n$ = [ -\\var{b3*a3*b3}\\pi \\times -1] + [0 -0]$
\n$ = \\var{a3*b3*b3} \\pi$.
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a2": {"name": "a2", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything", "can_override": false}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "random(2..3)", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(5..9#2)", "description": "", "templateType": "anything", "can_override": false}, "c2": {"name": "c2", "group": "Ungrouped variables", "definition": "random(3..6)", "description": "", "templateType": "anything", "can_override": false}, "area2": {"name": "area2", "group": "Ungrouped variables", "definition": "siground((a2/b2*e^(b2*x22-3) + ln(x22+c2))-(a2/b2*e^(b2*x21-3) + ln(x21+c2)),3)", "description": "", "templateType": "anything", "can_override": false}, "ymax1": {"name": "ymax1", "group": "Ungrouped variables", "definition": "a1*x12*x12+b1*x12+c1+2", "description": "", "templateType": "anything", "can_override": false}, "x22": {"name": "x22", "group": "Ungrouped variables", "definition": "random(2..3)", "description": "", "templateType": "anything", "can_override": false}, "x12": {"name": "x12", "group": "Ungrouped variables", "definition": "random(4..6)", "description": "", "templateType": "anything", "can_override": false}, "b3": {"name": "b3", "group": "Ungrouped variables", "definition": "random(2..3)", "description": "", "templateType": "anything", "can_override": false}, "a3": {"name": "a3", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "x32": {"name": "x32", "group": "Ungrouped variables", "definition": "pi*b3", "description": "", "templateType": "anything", "can_override": false}, "x31": {"name": "x31", "group": "Ungrouped variables", "definition": "0", "description": "", "templateType": "anything", "can_override": false}, "x11": {"name": "x11", "group": "Ungrouped variables", "definition": "-1", "description": "", "templateType": "anything", "can_override": false}, "ymax2": {"name": "ymax2", "group": "Ungrouped variables", "definition": "a2*e^(b2*x22-3)", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "0", "description": "", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(2..4 except 3)", "description": "", "templateType": "anything", "can_override": false}, "x21": {"name": "x21", "group": "Ungrouped variables", "definition": "-c2+2", "description": "", "templateType": "anything", "can_override": false}, "area1": {"name": "area1", "group": "Ungrouped variables", "definition": "siground((1/3*a1*x11*x11*x11+1/2*b1*x11*x11+c1*x11)+(1/3*a1*x12*x12*x12+1/2*b1*x12*x12+c1*x12),3)", "description": "", "templateType": "anything", "can_override": false}, "area3": {"name": "area3", "group": "Ungrouped variables", "definition": "-a3*b3*x32*cos(x32/b3)/pi", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "AND(ymax2<100, 10This is the graph of the function $f(x) = \\simplify{{a1}*x^2+{b1}*x+{c1}}$.
\nWhat is the total area of the shaded region? (In case it is unclear, the minimum $x$-value of the region is {x11}).
\n\n[[0]]
\n\nHint: You must add the positive and negative areas together to find the area of the total shaded region.
\n\n", "stepsPenalty": "2", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Example:
\n\n\n"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "area1", "maxValue": "area1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}, {"name": "Trigonometry and Matrices ", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", ""], "variable_overrides": [[], [], [], []], "questions": [{"name": "T1", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [["question-resources/T1_example_degrees.JPG", "/srv/numbas/media/question-resources/T1_example_degrees.JPG"], ["question-resources/T1ii_radians.JPG", "/srv/numbas/media/question-resources/T1ii_radians.JPG"], ["question-resources/T1_example.JPG", "/srv/numbas/media/question-resources/T1_example.JPG"], ["question-resources/T1_example_CqhhtX7.JPG", "/srv/numbas/media/question-resources/T1_example_CqhhtX7.JPG"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}], "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Remember to make sure your calculator is in radians for this question.
\n", "advice": "See Lecture 7.3 and 7.5 for background and examples.
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"x0": {"name": "x0", "group": "part a", "definition": "0.1*random(1..9)+0.01*random(1..9)", "description": "", "templateType": "anything", "can_override": false}, "f0": {"name": "f0", "group": "part a", "definition": "precround(sin(x0),2)", "description": "", "templateType": "anything", "can_override": false}, "f1": {"name": "f1", "group": "part a", "definition": "f0", "description": "", "templateType": "anything", "can_override": false}, "x1": {"name": "x1", "group": "part a", "definition": "precround(pi-x0,2)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "part a", "variables": ["x0", "f0", "x1", "f1"]}], "functions": {"plot": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["x0", "number"], ["y0", "number"], ["x1", "number"], ["y1", "number"], ["n", "number"]], "type": "html", "language": "javascript", "definition": "// Max and min x and y values for the axis.\nvar x_min = -3.2;\nvar x_max = 6.3;\nvar y_min = -1.2;\nvar y_max = 1.2;\n\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '500px',\n '600px',\n {\n boundingBox: [x_min,y_max,x_max,y_min],\n axis: false,\n showNavigation: false,\n grid: false,\n axis:false,\n }\n);\n\n\n\n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar board = div.board; \n\n// create the x-axis and y-axis\nvar xaxis = board.create('axis',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\n//var xticks = board.create('ticks',[xaxis,1],{\n// drawLabels: true,\n// label: {offset: [-8, -10]},\n// minorTicks: 0\n//});\n\n// create the y-axis\nvar yaxis = board.create('axis',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\n//var yticks = board.create('ticks',[yaxis,1],{\n// drawLabels: true,\n// label: {offset: [-8, 0]},\n// minorTicks: 0\n//});\n\n\n//Define function depending on value of n.\nswitch(n) {\n case 1:\n var f = function(x) {return a*Math.sin(b*x)+c; }\n break;\n \n case 2:\n var f = function(x) {return a*Math.cos(b*x)+c; }\n break;\n \n case 3:\n var f = function(x) {return Math.sin(x+3.141*1.0);}\n break;\n \n case 4:\n var f = function(x) {return Math.sin(x+3.141*1.5);}\n break;\n}\n\n\n// Plot the function.\n board.create('functiongraph', [f,x_min,x_max]);\n\n// Plot coordinates.\n board.create('ellipse',[[x0+0.04,y0],[x0-0.04,y0],[x0,y0+0.02]],{color:'red'});\n board.create('text',[x0+0.1,y0,'A']);\n board.create('ellipse',[[x1+0.04,y1],[x1-0.04,y1],[x1,y1+0.02]],{color:'red'});\n board.create('text',[x1+0.1,y1,'B']);\n// board.create('ellipse',[[x2,y2+0.045],[x2,y2-0.045],[x2,y2+0.05]],{color:'red'});\n// board.create('text',[x2,y2+0.2,'C']);\n\nreturn div;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "This is the graph of $y = \\sin(x)$, in radians.
\n{plot(1,1,0,x0, f0, x1, f1, 1)}
\n\nThe coordinates of $A$ are $(\\var{x0},\\var{f0})$.
\nDetermine the coordinates of $B$. Give your answer to 2 d.p. where appropriate.
\n\nCoordinates of B: [[0]]
", "stepsPenalty": "2", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Example
\nNote that,
\n"}], "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix([x1,f1])", "correctAnswerFractions": false, "numRows": 1, "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "T2", "extensions": [], "custom_part_types": [], "resources": [["question-resources/T2.JPG", "/srv/numbas/media/question-resources/T2.JPG"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Katie Lester", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/586/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}], "tags": [], "metadata": {"description": "Simple trig equations with radians
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Solve the following trigonometric equation in radians, for $\\theta$ in the range $0\\leq\\theta\\leq2\\pi$.
\n", "advice": "Please refer to the advice section of 'Trigonometric Equations 1 - Simple (Degrees)' for help.
\nTo convert from degrees to radians, multiply by $\\frac{\\pi}{180}$.
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"f2": {"name": "f2", "group": "Q2", "definition": "c/b", "description": "", "templateType": "anything", "can_override": false}, "s42": {"name": "s42", "group": "Q3", "definition": "precround(2*pi+s4,2)", "description": "", "templateType": "anything", "can_override": false}, "f4": {"name": "f4", "group": "Q3", "definition": "-c/(c+3)", "description": "", "templateType": "anything", "can_override": false}, "s31": {"name": "s31", "group": "Q4", "definition": "precround(s3,2)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Q2", "definition": "random(2..b-1)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Q1", "definition": "random(3..9)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Q2", "definition": "random(5..12)", "description": "", "templateType": "anything", "can_override": false}, "s4": {"name": "s4", "group": "Q3", "definition": "arcsin(f4)", "description": "", "templateType": "anything", "can_override": false}, "s1": {"name": "s1", "group": "Q1", "definition": "arcsin(f1)", "description": "", "templateType": "anything", "can_override": false}, "s22": {"name": "s22", "group": "Q2", "definition": "precround(2*pi-s2,2)", "description": "", "templateType": "anything", "can_override": false}, "f1": {"name": "f1", "group": "Q1", "definition": "(a-1)/a", "description": "", "templateType": "anything", "can_override": false}, "s21": {"name": "s21", "group": "Q2", "definition": "precround(s2,2)", "description": "", "templateType": "anything", "can_override": false}, "s3": {"name": "s3", "group": "Q4", "definition": "arccos(f3)", "description": "", "templateType": "anything", "can_override": false}, "s32": {"name": "s32", "group": "Q4", "definition": "precround(2*pi-s3,2)", "description": "", "templateType": "anything", "can_override": false}, "s2": {"name": "s2", "group": "Q2", "definition": "arccos(f2)", "description": "", "templateType": "anything", "can_override": false}, "f3": {"name": "f3", "group": "Q4", "definition": "(1-b)/(b+1)", "description": "", "templateType": "anything", "can_override": false}, "s11": {"name": "s11", "group": "Q1", "definition": "precround(s1,2)", "description": "", "templateType": "anything", "can_override": false}, "s41": {"name": "s41", "group": "Q3", "definition": "precround(pi-s4,2)", "description": "", "templateType": "anything", "can_override": false}, "s12": {"name": "s12", "group": "Q1", "definition": "precround(pi-s1,2)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Q1", "variables": ["a", "f1", "s1", "s11", "s12"]}, {"name": "Q2", "variables": ["b", "c", "f2", "s2", "s21", "s22"]}, {"name": "Q4", "variables": ["f3", "s31", "s32", "s3"]}, {"name": "Q3", "variables": ["f4", "s4", "s41", "s42"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\\[\\var{a}\\sin(\\theta)=\\var{a-1}\\]
\n$\\sin(\\theta)=$ [[0]] Write this answer as a fraction.
\n$\\theta=$ [[1]] or [[2]] Give these answers correct to 2 decimal places and in ascending order (i.e. lowest first).
", "stepsPenalty": "2", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Example
\n"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{f1}-0.01", "maxValue": "{f1}+0.01", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{s11}", "maxValue": "{s11}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": "100", "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{s12}", "maxValue": "{s12}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": "100", "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "M1a", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Martin Jones", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/145/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}], "tags": [], "metadata": {"description": "Addition and subtraction of matrices; multiplication by scalar.
", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "The matrices $A$, $B$ and $C$ are defined as:
\n\\[A=\\var{A}\\qquad B=\\var{B}\\qquad C=\\var{C}\\]
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"B": {"name": "B", "group": "Ungrouped variables", "definition": "matrix([random(-5..5),random(-5..5)],[random(-5..5),random(-5..5)])", "description": "", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "random(2..5 except p)", "description": "", "templateType": "anything", "can_override": false}, "C": {"name": "C", "group": "Ungrouped variables", "definition": "matrix([random(-5..5),random(-5..5)],[random(-5..5),random(-5..5)])", "description": "", "templateType": "anything", "can_override": false}, "A": {"name": "A", "group": "Ungrouped variables", "definition": "matrix([random(-5..5),random(-5..5)],[random(-5..5),random(-5..5)])", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["A", "B", "C", "p", "q"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "What is $A+B$ ?
", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Remember for matrices, that addition is element-wise.
\nThis means elements in the same positions are added together.
"}], "correctAnswer": "A+B", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "What is $B-C$ ?
", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Remember for matrices subtraction is performed element-wise.
\nThis means elements in the same positions are subtracted from one another in the order of given in the question.
"}], "correctAnswer": "B-C", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "M2", "extensions": [], "custom_part_types": [], "resources": [["question-resources/M2.JPG", "/srv/numbas/media/question-resources/M2.JPG"], ["question-resources/M2a.JPG", "/srv/numbas/media/question-resources/M2a.JPG"], ["question-resources/M2b.JPG", "/srv/numbas/media/question-resources/M2b.JPG"], ["question-resources/CaptureM2c.JPG", "/srv/numbas/media/question-resources/CaptureM2c.JPG"], ["question-resources/M2d.JPG", "/srv/numbas/media/question-resources/M2d.JPG"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1809/"}], "tags": [], "metadata": {"description": "Putting a pair of linear equations into matrix notation and then solving by finding the inverse of the coefficient matrix.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Rewrite the following system of equations as a matrix equation
\n\n\\begin{align}
\\simplify[std]{ {ma[0][0]}x + {ma[0][1]}y} &= \\var{mb[0][0]} \\\\
\\simplify[std]{ {ma[1][0]}x + {ma[1][1]}y} &= \\var{mb[1][0]}
\\end{align}
Input all numbers as fractions or integers and not as decimals.
", "advice": "The equations can be written in the matrix form
\n\\[ \\var{ma}\\begin{pmatrix} x \\\\ y \\end{pmatrix} = \\var{mb} \\]
\n$\\mathrm{det}(\\mathbf{A}) = \\simplify[]{ {ma[0][0]}*{ma[1][1]} - {ma[0][1]}*{ma[1][0]}} = \\var{det(ma)} \\neq 0$, so $\\mathbf{A}$ is invertible.
\n\\[ \\mathbf{A}^{-1} = \\simplify[fractionnumbers]{{ma_inverse}} \\]
\nWe have
\n\\begin{align}
\\mathbf{A}^{-1}\\mathbf{b} &= \\simplify[fractionnumbers]{{ma_inverse}*{mb}} \\\\
&= \\simplify[fractionnumbers]{{ma_inverse*mb}}
\\end{align}
Rearrange the equation $\\mathbf{Av}=\\mathbf{b}$ to make $\\mathbf{v}$ the subject:
\n\\begin{align}
\\mathbf{A}^{-1}\\mathbf{A}\\mathbf{v} &= \\mathbf{A}^{-1}\\mathbf{b} \\\\
\\mathbf{v} &= \\mathbf{A}^{-1}\\mathbf{b} \\\\ \\\\
\\end{align}
Hence,
\n\\[ \\begin{pmatrix} x \\\\ y \\end{pmatrix} = \\simplify[fractionnumbers]{{ma_inverse*mb}} \\]
\nThat is,
\n\\begin{align}
x &= \\simplify[fractionnumbers]{{x}}, \\\\ \\\\
y &= \\simplify[fractionnumbers]{{y}}
\\end{align}
Matrix A. a10 is picked so it's non-singular, and a11 is never $\\pm a01$.
\nNo entry is 0.
", "templateType": "anything", "can_override": false}, "a10": {"name": "a10", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,a00,-a00,a00*a11/a01])", "description": "", "templateType": "anything", "can_override": false}, "ma_inverse": {"name": "ma_inverse", "group": "Ungrouped variables", "definition": "matrix([\n [ma[1][1], -ma[0][1]],\n [-ma[1][0], ma[0][0]]\n])/det(ma)", "description": "", "templateType": "anything", "can_override": false}, "a01": {"name": "a01", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "templateType": "anything", "can_override": false}, "y": {"name": "y", "group": "Ungrouped variables", "definition": "(ma_inverse*mb)[1][0]", "description": "", "templateType": "anything", "can_override": false}, "a11": {"name": "a11", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,a01,-a01])", "description": "", "templateType": "anything", "can_override": false}, "a00": {"name": "a00", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["ma", "a00", "a01", "a10", "a11", "mb", "ma_inverse", "x", "y"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "$A = $ [[0]]
\n[[1]] | \n
[[2]] | \n
$b = $ [[3]]
\nHints:
\n"}], "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "ma", "correctAnswerFractions": true, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "x", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "y", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "y", "value": ""}]}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "mb", "correctAnswerFractions": false, "numRows": "2", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Find the inverse of $A$.
\n$A^{-1} = $ [[0]] use fractions or integers in your answer
", "stepsPenalty": 0, "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Remember that:
\n"}], "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "ma_inverse", "correctAnswerFractions": true, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Now find $A^{-1} b$.
\n$A^{-1}b = $ [[0]]
", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": ""}], "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "ma_inverse*mb", "correctAnswerFractions": true, "numRows": "2", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Finally, solve the equations.
\n$x = $ [[0]]
\n$y = $ [[1]]
", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\n"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "x", "maxValue": "x", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "y", "maxValue": "y", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": "APEP/P"}, "timing": {"allowPause": false, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "The answer is a comma-separated list of numbers.
\nThe list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.
\nYou can optionally treat the answer as a set, so the number of occurrences doesn't matter, only whether each number is included or not.
", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n settings[\"separator\"] + \" \"\n)", "hint": {"static": false, "value": "if(settings[\"show_input_hint\"],\n \"Enter a list of numbers separated by{settings['separator']}
.\",\n \"\"\n)"}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "bits:\nlet(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)\n\nexpected_numbers:\nlet(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)\n\nvalid_numbers:\nif(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )\n\nis_sorted:\nassert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )\n\nincluded:\nmap(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentIs every number in the student's list valid?
", "definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )"}, {"name": "is_sorted", "description": "Are the student's answers in ascending order?
", "definition": "assert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )"}, {"name": "included", "description": "Is each number in the expected answer present in the student's list the correct number of times?
", "definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentTrue if the student's list doesn't contain any numbers that aren't in the expected answer.
", "definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(\"Your answer contains \"+extra_numbers[0]+\" but should not.\");\n false\n )"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "if(lower(studentAnswer) in [\"empty\",\"\u2205\"],[],\n map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n )\n)"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)"}, {"name": "notationStyles", "description": "", "definition": "[\"en\"]"}, {"name": "isSet", "description": "Should the answer be considered as a set, so the number of times an element occurs doesn't matter?
", "definition": "settings[\"isSet\"]"}, {"name": "extra_numbers", "description": "Numbers included in the student's answer that are not in the expected list.
", "definition": "filter(not (x in expected_numbers),x,interpreted_answer)"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The list of numbers that the student should enter. The order does not matter.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "allowFractions", "label": "Allow the student to enter fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "correctAnswerFractions", "label": "Display the correct answers as fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "isSet", "label": "Is the answer a set?", "help_url": "", "hint": "If ticked, the number of times an element occurs doesn't matter, only whether it's included at all.", "input_type": "checkbox", "default_value": false}, {"name": "show_input_hint", "label": "Show the input hint?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": true}, {"name": "separator", "label": "Separator", "help_url": "", "hint": "The substring that should separate items in the student's list", "input_type": "string", "default_value": ",", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [["question-resources/A5_example.JPG", "/srv/numbas/media/question-resources/A5_example.JPG"], ["question-resources/mathcentre_CC.JPG", "/srv/numbas/media/question-resources/mathcentre_CC.JPG"], ["question-resources/Table_of_Derivatives_UV2rNbD.pdf", "/srv/numbas/media/question-resources/Table_of_Derivatives_UV2rNbD.pdf"], ["question-resources/C2_example.JPG", "/srv/numbas/media/question-resources/C2_example.JPG"], ["question-resources/C2_example_938dLmT.JPG", "/srv/numbas/media/question-resources/C2_example_938dLmT.JPG"], ["question-resources/C3_example.JPG", "/srv/numbas/media/question-resources/C3_example.JPG"], ["question-resources/mathcentre_CC_pyzfvWo.JPG", "/srv/numbas/media/question-resources/mathcentre_CC_pyzfvWo.JPG"], ["question-resources/C5_example_start.JPG", "/srv/numbas/media/question-resources/C5_example_start.JPG"], ["question-resources/C5i_example.JPG", "/srv/numbas/media/question-resources/C5i_example.JPG"], ["question-resources/C5ii_example.JPG", "/srv/numbas/media/question-resources/C5ii_example.JPG"], ["question-resources/mathcentre_CC_uGtA73X.JPG", "/srv/numbas/media/question-resources/mathcentre_CC_uGtA73X.JPG"], ["question-resources/C7_example.JPG", "/srv/numbas/media/question-resources/C7_example.JPG"], ["question-resources/C14_example.JPG", "/srv/numbas/media/question-resources/C14_example.JPG"], ["question-resources/C14ii.JPG", "/srv/numbas/media/question-resources/C14ii.JPG"], ["question-resources/mathcentre_CC_KqimMkH.JPG", "/srv/numbas/media/question-resources/mathcentre_CC_KqimMkH.JPG"], ["question-resources/T1_example_degrees.JPG", "/srv/numbas/media/question-resources/T1_example_degrees.JPG"], ["question-resources/T1ii_radians.JPG", "/srv/numbas/media/question-resources/T1ii_radians.JPG"], ["question-resources/T1_example.JPG", "/srv/numbas/media/question-resources/T1_example.JPG"], ["question-resources/T1_example_CqhhtX7.JPG", "/srv/numbas/media/question-resources/T1_example_CqhhtX7.JPG"], ["question-resources/T2.JPG", "/srv/numbas/media/question-resources/T2.JPG"], ["question-resources/M2.JPG", "/srv/numbas/media/question-resources/M2.JPG"], ["question-resources/M2a.JPG", "/srv/numbas/media/question-resources/M2a.JPG"], ["question-resources/M2b.JPG", "/srv/numbas/media/question-resources/M2b.JPG"], ["question-resources/CaptureM2c.JPG", "/srv/numbas/media/question-resources/CaptureM2c.JPG"], ["question-resources/M2d.JPG", "/srv/numbas/media/question-resources/M2d.JPG"]]}