// Numbas version: exam_results_page_options {"name": "Maria's copy of Domain of a trigonometric function (radians)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "extensions": [], "variable_groups": [{"name": "a", "variables": ["out", "inp", "sincos", "a", "b", "c", "d"]}, {"name": "b", "variables": ["inp2", "easytan", "a2", "d2", "out2"]}, {"name": "c", "variables": ["hardtan", "b2", "c2"]}], "advice": "

a) The sine and cosine functions accept any real number input. Regardless of the value of $\\simplify{{inp}}$, the function $\\simplify{{out}}$ will output a number. That is, the domain of $\\simplify{{out}}$ is the set of all real numbers. We can write this as 

\n

\\[\\text{dom}(\\simplify{{out}})=\\mathbb{R}\\]

\n

or as the open interval

\n

\\[\\text{dom}(\\simplify{{out}})=(-\\infty,\\infty).\\]

\n

\n

\n

b) Recall that $\\tan(x)=\\frac{\\sin(x)}{\\cos(x)}$ by definition and so is not defined when $\\cos(x)=0$ since division by zero is undefined. These $x$ values correspond to asymptotes. There are an infinite number of asymptotes to $y=\\tan(x)$, equally spaced with $\\pi$ radians between each adjacent asymptote. The asymptotes closest to the origin are $x=-\\dfrac{\\pi}{2}$ and $x=\\dfrac{\\pi}{2}$. We can write the set of asymptotes as $\\left\\{\\dfrac{\\pi}{2}+k\\pi:\\, k=\\ldots,-1,0,1,\\ldots\\right\\}$, or $\\left\\{\\dfrac{\\pi}{2}+k\\pi:\\, k\\in\\mathbb{Z}\\right\\}$ (where $\\mathbb{Z}$ is the set of integers). This means the domain of $\\tan(x)$ would be all the real numbers except for the asymptotes, which we can write as $\\mathbb{R}\\setminus \\left\\{\\dfrac{\\pi}{2}+k\\pi:\\, k\\in\\mathbb{Z}\\right\\}$, or $\\mathbb{R}\\setminus \\left\\{\\dfrac{\\pi}{2}+k\\pi:\\, k=\\ldots,-1,0,1,\\ldots\\right\\}$, or $\\left\\{x\\in\\mathbb{R}:\\,x\\ne \\frac{\\pi}{2}+k\\pi \\text{ for } k\\in \\mathbb{Z}\\right\\}$, or $\\left\\{x\\in\\mathbb{R}:\\,x\\ne \\frac{\\pi}{2}+k\\pi \\text{ for } k\\ldots,-1,0,1,\\ldots\\right\\}$.

\n

\n

\n

c) The tan function doesn't accept inputs of $\\dfrac{\\pi}{2}+k\\pi$ for $k\\in\\mathbb{Z}$. Since in the function {hardtan}, tan acts on $\\simplify[fractionNumbers]{{b2}{inp}+{c2}pi}$, we require that 

\n

\\[\\simplify[fractionNumbers]{{b2}{inp}+{c2}pi}\\ne \\dfrac{\\pi}{2}+k\\pi \\text{  for  }  k\\in\\mathbb{Z}.\\]

\n

To get a better description of the domain we rearrange for $\\simplify{{inp}}$: 

\n

$\\begin{align}&&\\simplify[fractionNumbers]{{b2}{inp}+{c2}pi}&\\ne \\dfrac{1}{2}\\pi+k\\pi \\text{  for  }  k\\in\\mathbb{Z}\\\\ &\\implies&\\simplify[fractionNumbers]{{b2}{inp}}&\\ne \\simplify[simplifyFractions,fractionNumbers]{{1/2-c2}pi}+k\\pi \\text{  for  }  k\\in\\mathbb{Z}\\\\ &\\implies&\\simplify{{inp}}&\\ne \\simplify[fractionNumbers,simplifyFractions]{{(1/2-c2)/b2}pi+{1/{b2}}pi*k} \\text{  for  }  k\\in\\mathbb{Z} \\\\&\\implies&\\simplify{{inp}}&\\ne \\left(\\simplify[fractionNumbers,simplifyFractions]{{(1/2-c2)/b2}}+\\simplify[fractionNumbers,simplifyFractions]{{1/b2}}k\\right)\\pi \\text{  for  }  k\\in\\mathbb{Z} \\end{align}$

\n

and so we can write the domain as $\\left\\{\\simplify{{inp}}\\in\\mathbb{R}:\\,\\simplify{{inp}}\\ne\\left(\\simplify[fractionNumbers,simplifyFractions]{{(1/2-c2)/b2}}+\\simplify[fractionNumbers,simplifyFractions]{{1/b2}}k\\right)\\pi \\text{  for  }  k\\in\\mathbb{Z} \\right\\}$.

\n

\n

\n

d) Recall that $\\sec(x)=\\dfrac{1}{\\cos(x)}$ by definition and so $\\sec(x)$ is not defined when $\\cos(x)=0$ since division by zero is undefined. Note this is the same condition that was on $\\tan(x)$ and so $\\sec(x)$ and $\\tan(x)$ have the same domain. In particular, for {seccsc}:

\n

$\\begin{align}\\text{dom}(\\simplify{{out2}})&=\\left\\{\\simplify{{inp2}}\\in\\mathbb{R}:\\,\\simplify{cos({inp2})}\\ne 0\\right\\}\\\\&=\\left\\{\\simplify{{inp2}}\\in\\mathbb{R}:\\,\\simplify{{inp2}}\\ne \\frac{\\pi}{2}+k\\pi \\text{ for } k\\in \\mathbb{Z}\\right\\}\\end{align}$

\n

d) Note, $\\csc$ is also denoted $\\text{cosec}$ by some people. Recall that $\\csc(x)=\\dfrac{1}{\\sin(x)}$ by definition and so $\\csc(x)$ is not defined when $\\sin(x)=0$ since division by zero is undefined. In particular, for {seccsc}:

\n

$\\begin{align}\\text{dom}(\\simplify{{out2}})&=\\left\\{\\simplify{{inp2}}\\in\\mathbb{R}:\\,\\simplify{sin({inp2})}\\ne 0\\right\\}\\\\&=\\left\\{\\simplify{{inp2}}\\in\\mathbb{R}:\\,\\simplify{{inp2}}\\ne k\\pi \\text{ for } k\\in \\mathbb{Z}\\right\\}\\end{align}$

\n

\n

e) Recall that $\\cot(\\theta)=\\dfrac{\\cos(\\theta)}{\\sin(\\theta)}$ by definition and so $\\cot(\\theta)$ is not defined when $\\sin(\\theta)=0$ since division by zero is undefined. In particular, for $f(\\theta)=\\simplify[fractionNumbers]{{b2}cot(theta)+{a2}}$:

\n

$\\begin{align}\\text{dom}(f)&=\\left\\{\\theta\\in\\mathbb{R}:\\,\\sin(\\theta)\\ne 0\\right\\}\\\\&=\\left\\{\\theta\\in\\mathbb{R}:\\,\\theta\\ne k\\pi \\text{ for } k\\in \\mathbb{Z}\\right\\}\\end{align}$

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

Multiple choice questions. Given randomised trig functions select the possible ways of writing the domain of the function.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"out": {"templateType": "anything", "description": "", "name": "out", "group": "a", "definition": "expression(random('f','h','g','p','q','y'))"}, "a2": {"templateType": "anything", "description": "", "name": "a2", "group": "b", "definition": "random(-12..12 except 0)"}, "easytan": {"templateType": "anything", "description": "", "name": "easytan", "group": "b", "definition": "random(['\\$\\\\simplify{{out2}({inp2})={a2}tan({inp2})+{d2}}\\$','\\$\\\\simplify{{out2}({inp2})=tan({inp2})+{d2}}\\$','\\$\\\\simplify{{out2}({inp2})={a2}tan({inp2})}\\$'])"}, "d2": {"templateType": "anything", "description": "", "name": "d2", "group": "b", "definition": "random(-12..12 except 0)"}, "c2": {"templateType": "anything", "description": "

expression(random(['pi/3','pi/2','pi/4','pi/6','-pi/3','-pi/2','-pi/4','-pi/6']))

", "name": "c2", "group": "c", "definition": "random([1/3,1/8,1/4,1/6,1,1/12])"}, "sincos": {"templateType": "anything", "description": "", "name": "sincos", "group": "a", "definition": "random(['\\$\\\\simplify{{out}({inp})={a}sin({b}{inp}+{c})+{d}}\\$','\\$\\\\simplify{{out}({inp})=sin({b}{inp}+{c})+{d}}\\$','\\$\\\\simplify{{out}({inp})={a}sin({inp}+{c})+{d}}\\$','\\$\\\\simplify{{out}({inp})={a}sin({b}{inp})+{d}}\\$','\\$\\\\simplify{{out}({inp})={a}sin({b}{inp}+{c})}\\$','\\$\\\\simplify{{out}({inp})=sin({b}{inp}+{c})}\\$','\\$\\\\simplify{{out}({inp})={a}sin({b}{inp})}\\$','\\$\\\\simplify{{out}({inp})={a}sin({inp})+{d}}\\$',\n'\\$\\\\simplify{{out}({inp})={a}cos({b}{inp}+{c})+{d}}\\$','\\$\\\\simplify{{out}({inp})=cos({b}{inp}+{c})+{d}}\\$','\\$\\\\simplify{{out}({inp})={a}cos({inp}+{c})+{d}}\\$','\\$\\\\simplify{{out}({inp})={a}cos({b}{inp})+{d}}\\$','\\$\\\\simplify{{out}({inp})={a}cos({b}{inp}+{c})}\\$','\\$\\\\simplify{{out}({inp})=cos({b}{inp}+{c})}\\$','\\$\\\\simplify{{out}({inp})={a}cos({b}{inp})}\\$','\\$\\\\simplify{{out}({inp})={a}cos({inp})+{d}}\\$'])"}, "inp": {"templateType": "anything", "description": "", "name": "inp", "group": "a", "definition": "expression(random('x','r','s','t','w'))"}, "select": {"templateType": "anything", "description": "", "name": "select", "group": "Ungrouped variables", "definition": "random(0,1)"}, "seccsc": {"templateType": "anything", "description": "", "name": "seccsc", "group": "Ungrouped variables", "definition": "['\\$\\\\simplify{{out2}({inp2})={b}csc({inp2})+{c}}\\$', '\\$\\\\simplify{{out2}({inp})={b}sec({inp2})+{c}}\\$'][select]"}, "c": {"templateType": "anything", "description": "", "name": "c", "group": "a", "definition": "random(-12..12 except 0)"}, "a": {"templateType": "anything", "description": "", "name": "a", "group": "a", "definition": "random(-12..12 except 0)"}, "b2": {"templateType": "anything", "description": "", "name": "b2", "group": "c", "definition": "random(2,3,4,1/2,1/3,1/4)"}, "inp2": {"templateType": "anything", "description": "", "name": "inp2", "group": "b", "definition": "expression(random('x','r','s','t','w'))"}, "b": {"templateType": "anything", "description": "", "name": "b", "group": "a", "definition": "random(-12..12 except 0)"}, "hardtan": {"templateType": "anything", "description": "", "name": "hardtan", "group": "c", "definition": "random(['\\$\\\\simplify[basic,fractionNumbers]{{out}({inp})={a2}tan({b2}{inp}+{c2}pi)+{d2}}\\$','\\$\\\\simplify[basic,fractionNumbers]{{out}({inp})=tan({b2}{inp}+{c2}pi)+{d2}}\\$','\\$\\\\simplify[basic,fractionNumbers]{{out}({inp})={a2}tan({b2}{inp}+{c2}pi)}\\$'])"}, "out2": {"templateType": "anything", "description": "", "name": "out2", "group": "b", "definition": "expression(random('f','h','g','p','q','y'))"}, "d": {"templateType": "anything", "description": "", "name": "d", "group": "a", "definition": "random(-12..12 except 0)"}}, "rulesets": {}, "preamble": {"css": "", "js": ""}, "tags": [], "name": "Maria's copy of Domain of a trigonometric function (radians)", "parts": [{"displayColumns": "1", "unitTests": [], "maxAnswers": 0, "prompt": "

Which of the following represents the domain of {sincos}?

", "warningType": "none", "minAnswers": 0, "variableReplacements": [], "displayType": "checkbox", "useCustomName": false, "distractors": ["", "", "", "", "", ""], "showCellAnswerState": true, "showCorrectAnswer": true, "shuffleChoices": true, "choices": ["

$\\mathbb{R}$

", "

$(-\\infty,\\infty)$

", "

$[\\var{d},\\infty)$

", "

$[\\var{a},\\infty)$

", "

$\\left[\\simplify{{-c}/{d}},\\infty\\right)$

", "

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

"], "showFeedbackIcon": true, "type": "m_n_2", "customMarkingAlgorithm": "", "scripts": {}, "customName": "", "matrix": ["1", "1", 0, 0, 0, 0], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "marks": 0, "minMarks": 0}, {"displayColumns": "1", "unitTests": [], "maxAnswers": 0, "prompt": "

Which of the following represents the domain of {easytan}?

", "warningType": "none", "minAnswers": 0, "variableReplacements": [], "displayType": "checkbox", "useCustomName": false, "distractors": ["", "", "", "", "", "", ""], "showCellAnswerState": true, "showCorrectAnswer": true, "shuffleChoices": true, "choices": ["

$\\mathbb{R}$

", "

$\\left\\{\\simplify{{inp2}}\\in\\mathbb{R}:\\,\\simplify{{inp2}}\\ne \\frac{\\pi}{2}+k\\pi \\text{ for } k\\in \\mathbb{Z}\\right\\}$

", "

$\\left\\{\\simplify{{inp2}}\\in\\mathbb{R}:\\,\\simplify{{inp2}}\\ne \\frac{\\pi}{2}+k\\pi \\text{ for } k=\\ldots, -1,0,1,\\ldots\\right\\}$

", "

$\\mathbb{R}\\setminus\\left\\{\\frac{\\pi}{2}+k\\pi:\\, k\\in \\mathbb{Z}\\right\\}$

", "

$\\left\\{\\simplify{{inp2}}\\in\\mathbb{R}:\\,\\simplify{{inp2}}\\ne \\pm\\frac{\\pi}{2}\\right\\}$

", "

$\\{\\simplify{{inp2}}\\in\\mathbb{R}:\\,\\simplify{{inp2}>={d2}}\\}$

", "

$\\mathbb{R}\\setminus\\left\\{k\\pi:\\, k\\in \\mathbb{Z}\\right\\}$

"], "showFeedbackIcon": true, "type": "m_n_2", "customMarkingAlgorithm": "", "scripts": {}, "customName": "", "matrix": ["0", "1", "1", "1", 0, 0, 0], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "marks": 0, "minMarks": 0}], "statement": "

Given the real functions below (which are defined in terms of radians), you should be able to determine their domain. 

\n

", "ungrouped_variables": ["seccsc", "select"], "type": "question", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}