// Numbas version: exam_results_page_options {"name": "Domain of a log function", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "metadata": {"description": "

Given a randomised log function select the possible ways of writing the domain of the function.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "ungrouped_variables": ["out", "inp", "num", "n", "c", "rat", "a", "b", "base", "d"], "functions": {}, "extensions": [], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "statement": "

Given the real functions below, you should be able to determine their domains. 

", "preamble": {"js": "", "css": ""}, "tags": [], "parts": [{"showFeedbackIcon": true, "marks": 0, "scripts": {}, "prompt": "

Give an example of a real number that is not in the domain of the function

\n

\\[f(x)=\\log(x).\\]

\n

 [[0]] $\\notin \\text{dom}(f)$

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

$t>\\var{c[0]}$

", "

$t\\ge \\var{c[0]}$

", "

$t<\\var{c[0]}$

", "

$t\\le \\var{c[0]}$

", "

$t>0$

", "

$t\\ne0$

"], "maxMarks": 0, "scripts": {}, "minMarks": 0, "prompt": "

Given the function \\[g(t)=\\log_{\\var{base}}(\\simplify{t-{c[0]}}),\\] what do we require of $t$ so that $g(t)$ is defined?

\n

", "displayType": "radiogroup", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "1_n_2", "shuffleChoices": true, "showFeedbackIcon": true, "marks": 0, "displayColumns": "1", "matrix": ["1", 0, 0, 0, 0, 0], "distractors": ["", "", "", "", "", ""], "variableReplacements": []}, {"choices": ["

$[\\var{c[3]},\\infty)$

", "

$(0,\\infty)$

", "

$\\{s\\in\\mathbb{R}:\\, s\\ge 10\\}$

", "

$\\{s\\in\\mathbb{R}:\\, s> \\simplify[fractionNumbers]{{-c[2]/c[1]}}\\}$ $\\{s\\in\\mathbb{R}:\\, s< \\simplify[fractionNumbers]{{-c[2]/c[1]}}\\}$

", "

$\\{s\\in\\mathbb{R}:\\, s< \\var{c[3]}\\}$

", "

$\\{s\\in\\mathbb{R}:\\, s< \\simplify[fractionNumbers]{{-c[2]/c[1]}}\\}$ $\\{s\\in\\mathbb{R}:\\, s> \\simplify[fractionNumbers]{{-c[2]/c[1]}}\\}$

"], "maxMarks": 0, "scripts": {}, "minMarks": 0, "prompt": "

Given the function \\[h(s)=\\simplify{{c[0]}log({c[1]}s+{c[2]})+{c[3]}},\\] which of the following represents the domain of $h$?

", "displayType": "radiogroup", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "1_n_2", "shuffleChoices": false, "showFeedbackIcon": true, "marks": 0, "displayColumns": "1", "matrix": ["0", 0, 0, "1", 0, 0], "distractors": ["", "", "", "", "", ""], "variableReplacements": []}, {"choices": ["

$\\{\\simplify{{inp}}\\in\\mathbb{R}:\\,\\simplify{{inp}<{a}} \\text{ or } \\simplify{{inp}>{b}}\\}$

", "

$\\{\\simplify{{inp}}\\in\\mathbb{R}:\\,\\simplify{{a}<{inp} <{b}}\\}$

", "

$\\{\\simplify{{inp}}\\in\\mathbb{R}:\\,\\simplify{{inp}>{a*b}}\\}$

", "

$\\{\\simplify{{inp}}\\in\\mathbb{R}:\\,\\simplify{{inp}>0}\\}$

", "

$\\{\\simplify{{inp}}\\in\\mathbb{R}:\\,\\simplify{{min([a+b,a*b])}<{inp} <{max([a+b,a*b])}}\\}$

"], "maxMarks": 0, "scripts": {}, "minMarks": 0, "prompt": "

Given the function \\[\\simplify{{out}({inp})=ln({inp}^2-{a+b}{inp}+{a*b})},\\] which of the following represents the domain of $\\simplify{{out}}$?

\n

", "displayType": "radiogroup", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "1_n_2", "shuffleChoices": true, "showFeedbackIcon": true, "marks": 0, "displayColumns": "1", "matrix": ["1", 0, 0, 0, 0], "distractors": ["", "", "", "", ""], "variableReplacements": []}, {"choices": ["

$\\{\\simplify{{inp}}\\in\\mathbb{R}:\\,\\simplify{{inp}<0} \\text{ or } \\simplify{{inp}>{d}}\\}$

", "

$\\{\\simplify{{inp}}\\in\\mathbb{R}:\\,\\simplify{0<{inp} <{d}}\\}$

", "

$\\{\\simplify{{inp}}\\in\\mathbb{R}:\\,\\simplify{{inp}>{d}}\\}$

", "

$\\{\\simplify{{inp}}\\in\\mathbb{R}:\\,\\simplify{{inp}>0}\\}$

", "

$\\{\\simplify{{inp}}\\in\\mathbb{R}:\\,\\simplify{{-d}<{inp} <{d}}\\}$

"], "maxMarks": 0, "scripts": {}, "minMarks": 0, "prompt": "

Given the function \\[\\simplify{{out}({inp})=ln(-{inp}^2+{d}{inp})},\\] which of the following represents the domain of $\\simplify{{out}}$?

\n

", "displayType": "radiogroup", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "1_n_2", "shuffleChoices": true, "showFeedbackIcon": true, "marks": 0, "displayColumns": "1", "matrix": ["0", "1", 0, 0, 0], "distractors": ["", "", "", "", ""], "variableReplacements": []}], "rulesets": {}, "variables": {"out": {"templateType": "anything", "description": "", "definition": "expression(random('f','h','g','p','q','y'))", "group": "Ungrouped variables", "name": "out"}, "a": {"templateType": "anything", "description": "", "definition": "random(-12..-1)", "group": "Ungrouped variables", "name": "a"}, "rat": {"templateType": "anything", "description": "", "definition": "if(n=3,'\\\\[\\\\simplify{{out}({inp})=({num[0]}{inp}+{num[1]})/(({inp}-{c[0]})({inp}-{c[1]})*({inp}-{c[2]}))}\\\\]',\nif(n=2,'\\\\[\\\\simplify{{out}({inp})=({num[0]}{inp}+{num[1]})/(({inp}-{c[0]})({inp}-{c[1]}))}\\\\]',\n'\\\\[\\\\simplify{{out}({inp})=({num[0]}{inp}+{num[1]})/(({inp}-{c[0]})({inp}-{c[1]})*({inp}-{c[2]})*({inp}-{c[3]}))}\\\\]'))\n \n \n", "group": "Ungrouped variables", "name": "rat"}, "d": {"templateType": "anything", "description": "", "definition": "random(1..12)", "group": "Ungrouped variables", "name": "d"}, "b": {"templateType": "anything", "description": "", "definition": "a+random(1..12)", "group": "Ungrouped variables", "name": "b"}, "c": {"templateType": "anything", "description": "", "definition": "shuffle(-12..12 except 0)", "group": "Ungrouped variables", "name": "c"}, "n": {"templateType": "anything", "description": "", "definition": "random(2..4)", "group": "Ungrouped variables", "name": "n"}, "num": {"templateType": "anything", "description": "", "definition": "[random(-12..12),random(-12..12 except 0)]", "group": "Ungrouped variables", "name": "num"}, "base": {"templateType": "anything", "description": "

base

", "definition": "random(2..12 except 10)", "group": "Ungrouped variables", "name": "base"}, "inp": {"templateType": "anything", "description": "", "definition": "expression(random('x','r','s','t','w'))", "group": "Ungrouped variables", "name": "inp"}}, "advice": "

a) The domain of $f(x)=\\log(x)$ is the set of all positive numbers, i.e. $\\{x\\in\\mathbb{R}:\\,x>0\\}$ or in interval notation, $(0,\\infty)$. This means that the log of zero, or any negative number is not defined. This is true regardless of the base of the logarithm. 

\n

\n

b) For a function such as $g(t)=\\log_{\\var{base}}(\\simplify{t-{c[0]}})$ we require that log acts on a positive number, that is, $\\simplify{t-{c[0]}>0}$. Rearranging this inequality for $t$ gives $\\simplify{t>{c[0]}}$. Therefore, $\\text{dom}(g)=\\{t\\in\\mathbb{R}:\\,\\simplify{t>{c[0]}}\\}$.

\n

\n

c) For a function such as $h(s)=\\simplify{{c[0]}log({c[1]}s+{c[2]})+{c[3]}}$ we require that log acts on a positive number, that is, $\\simplify{{c[1]}s+{c[2]}>0}$. Rearranging this inequality for $s$ gives $s> \\simplify[fractionNumbers]{{-c[2]/c[1]}}$ $s< \\simplify[fractionNumbers]{{-c[2]/c[1]}}$. Therefore, $\\text{dom}(h)=\\{s\\in\\mathbb{R}:\\, s> \\simplify[fractionNumbers]{{-c[2]/c[1]}}\\}$ $\\text{dom}(h)=\\{s\\in\\mathbb{R}:\\, s< \\simplify[fractionNumbers]{{-c[2]/c[1]}}\\}$.

\n

\n

d) For a function such as $\\simplify{{out}({inp})=ln({inp}^2-{a+b}{inp}+{a*b})}$ we require that log acts on a positive number, that is, $\\simplify{{inp}^2-{a+b}{inp}+{a*b}>0}$. Notice $\\simplify{{inp}^2-{a+b}{inp}+{a*b}=({inp}-{a})({inp}-{b})}$ is positive when $\\simplify{({inp}-{a})}$ and $\\simplify{({inp}-{b})}$ are both negative, or both positive. That is, we require $\\simplify{{inp}<{a}}$ or $\\simplify{{inp}>{b}}$. Therefore, $\\text{dom}(\\simplify{{out}})=\\{\\simplify{{inp}}\\in\\mathbb{R}:\\,\\simplify{{inp}<{a}} \\text{ or } \\simplify{{inp}>{b}}\\}$.

\n

\n

e) Note $\\ln$ is just the notation for $\\log_e$. For a function such as $\\simplify{{out}({inp})=ln(-{inp}^2+{d}{inp})}$ we require that log acts on a positive number, that is, $\\simplify{-{inp}^2+{d}{inp}>0}$. Notice $\\simplify{-{inp}^2+{d}{inp}={inp}({d}-{inp})}$ is positive when $\\simplify{{inp}}$ and $\\simplify{({d}-{inp})}$ are both negative, or both positive. That is, we require $\\simplify{0<{inp}<{d}}$. Therefore, $\\text{dom}(\\simplify{{out}})=\\{\\simplify{{inp}}\\in\\mathbb{R}:\\,\\simplify{0<{inp}<{d}}\\}$.

\n

\n

", "name": "Domain of a log function", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}