// Numbas version: finer_feedback_settings {"name": "Domain of a piecewise function", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Domain of a piecewise function", "tags": [], "metadata": {"description": "
Multiple choice
Given the real function below, you should be able to determine its domain.
", "advice": "The function $\\simplify{{out}}$ is a piecewise function. It is defined on different parts (or pieces) of its domain by different (sub)functions.
\n\nIn particular, the pieces of the domain are the intervals
\nand their corresponding (sub)functions are given by the expressions
\nIn the case of the function $\\simplify{{out}}$ above, each of the (sub)functions are defined for the indicated intervals and so the domain of $\\simplify{{out}}$ are all of those intervals combined. The first and second interval join nicely without a gap unlike the rest and so we have \\[\\text{dom}(\\simplify{{out}})=\\{\\simplify{{inp}}\\in\\mathbb{R}:\\, \\simplify{{inp}}\\leq \\var{b1},\\; \\var{b2}\\leq \\simplify{{inp}}<\\var{b3},\\; \\var{b3}<\\simplify{{inp}}\\leq\\var{b4}, \\text{ or }\\; \\simplify{{inp}}\\ge \\var{b5}\\}.\\]
\n", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"b4": {"name": "b4", "group": "Ungrouped variables", "definition": "b[4]", "description": "", "templateType": "anything", "can_override": false}, "p0": {"name": "p0", "group": "Ungrouped variables", "definition": "expression(pieces[0])", "description": "", "templateType": "anything", "can_override": false}, "p4": {"name": "p4", "group": "Ungrouped variables", "definition": "expression(pieces[4])", "description": "", "templateType": "anything", "can_override": false}, "c8": {"name": "c8", "group": "Ungrouped variables", "definition": "random(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "sort(shuffle(-12..12)[0..6])", "description": "", "templateType": "anything", "can_override": false}, "c7": {"name": "c7", "group": "Ungrouped variables", "definition": "random(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "out": {"name": "out", "group": "Ungrouped variables", "definition": "expression(random('f','h','g','p','q','y'))", "description": "", "templateType": "anything", "can_override": false}, "p1": {"name": "p1", "group": "Ungrouped variables", "definition": "expression(pieces[1])", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "random(-12..12 except 0)", "description": "c
", "templateType": "anything", "can_override": false}, "p2": {"name": "p2", "group": "Ungrouped variables", "definition": "expression(pieces[2])", "description": "", "templateType": "anything", "can_override": false}, "b0": {"name": "b0", "group": "Ungrouped variables", "definition": "b[0]", "description": "", "templateType": "anything", "can_override": false}, "c2": {"name": "c2", "group": "Ungrouped variables", "definition": "random(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "c5": {"name": "c5", "group": "Ungrouped variables", "definition": "random(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b5": {"name": "b5", "group": "Ungrouped variables", "definition": "b[5]", "description": "", "templateType": "anything", "can_override": false}, "b3": {"name": "b3", "group": "Ungrouped variables", "definition": "b[3]", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "b[1]", "description": "", "templateType": "anything", "can_override": false}, "p3": {"name": "p3", "group": "Ungrouped variables", "definition": "expression(pieces[3])", "description": "", "templateType": "anything", "can_override": false}, "pieces": {"name": "pieces", "group": "Ungrouped variables", "definition": "shuffle(['{c1}{inp}^2+{c2}{inp}+{c3}','{c4}e^{inp}','{c5}{inp}+{c6}','{c7}','{c8}','{inp}','{c5}^{inp}','{c1}{inp}^3','{c8}^({inp}+{c7})', '({inp}+{c6})^2', '({inp}-{c6})^3'])", "description": "", "templateType": "anything", "can_override": false}, "c4": {"name": "c4", "group": "Ungrouped variables", "definition": "random(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "inp": {"name": "inp", "group": "Ungrouped variables", "definition": "expression(random('x','r','s','t','w'))", "description": "", "templateType": "anything", "can_override": false}, "c3": {"name": "c3", "group": "Ungrouped variables", "definition": "random(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "b[2]", "description": "", "templateType": "anything", "can_override": false}, "c6": {"name": "c6", "group": "Ungrouped variables", "definition": "random(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["out", "inp", "b", "b0", "b1", "b2", "b3", "b4", "b5", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "pieces", "p0", "p1", "p2", "p3", "p4"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "m_n_2", "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{{out}}(\\simplify{{inp}})=\\left\\{\\begin{align}&\\simplify{{p0}},&& \\text{ for } \\simplify{{inp}}< \\var{b0}, \\\\&\\simplify{{p1}},&& \\text{ for } \\var{b0}\\leq \\simplify{{inp}}\\leq \\var{b1},\\\\ &\\simplify{{p2}},&& \\text{ for } \\var{b2}\\leq\\simplify{{inp}}< \\var{b3},\\\\ &\\simplify{{p3}},&& \\text{ for } \\var{b3}<\\simplify{{inp}}\\leq \\var{b4},\\\\ &\\simplify{{p4}},&& \\text{ for } \\simplify{{inp}}\\ge\\var{b5}.\\end{align}\\right.$
\n\nWhich of the following is true of the piecewise function above?
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "checkbox", "displayColumns": "1", "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "choices": ["$\\text{dom}(\\simplify{{out}})=\\mathbb{R}$
", "$\\text{dom}(\\simplify{{out}})=\\{\\simplify{{inp}}\\in\\mathbb{R}:\\, \\simplify{{inp}}\\leq \\var{b1},\\; \\var{b2}\\leq \\simplify{{inp}}\\leq\\var{b4}, \\text{ or }\\; \\simplify{{inp}}\\ge \\var{b5}\\}$
", "$\\text{dom}(\\simplify{{out}})=\\{\\simplify{{inp}}\\in\\mathbb{R}:\\, \\simplify{{inp}}\\leq \\var{b1},\\; \\var{b2}\\leq \\simplify{{inp}}<\\var{b3},\\; \\var{b3}<\\simplify{{inp}}\\leq\\var{b4}, \\text{ or }\\; \\simplify{{inp}}\\ge \\var{b5}\\}$
", "$\\text{dom}(\\simplify{{out}})=\\{\\simplify{{inp}}\\in\\mathbb{R}:\\, \\simplify{{inp}}< \\var{b0},\\; \\var{b2}\\leq \\simplify{{inp}}<\\var{b3},\\; \\var{b3}<\\simplify{{inp}}\\leq\\var{b4}, \\text{ or }\\; \\simplify{{inp}}\\ge \\var{b5}\\}$
", "$\\text{dom}(\\simplify{{out}})=\\{\\simplify{{inp}}\\in\\mathbb{R}:\\, \\simplify{{inp}}< \\var{b1},\\; \\var{b2}< \\simplify{{inp}}\\leq\\var{b3},\\; \\var{b3}\\leq\\simplify{{inp}}<\\var{b4}, \\text{ or }\\; \\simplify{{inp}}> \\var{b5}\\}$
", "$\\text{dom}(\\simplify{{out}})=\\mathbb{R}^5$
", "$\\text{dom}(\\simplify{{out}})=\\{\\simplify{{inp}}\\in\\mathbb{R}:\\, \\simplify{{inp}}< \\var{b0},\\; \\var{b0}< \\simplify{{inp}}<\\var{b1},\\;\\var{b2}\\leq \\simplify{{inp}}<\\var{b3},\\; \\var{b3}<\\simplify{{inp}}\\leq\\var{b4}, \\text{ or }\\; \\simplify{{inp}}\\ge \\var{b5}\\}$
"], "matrix": ["0", "0", "1", 0, 0, 0, 0], "distractors": ["", "", "", "", "", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "resources": []}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}