// Numbas version: exam_results_page_options {"name": "NC Math 3 Joshua's copy of 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": "NC Math 3 Joshua's copy of Domain of a piecewise function", "tags": [], "metadata": {"description": "

Multiple choice question. Given a randomised polynomial select the possible ways of writing the domain of the function.

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

Given the real function below, you should be able to determine its domain.

\n

\\simplify{f}(\\simplify{t})=\\left\\{\\begin{align}&\\simplify{0},&& \\text{ for } \\simplify{x}< \\var{b0}, \\\\&\\simplify{{a}x+{b}},&& \\text{ for } \\var{b0}\\leq \\simplify{x}< \\var{b1},\\\\ &\\simplify{{c}x^2+{d}},&& \\text{ for } \\var{b1}\\leq\\simplify{x}< \\var{b2},\\end{align}\\right.

The function $\\simplify{{out}}$ is a piecewise function. It is defined on different parts (or pieces) of its domain by different (sub)functions.

\n

\n

In particular, the pieces of the domain are the intervals

\n
\n
• $\\simplify{{inp}}< \\var{b0}$
• \n
• $\\var{b0}\\leq \\simplify{{inp}}\\leq \\var{b1}$,
• \n
• $\\var{b2}\\leq\\simplify{{inp}}< \\var{b3}$,
• \n
• $\\var{b3}<\\simplify{{inp}}\\leq \\var{b4}$ and
• \n
• $\\simplify{{inp}}\\ge\\var{b5}$.
• \n
\n

and their corresponding (sub)functions are given by the expressions

\n
\n
• $\\simplify{{p0}}$
• \n
• $\\simplify{{p1}}$
• \n
• $\\simplify{{p2}}$
• \n
• $\\simplify{{p3}}$
• \n
• $\\simplify{{p4}}$
• \n
\n

\n

In 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": [], "variables": {"Input2": {"name": "Input2", "group": "Ungrouped variables", "definition": "random(b1+1..b2)", "description": "", "templateType": "anything"}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "b0+2", "description": "", "templateType": "anything"}, "Input1": {"name": "Input1", "group": "Ungrouped variables", "definition": "b0+1", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "b0": {"name": "b0", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "Answer2": {"name": "Answer2", "group": "Ungrouped variables", "definition": "{c}*({b2}+4)^2+{d}", "description": "", "templateType": "anything"}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "b1+3", "description": "", "templateType": "anything"}, "Answer1": {"name": "Answer1", "group": "Ungrouped variables", "definition": "{a}*{Input1}+{b}", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(2..8)", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-2..2 except 0)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "d", "b0", "b1", "b2", "Answer1", "Answer2", "Input1", "Input2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

What is the value of $f(\\var{Input1})$? [[0]]

\n

What is the value of $f(\\var{Input2})$? [[1]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{Answer1}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{Answer2}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": []}], "sortAnswers": false}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Terry Young", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3130/"}, {"name": "Joshua Calcutt", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3267/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Terry Young", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3130/"}, {"name": "Joshua Calcutt", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3267/"}]}