Calculate the gradient, $m$, of the straight line between these two points.

\n

$m=$ [[0]]

\n

", "marks": 0, "useCustomName": false, "type": "gapfill", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "scripts": {}, "variableReplacements": [], "customName": ""}, {"showCorrectAnswer": true, "unitTests": [], "gaps": [{"showFeedbackIcon": false, "showCorrectAnswer": true, "unitTests": [], "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "notationStyles": ["plain", "en", "si-en"], "maxValue": "c", "type": "numberentry", "minValue": "c", "showFractionHint": true, "marks": 1, "useCustomName": false, "mustBeReduced": false, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "scripts": {}, "variableReplacements": [], "customName": "", "mustBeReducedPC": 0, "allowFractions": false}], "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "sortAnswers": false, "prompt": "

Use this gradient and the coordinates of the points to calculate the $y$-intercept, $c$.

\n

$c=$ [[0]]

", "marks": 0, "useCustomName": false, "type": "gapfill", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "scripts": {}, "variableReplacements": [], "customName": ""}, {"showCorrectAnswer": true, "unitTests": [], "gaps": [{"vsetRange": [0, 1], "showCorrectAnswer": true, "unitTests": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "showPreview": true, "type": "jme", "checkingAccuracy": 0.001, "failureRate": 1, "variableReplacements": [], "customName": "", "valuegenerators": [{"value": "", "name": "x"}], "answer": "{m}*x+{c}", "answerSimplification": "fractionNumbers", "showFeedbackIcon": false, "notallowed": {"strings": ["c", "m"], "partialCredit": 0, "message": "

You must input your answer in the form y = mx +c where m and c are numbers.

", "showStrings": false}, "checkVariableNames": true, "useCustomName": false, "checkingType": "absdiff", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "scripts": {}, "vsetRangePoints": 5}], "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "sortAnswers": false, "prompt": "

Give the equation of the straight line through these points in the form $y=mx+c$.

\n

$\\displaystyle y=$ [[0]]

", "marks": 0, "useCustomName": false, "type": "gapfill", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "scripts": {"mark": {"order": "after", "script": "this.question.lines.l.setAttribute({strokeColor: this.credit==1 ? 'green' : 'red'});\nthis.question.lines.c.setAttribute({visible: this.credit==1});\n"}}, "variableReplacements": [], "customName": ""}], "variablesTest": {"maxRuns": 100, "condition": "\n"}, "rulesets": {}, "tags": [], "ungrouped_variables": ["xa", "xb", "ya", "yb", "m", "c"], "variable_groups": [], "metadata": {"description": "

Use two points on a line graph to calculate the gradient and $y$-intercept and hence the equation of the straight line running through both points.

\n

The answer box for the third part plots the function which allows the student to check their answer against the graph before submitting.

\n

This particular example has a positive gradient.

We find the equation of a straight line passing through two points by finding the gradient and the $y$-intercept of the line.

\n

#### (a)

\n

We can find the gradient ($m$) using the points $A = (x_1,y_1)=(\\var{xa},\\var{ya})$ and $B = (x_2,y_2)=(\\var{xb},\\var{yb})$.

\n

As the definition of gradient is the ratio of vertical change ($y_2-y_1$) to horizontal change ($x_2-x_1$).

\n

\\begin{align}
m &= \\frac{y_2-y_1}{x_2-x_1} \\\0.5em] &= \\frac{\\var{yb}-\\var{ya}}{\\var{xb}-\\var{xa}} \\\\[0.5em] &= \\frac{\\var{yb-ya}}{\\var{xb-xa}} \\\\[0.5em] &= \\var{m} \\end{align} \n \n #### (b) \n Rearranging the equation y=mx+c and substituting either of the points gives \n \\[c = y_1-mx_1 \\quad \\mathrm{or} \\quad c = y_2-mx_2 \\,\\text{.} \

\n

\n

For example, using point $A$:

\n

\\\begin{align} c &= y_1-mx_1 \\\\ &= \\var{ya}-\\var[fractionnumbers]{m}\\times\\var{xa} \\\\ & = \\simplify[fractionnumbers]{{ya-m*xa}}\\text{.} \\end{align} \

\n

\n

Similarly, we could have obtained the same value using point $B$:

\n

\\\begin{align} c &= y_2-mx_2 \\\\ &= \\var{yb}-\\var[fractionnumbers]{m}\\times\\var{xb} \\\\ & = \\simplify[fractionnumbers]{{yb-m*xb}}\\text{.} \\end{align} \

\n

\n

#### c)

\n

We can now substitute these values for $m$ and $c$ into $y=mx+c$  to get:

\n

\$y=\\simplify[!noLeadingMinus,fractionNumbers,unitFactor]{{m} x+ {c}}\\text{.}\$

\n

The green line drawn on the graph represents the above line equation.

\n

{correctPoints()}

", "statement": "

In this question we will identify the equation of the straight line passing through points  $A=(\\var{xa},\\var{ya})$ and  $B=(\\var{xb},\\var{yb})$ in the form $y = mx + c$.

\n

{plotPoints()}

", "preamble": {"js": "", "css": ""}, "functions": {"correctPoints": {"parameters": [], "language": "javascript", "definition": "//point coordinate variables\nvar xa = Numbas.jme.unwrapValue(scope.variables.xa);\nvar xb = Numbas.jme.unwrapValue(scope.variables.xb);\nvar ya = Numbas.jme.unwrapValue(scope.variables.ya);\nvar yb = Numbas.jme.unwrapValue(scope.variables.yb);\nvar m = Numbas.jme.unwrapValue(scope.variables.m);\nvar c = Numbas.jme.unwrapValue(scope.variables.c);\n\n//make board\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[Math.min(-1,xa-2),Math.max(2,yb+2,c+1),Math.max(2,xb+2),Math.min(-1,ya-2,c-1)],grid: true});\nvar board = div.board;\nquestion.board = board;\n\n\n//points (with nice colors)\nvar a = board.create('point',[xa,ya],{name: 'A', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow', fixed: true, showInfobox: true});\nvar b = board.create('point',[xb,yb],{name: 'B', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow',fixed: true, showInfobox: true});\n\n\n//ans(was tree) is defined at the end and nscope looks important\n//but they're both variables\n\nvar correct_line = board.create('functiongraph',[function(x){ return m*x+c},-22,22], {strokeColor:\"green\",setLabelText:'mx+c',visible: true, strokeWidth: 4, highlightStrokeColor: 'green'} )\n\n\n\n$('body').on('question-html-attached',function(e,question,qd) {\nko.computed(function(){\n//define ans as this \ncorrect_line.updateCurve();\nboard.update();\n});\n });\n\n\nreturn div;", "type": "html"}, "plotPoints": {"parameters": [], "language": "javascript", "definition": "//point coordinate variables\nvar xa = Numbas.jme.unwrapValue(scope.variables.xa);\nvar xb = Numbas.jme.unwrapValue(scope.variables.xb);\nvar ya = Numbas.jme.unwrapValue(scope.variables.ya);\nvar yb = Numbas.jme.unwrapValue(scope.variables.yb);\nvar m = Numbas.jme.unwrapValue(scope.variables.m);\nvar c = Numbas.jme.unwrapValue(scope.variables.c);\n\n//make board\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[Math.min(-1,xa-2),Math.max(2,yb+2,c+1),Math.max(2,xb+2),Math.min(-1,ya-2,c-1)],grid: true});\nvar board = div.board;\nquestion.board = board;\n\n//points (with nice colors)\nvar a = board.create('point',[xa,ya],{name: 'A', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow', fixed: true, showInfobox: true});\nvar b = board.create('point',[xb,yb],{name: 'B', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow',fixed: true, showInfobox: true});\n\n\n//ans(was tree) is defined at the end and nscope looks important\n//but they're both variables\n var ans;\n var nscope = new Numbas.jme.Scope([scope,{variables:{x:new Numbas.jme.types.TNum(0)}}]);\n//this is the beating heart of whatever plots the function,\n//I've changed this from being curve to functiongraph\n var line = board.create('functiongraph',[function(x){\nif(ans) {\n try {\nnscope.variables.x.value = x;\n var val = Numbas.jme.evaluate(ans,nscope).value;\n return val;\n }\n catch(e) {\nreturn 13;\n }\n}\nelse\n return 13;\n },-12,12]\n , {strokeColor:\"blue\",strokeWidth: 4} );\n \nvar correct_line = board.create('functiongraph',[function(x){ return m*x+c},-22,22], {strokeColor:\"green\",setLabelText:'mx+c',visible: false, strokeWidth: 4, highlightStrokeColor: 'green'} )\n\nquestion.lines = {\n l:line, c:correct_line\n}\n\n$('body').on('question-html-attached',function(e,question,qd) {\nko.computed(function(){\nvar expr = question.parts[2].gaps[0].display.studentAnswer();\n\n//define ans as this \ntry {\n ans = Numbas.jme.compile(expr,scope);\n}\ncatch(e) {\n ans = null;\n}\nline.updateCurve();\ncorrect_line.updateCurve();\nboard.update();\n});\n });\n\n\nreturn div;", "type": "html"}}, "type": "question"}, {"name": "Maria's copy of Function Quiz Q5", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Joshua Calcutt", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3267/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}], "variables": {"b2": {"definition": "b1+3", "templateType": "anything", "name": "b2", "description": "", "group": "Ungrouped variables"}, "b1": {"definition": "b0+2", "templateType": "anything", "name": "b1", "description": "", "group": "Ungrouped variables"}, "b0": {"definition": "random(1..3)", "templateType": "anything", "name": "b0", "description": "", "group": "Ungrouped variables"}, "Input2": {"definition": "{b2}+4", "templateType": "anything", "name": "Input2", "description": "", "group": "Ungrouped variables"}, "Input1": {"definition": "b0+1", "templateType": "anything", "name": "Input1", "description": "", "group": "Ungrouped variables"}, "Answer1": {"definition": "{a}*{Input1}+{b}", "templateType": "anything", "name": "Answer1", "description": "", "group": "Ungrouped variables"}, "d": {"definition": "random(2..8)", "templateType": "anything", "name": "d", "description": "", "group": "Ungrouped variables"}, "c": {"definition": "random(-2..2 except 0)", "templateType": "anything", "name": "c", "description": "", "group": "Ungrouped variables"}, "Answer2": {"definition": "{c}*({b2}+4)^2+{d}", "templateType": "anything", "name": "Answer2", "description": "", "group": "Ungrouped variables"}, "b": {"definition": "random(1..3)", "templateType": "anything", "name": "b", "description": "", "group": "Ungrouped variables"}, "a": {"definition": "random(2..5)", "templateType": "anything", "name": "a", "description": "", "group": "Ungrouped variables"}}, "parts": [{"showFeedbackIcon": true, "prompt": "

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

\n

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

", "variableReplacements": [], "type": "gapfill", "scripts": {}, "showCorrectAnswer": true, "marks": 0, "gaps": [{"showFeedbackIcon": true, "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "type": "jme", "checkVariableNames": false, "vsetRangePoints": 5, "checkingType": "absdiff", "variableReplacementStrategy": "originalfirst", "marks": 1, "answer": "{Answer1}", "unitTests": [], "customMarkingAlgorithm": "", "showPreview": true, "checkingAccuracy": 0.001, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "vsetRange": [0, 1], "failureRate": 1}, {"showFeedbackIcon": true, "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "type": "jme", "checkVariableNames": false, "vsetRangePoints": 5, "checkingType": "absdiff", "variableReplacementStrategy": "originalfirst", "marks": 1, "answer": "{Answer2}", "unitTests": [], "customMarkingAlgorithm": "", "showPreview": true, "checkingAccuracy": 0.001, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "vsetRange": [0, 1], "failureRate": 1}], "customMarkingAlgorithm": "", "sortAnswers": false, "unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst"}], "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"js": "", "css": ""}, "statement": "

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

\n

\\simplify{f}(\\simplify{x})=\\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.

", "ungrouped_variables": ["a", "b", "c", "d", "b0", "b1", "b2", "Answer1", "Answer2", "Input1", "Input2"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": ""}, "functions": {}, "advice": "", "tags": [], "type": "question"}, {"name": "Maria's copy of JD's copy of Polynomial Graph 1", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Adrian Jannetta", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/164/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}, {"name": "JD Ichwan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3389/"}], "rulesets": {}, "statement": "

Select the true statements about the following graph.

\n

{geogebra_applet('https://ggbm.at/aXxv2ECN', defs, [])}

", "variables": {"defs": {"name": "defs", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "[\n ['a',a],\n ['b',b],\n ['c',c],\n ['n',n]\n]"}, "b": {"name": "b", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(-3..3#0.5)"}, "a": {"name": "a", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(-3..3#0.5)"}, "y2": {"name": "y2", "templateType": "anything", "description": "

y2

", "group": "Ungrouped variables", "definition": "n*((-b)^3)/3 + 0.5*(a+b)*(-b)^2+(a*b)*(-b)+c"}, "y1": {"name": "y1", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "n*((-a)^3)/3 + 0.5*(a+b)*(-a)^2+(a*b)*(-a)+c"}, "n": {"name": "n", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(-1,1)"}, "c": {"name": "c", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(-3..3#0.5)"}, "D": {"name": "D", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "(a+b)^2 - 4*a*b*n"}}, "variablesTest": {"maxRuns": "200", "condition": "a<>b and abs(b-a)>1 and abs(y1)<10 and abs(y2)<10 and D>0"}, "ungrouped_variables": ["a", "b", "c", "defs", "D", "n", "y1", "y2"], "preamble": {"js": "", "css": ""}, "tags": [], "variable_groups": [], "functions": {"graph": {"parameters": [], "language": "jme", "definition": "geogebra_applet('https://ggbm.at/aXxv2ECN', defs, [])", "type": "html"}}, "advice": "

This is a function.  The graph passes the vertical line test, because a vertical line would touch only one point on the curve.  That means each input ($x$-axis, domain) goes to one output ($y$-axis, range).

\n

This is a many-to-one map.  Some of the range values can be obtained from different domain values.

\n

This function does not have an inverse function.  The graph fails the horizontal line test, because a horizontal line would make contact with more than one point on the curve.

", "parts": [{"matrix": ["-1", "1", "-1", "1", "-1", "-1", "1"], "showCorrectAnswer": true, "distractors": ["", "", "", "", "", "", ""], "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "type": "m_n_2", "warningType": "none", "prompt": "
\n
• You may select more than one option.
• \n
• You can assume the visible graph represents the entire curve
• \n
", "marks": 0, "choices": ["

One-to-one map

", "

Many-to-one map

", "

One-to-many map

", "

This graph is a function.

", "

This graph is not  a function.

", "

Inverse function exists.

", "

Inverse function does not exist.

"], "minAnswers": "2", "displayType": "checkbox", "scripts": {}, "variableReplacements": [], "maxMarks": 0, "shuffleChoices": true, "maxAnswers": 0, "minMarks": 0, "displayColumns": 0}], "metadata": {"description": "

This uses an embedded Geogebra graph of a cubic polynomial with random coefficients set by NUMBAS.  Student has to decide what kind of map it represents and whether an inverse function exists.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question"}, {"name": "Maria's copy of Solving quadratic equations 1(b)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}], "parts": [{"useCustomName": false, "prompt": "

Type in the greater of the two values that satisfies the equation. Input your answer correct to three decimal places.

\n

\$$x\$$ = [[0]]

\n

Type in the lesser of the two values that satisfies the equation. Input your answer correct to three decimal places.

\n

\$$x\$$ = [[1]]

The formula for solving a quadratic equation of the form  \$$ax^2+bx+c=0\$$  is given by

\n

\$$x=\\frac{-b\\pm \\sqrt{b^2-4ac}}{2a}\$$

\n

In this example  \$$a=\\var{a1},\\,\\,\\,b=\\var{b1}\$$  and  \$$c=\\var{c1}\$$

\n

\$$x=\\frac{-\\var{b1}\\pm \\sqrt{\\var{b1}^2-4\\times\\var{a1}\\times\\var{c1}}}{2\\times\\var{a1}}\$$

\n

\$$x=\\frac{-\\var{b1}\\pm \\sqrt{\\simplify{{b1}^2-4*{a1}*{c1}}}}{\\simplify{2*{a1}}}\$$

\n

\$$x=\\simplify{(-{b1}+ ({b1}^2-4*{a1}*{c1})^0.5)/(2*{a1})}\$$   or   \$$x=\\simplify{(-{b1}- ({b1}^2-4*{a1}*{c1})^0.5)/(2*{a1})}\$$

", "functions": {}, "variable_groups": [], "variables": {"a1": {"description": "", "name": "a1", "templateType": "randrange", "definition": "random(1 .. 3#1)", "group": "Ungrouped variables"}, "b1": {"description": "", "name": "b1", "templateType": "randrange", "definition": "random(9 .. 16#1)", "group": "Ungrouped variables"}, "c1": {"description": "", "name": "c1", "templateType": "randrange", "definition": "random(1 .. 5#1)", "group": "Ungrouped variables"}}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Solving quadratic equations using a formula,

"}, "statement": "

There are two values that satisfy the quadratic function below when  \$$y=\\var{c1}\$$:

\n

\$$y=\\var{a1}x^2+\\var{b1}x\$$

", "rulesets": {}, "variablesTest": {"maxRuns": "1", "condition": "b1^2>4*a1*c1"}, "type": "question"}, {"name": "Maria's copy of Simon's copy of Inverse Functions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Katie Lester", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/586/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}], "metadata": {"description": "

Rearranging equations to change the subject

", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"customName": "", "prompt": "

$\\simplify{y={c[0]}x+{c[1]}}$

\n

$x=$ [[0]]

\n

", "showFeedbackIcon": true, "sortAnswers": false, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "adaptiveMarkingPenalty": 0, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "type": "gapfill", "scripts": {}, "gaps": [{"answer": "(y-{c[1]})/{c[0]}", "checkingType": "absdiff", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "checkVariableNames": true, "valuegenerators": [{"value": "", "name": "y"}], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "unitTests": [], "answerSimplification": "all", "type": "jme", "customName": "", "vsetRange": [0, 1], "showFeedbackIcon": true, "showPreview": true, "marks": "1", "vsetRangePoints": 5, "adaptiveMarkingPenalty": 0, "useCustomName": false, "failureRate": 1, "scripts": {}, "showCorrectAnswer": true}], "unitTests": [], "marks": 0, "showCorrectAnswer": true}, {"customName": "", "prompt": "

$\\simplify{y={c[2]}x/({c[3]}+x)}$

\n

$x=$ [[0]]

\n

", "showFeedbackIcon": true, "sortAnswers": false, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "adaptiveMarkingPenalty": 0, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "type": "gapfill", "scripts": {}, "gaps": [{"answer": "{c[3]}y/({c[2]}-y)", "checkingType": "absdiff", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "checkVariableNames": true, "valuegenerators": [{"value": "", "name": "y"}], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "unitTests": [], "answerSimplification": "all", "type": "jme", "customName": "", "vsetRange": [0, 1], "showFeedbackIcon": true, "showPreview": true, "marks": "1", "vsetRangePoints": 5, "adaptiveMarkingPenalty": 0, "useCustomName": false, "failureRate": 1, "scripts": {}, "showCorrectAnswer": true}], "unitTests": [], "marks": 0, "showCorrectAnswer": true}, {"customName": "", "prompt": "

$\\simplify{y={c[7]}-{c[8]}/({c[9]}+x)}$

\n

$x=$ [[0]]

\n

", "showFeedbackIcon": true, "sortAnswers": false, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "adaptiveMarkingPenalty": 0, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "type": "gapfill", "scripts": {}, "gaps": [{"answer": "(-{c[8]}+{c[7]}{c[9]}-{c[9]}y)/(y-{c[7]})", "checkingType": "absdiff", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "checkVariableNames": true, "valuegenerators": [{"value": "", "name": "y"}], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "unitTests": [], "answerSimplification": "all", "type": "jme", "customName": "", "vsetRange": [0, 1], "showFeedbackIcon": true, "showPreview": true, "marks": "1", "vsetRangePoints": 5, "adaptiveMarkingPenalty": 0, "useCustomName": false, "failureRate": 1, "scripts": {}, "showCorrectAnswer": true}], "unitTests": [], "marks": 0, "showCorrectAnswer": true}, {"customName": "", "prompt": "

$\\simplify{y=sqrt(x+{c[10]})}$

\n

$x=$ [[0]]

\n

", "showFeedbackIcon": true, "sortAnswers": false, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "adaptiveMarkingPenalty": 0, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "type": "gapfill", "scripts": {}, "gaps": [{"answer": "y^2-{c[10]}", "checkingType": "absdiff", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "checkVariableNames": true, "valuegenerators": [{"value": "", "name": "y"}], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "unitTests": [], "answerSimplification": "all", "type": "jme", "customName": "", "vsetRange": [0, 1], "showFeedbackIcon": true, "showPreview": true, "marks": "1", "vsetRangePoints": 5, "adaptiveMarkingPenalty": 0, "useCustomName": false, "failureRate": 1, "scripts": {}, "showCorrectAnswer": true}], "unitTests": [], "marks": 0, "showCorrectAnswer": true}, {"customName": "", "prompt": "

$\\simplify{y=1/x+{c[11]}}$

\n

$x=$ [[0]]

\n

", "showFeedbackIcon": true, "sortAnswers": false, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "adaptiveMarkingPenalty": 0, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "type": "gapfill", "scripts": {}, "gaps": [{"answer": "1/(y-{c[11]})", "checkingType": "absdiff", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "checkVariableNames": true, "valuegenerators": [{"value": "", "name": "y"}], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "unitTests": [], "answerSimplification": "all", "type": "jme", "customName": "", "vsetRange": [0, 1], "showFeedbackIcon": true, "showPreview": true, "marks": "1", "vsetRangePoints": 5, "adaptiveMarkingPenalty": 0, "useCustomName": false, "failureRate": 1, "scripts": {}, "showCorrectAnswer": true}], "unitTests": [], "marks": 0, "showCorrectAnswer": true}], "tags": [], "statement": "

Rearrange these equations to make $x$ the subject.

", "preamble": {"js": "", "css": ""}, "rulesets": {}, "variables": {"c": {"definition": "repeat(random(-5..5 except 0 except 1 except -1),15)", "description": "", "group": "Ungrouped variables", "name": "c", "templateType": "anything"}}, "advice": "

(a)

\n

$\\simplify{y={c[0]}x+{c[1]}}$

\n

$\\simplify{y-{c[1]}={c[0]}x}$

\n

$\\simplify{(y-{c[1]})/{c[0]}={x}}$          (dividing both sides by $\\var{c[0]}$)

\n

\n

(b)

\n

$\\simplify{y={c[2]}x/({c[3]}+x)}$

\n

$\\simplify{y*({c[3]}+x)={c[2]}}x$        (multiply both sides by denominator)

\n

$\\simplify{y*{c[3]}+x y={c[2]}}x$        (expanding bracket)

\n

$\\simplify{y*{c[3]}={c[2]}x- y x}$        (moving all $x$ to the same side)

\n

$\\simplify{y*{c[3]}=x({c[2]}- y)}$        (factorising)

\n

$\\simplify{(y*{c[3]})/({c[2]}- y)=x}$

\n

\n

(c)

\n

$\\simplify{y={c[7]}-{c[8]}/({c[9]}+x)}$

\n

$\\simplify{y-{c[7]}=-{c[8]}/({c[9]}+x)}$

\n

$\\simplify{({c[9]}+x)=-{c[8]}/(y-{c[7]})}$

\n

$\\simplify{x=-{c[9]}-{c[8]}/(y-{c[7]})}$                which is algebraically the same as  $\\simplify{x=(-{c[9]}(y-{c[7]})-{c[8]})/(y-{c[7]})}=\\simplify{(-{c[9]}y+{c[7]*c[9]-c[8]})/(y-{c[7]})}$

\n

\n

(d)

\n

$\\simplify{y=sqrt(x+{c[10]})}$

\n

$\\simplify{y^2=(x+{c[10]})}$          (squaring both sides)

\n

$\\simplify{y^2-{c[10]}=x}$

\n

\n

(e)

\n

$\\simplify{y=1/x+{c[11]}}$

\n

$\\simplify{y-{c[11]}=1/x}$

\n

$\\simplify{x(y-{c[11]})=1}$           (multiply both sides by $x$)

\n

$\\simplify{x=1/(y-{c[11]})}$

", "variablesTest": {"maxRuns": 100, "condition": ""}, "variable_groups": [], "ungrouped_variables": ["c"], "functions": {}}, {"name": "Maria's copy of Terry's copy of Julie's copy of Plot the graph of a quadratic function", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Terry Young", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3130/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}], "showQuestionGroupNames": false, "functions": {}, "statement": "

You are given the quadratic function $y=\\simplify[std]{{a}x^2+{c}}$

", "variables": {"a": {"name": "a", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(-2,-1,-0.5,0.5,1,2)"}, "c": {"name": "c", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(-4..4 except 0)"}, "values": {"name": "values", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "map(a*x^2+c,x,-3..3)"}}, "parts": [{"matrix": ["if(a>0,1,0)", "if(a>0,0,1)"], "showCorrectAnswer": true, "distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "prompt": "

The graph of this function is:

", "marks": 0, "choices": ["

An upwards-opening parabola

", "

A downwards-opening parabola

"], "type": "1_n_2", "displayType": "radiogroup", "scripts": {}, "variableReplacements": [], "maxMarks": 1, "shuffleChoices": false, "minMarks": 0, "displayColumns": 0}, {"prompt": "

Fill in the table of values for $y=\\simplify[std]{{a}x^2+{c}}$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$x$$-3$$-2$$-1$$0$$1$$2$$3$
$y$[[0]][[1]][[2]][[3]][[4]][[5]][[6]]
\n

Slide the points to the correct $y$ values.

\n

Give the coordinates of the turning point of the parabola: $\\bigg($[[0]]$,$ [[1]]$\\bigg)$

", "licence": "Creative Commons Attribution 4.0 International", "notes": "

Adapted from a question written in Dutch by Carolijn Tacken.

\n

Disconnected the graph from the answer fields.

"}}, {"name": "Maria's copy of Rational functions: Quadratic over linear", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "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/"}], "ungrouped_variables": ["a", "b", "c", "d", "des"], "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

The vertical asymptote corresponds to the value of $x$ that results in attempting to divide by $0$. For the equation

\n

\$\\simplify[all]{y=({b}x^2-{a*b+c}x+{a*c+d})/(x-{a})}\$

\n

This means the equation of the vertical asymptote is $x=\\var{a}$.

\n

The oblique asymptote corresponds to the value of $y$ that results from $x$ approaching infinity. Let's look at two methods that determine this limit:

\n

Method 1 - Breaking up the fraction

\n

We can rewrite the numerator of $\\simplify[all]{({b}x^2-{a*b+c}x+{a*c+d})/(x-{a})}$ so that it includes multiples of the denominator. We do this term by term. We first write $\\simplify{{b}x^2}$ in terms of $\\simplify{x-{a}}$:

\n

$\\simplify{{b}x^2={b}x(x-{a})+{a*b}x}$

\n

and so the next term is now $\\simplify[!collectNumbers]{{a*b}x-{a*b+c}x=-{c}x}$. We now write this in terms of $\\simplify{x-{a}}$:

\n

$\\simplify{-{c}x=-{c}(x-{a})-{a*c}}$

\n

and so our next term is now $\\simplify[!collectNumbers]{-{a*c}+{a*c+d}={d}}$. Now we can rewrite the numerator and break up our fraction:

\n

\\begin{align}\\simplify[all]{({b}x^2-{a*b+c}x+{a*c+d})/(x-{a})}&=\\simplify{({b}x(x-{a})-{c}(x-{a})+{d})/(x-{a})}\\\\&=\\simplify{({b}x(x-{a}))/(x-{a})-({c}(x-{a}))/(x-{a})+{d}/(x-{a})}\\\\&=\\simplify{({b}x-{c})+{d}/(x-{a})}\\end{align}

\n

Now as $x$ gets very large $\\simplify{{d}/(x-{a})}$ gets very close to $0$ and so $y$ approaches $\\simplify{{b}x-{c}}$.

\n

\n

Method 2 - Polynomial long division

\n

There is a procedure called polynomial long division, if you are comfortable with long division of numbers then it isn't too different. You can see an example of the procedure here. The result of the division (in this case $\\simplify{{b}x-{c}}$) will be the oblique asymptote. The remainder will be $\\var{d}$, which 'remains' to be divided by $\\simplify{x-{a}}$. Just like in the method above, you will be able to say \$y=\\simplify[all]{({b}x^2-{a*b+c}x+{a*c+d})/(x-{a})}=\\simplify{({b}x-{c})+{d}/(x-{a})}\$
so as $x$ gets very large $\\simplify{{d}/(x-{a})}$ gets very close to $0$ and so $y$ approaches $\\simplify{{b}x-{c}}$.

\n

\n

This means the equation of the horizontal asymptote is $y=\\simplify{{b}x-{c}}$.

\n

Notice that from Method 1 and Method 2 above we found that our equation can be written as $\\simplify{{b}x-{c}+{d}/(x-{a})}$, and so we can see that $\\var{d}$ is multiplying the fraction $\\simplify{1/(x-{a})}$. It is a general fact that because $\\var{d}$ is positive the graph will be in the top right and bottom left parts of the plane.  negative the graph will be in the top left and bottom right parts of the plane. We can see this as follows:

\n
\n
• By substituting into the equation an $x$ value that is to the right of the vertical asymptote $x=\\var{a}$, we will find the resulting $y$ value is above below the oblique asymptote $y=\\simplify{{b}x-{c}+{d}}$.
• \n
• By substituting into the equation an $x$ value that is to the left of the vertical asymptote $x=\\var{a}$, we will find the resulting $y$ value is above below the oblique asymptote $y=\\simplify{{b}x-{c}+{d}}$.
• \n
\n

To find the $y$-intercept, let $x=0$ and solve for $y$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
 $y$ $=$ $\\displaystyle\\simplify[!collectNumbers]{({b}0^2-{a*b+c}0+{a*c+d})/(0-{a})}$ $=$ $\\displaystyle\\simplify[fractionNumbers]{{-c-d/a}}$
\n

To find the $x$-intercept, let $y=0$ and solve for $x$ (here we use the quadratic equation):

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
 $0$ $=$ $\\displaystyle\\simplify{({b}x^2-{a*b+c}x+{a*c+d})/(x-{a})}$ $0$ $=$ $\\displaystyle\\simplify{({b}x^2-{a*b+c}x+{a*c+d})}$ $x$ $=$ $\\displaystyle\\frac{-(\\var{-a*b-c})\\pm\\sqrt{(\\var{-a*b-c})^2-4(\\var{b})(\\var{a*c+d})}}{2(\\var{b})}$
\n

Since this includes the square root of a negative number there are no $x$-intercepts.

\n

Therefore, the $x$-intercept is $x=\\simplify[fractionNumbers,simplifyFractions,unitDenominator]{({a*b+c})/{2*b}}$.

\n

Therefore, the $x$-intercepts are $x=\\simplify{({a*b+c}-sqrt({des}))/{2*b}}$ and $x=\\simplify{({a*b+c}+sqrt({des}))/{2*b}}$.

Identifying some of the basic properties (intercepts, asymptotes, quadrants) of a rational function (quadratic over linear)

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "rulesets": {}, "functions": {}, "preamble": {"css": "", "js": ""}, "variable_groups": [], "tags": [], "variables": {"c": {"group": "Ungrouped variables", "name": "c", "definition": "random(-12..12 except 0)", "templateType": "anything", "description": ""}, "d": {"group": "Ungrouped variables", "name": "d", "definition": "random(-12..12 except 0)", "templateType": "anything", "description": ""}, "b": {"group": "Ungrouped variables", "name": "b", "definition": "random(-12..12 except 0)", "templateType": "anything", "description": ""}, "a": {"group": "Ungrouped variables", "name": "a", "definition": "random(-12..12 except 0)", "templateType": "anything", "description": ""}, "des": {"group": "Ungrouped variables", "name": "des", "definition": "a^2*b^2+c^2-2*a*b*c-4*b*d", "templateType": "anything", "description": ""}}, "parts": [{"showCorrectAnswer": true, "customName": "", "type": "gapfill", "variableReplacements": [], "customMarkingAlgorithm": "", "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "unitTests": [], "sortAnswers": false, "scripts": {}, "useCustomName": false, "gaps": [{"showCorrectAnswer": true, "showFractionHint": true, "customName": "", "type": "numberentry", "allowFractions": false, "variableReplacements": [], "customMarkingAlgorithm": "", "minValue": "{a}", "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "unitTests": [], "mustBeReduced": false, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "scripts": {}, "useCustomName": false, "maxValue": "{a}", "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "marks": 1}], "variableReplacementStrategy": "originalfirst", "prompt": "

The graph of this equation has a vertical asymptote at $x=$ [[0]].

", "marks": 0}, {"showCorrectAnswer": true, "customName": "", "type": "gapfill", "variableReplacements": [], "customMarkingAlgorithm": "", "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "unitTests": [], "sortAnswers": false, "scripts": {}, "useCustomName": false, "gaps": [{"showCorrectAnswer": true, "customName": "", "type": "jme", "variableReplacements": [], "customMarkingAlgorithm": "", "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{b}x-{c}", "checkVariableNames": false, "checkingAccuracy": 0.001, "checkingType": "absdiff", "scripts": {}, "useCustomName": false, "vsetRangePoints": 5, "variableReplacementStrategy": "originalfirst", "showPreview": true, "vsetRange": [0, 1], "valuegenerators": [{"name": "x", "value": ""}], "marks": 1, "failureRate": 1}], "variableReplacementStrategy": "originalfirst", "prompt": "

The graph of this equation has an oblique asymptote at $y=$ [[0]].

", "marks": 0}, {"displayColumns": "2", "customMarkingAlgorithm": "", "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "unitTests": [], "displayType": "checkbox", "useCustomName": false, "minMarks": 0, "variableReplacementStrategy": "originalfirst", "prompt": "

The two asymptotes break the plane up into four parts: top right, top left, bottom left and bottom right.

\n

\n

The graph is in which of these parts of the plane?

", "minAnswers": 0, "maxAnswers": 0, "showCorrectAnswer": true, "customName": "", "warningType": "none", "variableReplacements": [], "maxMarks": 0, "distractors": ["", "", "", ""], "shuffleChoices": false, "matrix": ["if(d<0, 1, 0)", "if(d>0, 1, 0)", "if(d>0, 1, 0)", "if(d<0, 1, 0)"], "scripts": {}, "type": "m_n_2", "showCellAnswerState": true, "choices": ["

top left

", "

top right

", "

bottom left

", "

bottom right

"], "marks": 0}, {"showCorrectAnswer": true, "customName": "", "type": "gapfill", "variableReplacements": [], "customMarkingAlgorithm": "", "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "unitTests": [], "sortAnswers": false, "scripts": {}, "useCustomName": false, "gaps": [{"showCorrectAnswer": true, "showFractionHint": true, "customName": "", "type": "numberentry", "allowFractions": true, "variableReplacements": [], "customMarkingAlgorithm": "", "minValue": "{-c-d/a}", "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "unitTests": [], "mustBeReduced": false, "correctAnswerStyle": "plain", "correctAnswerFraction": true, "scripts": {}, "useCustomName": false, "maxValue": "{-c-d/a}", "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "marks": 1}], "variableReplacementStrategy": "originalfirst", "prompt": "

The $y$-intercept is at $y=$[[0]].

0

", "

1

", "

2

"], "marks": 0}, {"answerSimplification": "simplifyFractions", "showPreview": true, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "unitTests": [], "useCustomName": false, "answer": "{a*b+c}/{2*b}", "vsetRangePoints": 5, "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "vsetRange": [0, 1], "showCorrectAnswer": true, "customName": "", "variableReplacements": [], "valuegenerators": [], "checkVariableNames": false, "checkingType": "absdiff", "scripts": {}, "type": "jme", "marks": 1, "failureRate": 1}, {"showCorrectAnswer": true, "customName": "", "type": "jme", "variableReplacements": [], "customMarkingAlgorithm": "", "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "({a*b+c}-sqrt({des}))/{2*b}", "checkVariableNames": false, "checkingAccuracy": 0.001, "checkingType": "absdiff", "scripts": {}, "useCustomName": false, "vsetRangePoints": 5, "variableReplacementStrategy": "originalfirst", "showPreview": true, "vsetRange": [0, 1], "valuegenerators": [], "marks": 1, "failureRate": 1}, {"showCorrectAnswer": true, "customName": "", "type": "jme", "variableReplacements": [], "customMarkingAlgorithm": "", "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "({a*b+c}+sqrt({des}))/{2*b}", "checkVariableNames": false, "checkingAccuracy": 0.001, "checkingType": "absdiff", "scripts": {}, "useCustomName": false, "vsetRangePoints": 5, "variableReplacementStrategy": "originalfirst", "showPreview": true, "vsetRange": [0, 1], "valuegenerators": [], "marks": 1, "failureRate": 1}], "variableReplacementStrategy": "originalfirst", "prompt": "

How many $x$-intercepts are there? [[0]]

\n

\n
\n

The $x$-intercept is $x=$ [[1]].

\n
\n
\n

The $x$-intercepts are $x=$ [[2]] and $x=$ [[3]] (in ascending order)

\n

Note: You could input $\\frac{1-\\sqrt{133}}{2}$ by typing (1-sqrt(133))/2

\n
", "marks": 0}], "statement": "

You are given the equation  \$\\simplify[all]{y=({b}x^2-{a*b+c}x+{a*c+d})/(x-{a})}.\$

", "type": "question"}, {"name": "Maria's copy of Is this a function?", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "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/"}], "variables": {"equationlist": {"definition": "shuffle([\n random(\n ['\\$y=\\\\simplify{{n[0]}x^{{n[1]}}+{n[2]}\\}\\$',1,0] ,\n ['\\$f(x)=\\\\var{n[3]}\\$',1,0],\n ['\\$y=\\\\sqrt{\\\\simplify{{abs(n[6])}x+{n[7]}}}\\$',1,0],\n ['\\$y=-\\\\sqrt{\\\\simplify{{-abs(n[15])}x+{n[16]}}}\\$',1,0],\n ['\\$y=\\\\var{n[10]}x\\$ and \\$\\\\var{n[11]}x\\$',0,1],\n ['\\$y=\\\\pm \\\\sqrt{\\\\simplify{{abs(n[4])}x+{n[5]}}}\\$',0,1]\n ), \n random( \n ['\\$y>\\\\simplify{{n[13]}x+{n[14]}\\}\\$', 0,1],\n ['\\$y\\\\leq\\\\simplify{{n[13]}x+{n[14]}\\}\\$', 0,1],\n ['\\$y<\\\\simplify{{n[13]}x+{n[14]}\\}\\$', 0,1],\n ['\\$y\\\\ge\\\\simplify{{n[13]}x+{n[14]}\\}\\$',0,1]\n)\n])", "templateType": "anything", "name": "equationlist", "description": "

want to choose some of these randomly each time...

", "group": "Ungrouped variables"}, "wordlist": {"definition": "shuffle([\n random(\n ['Given an input, the output is a number \\$\\\\var{n[8]}\\$ times the input and another number that was the input',0,1],\n ['Given an input, the output is the number \\$\\\\var{n[13]}\\$ and the number \\$\\\\var{n[14]}\\$',0,1] \n ),\n random(['You input a number and you get an output of \\$\\\\var{abs(n[9])}\\$ less than the input',1,0],\n ['You input a number and you get an output of \\$\\\\var{abs(n[12])}\\$ more than the input',1,0]\n)])", "templateType": "anything", "name": "wordlist", "description": "", "group": "Ungrouped variables"}, "n": {"definition": "shuffle(-10..10 except 0)", "templateType": "anything", "name": "n", "description": "", "group": "Ungrouped variables"}}, "parts": [{"maxMarks": 0, "showCorrectAnswer": true, "shuffleChoices": false, "variableReplacements": [], "showFeedbackIcon": true, "matrix": "equationlist[0][1..3]", "choices": ["

Function

", "

Not a function

"], "scripts": {}, "prompt": "

{equationlist[0][0]}

\n

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

Function

", "

Not a function

"], "scripts": {}, "prompt": "

{equationlist[1][0]}

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

Function

", "

Not a function

"], "scripts": {}, "prompt": "

{wordlist[0][0]}

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

Function

", "

Not a function

"], "scripts": {}, "prompt": "

{wordlist[1][0]}

", "displayType": "radiogroup", "marks": 0, "type": "1_n_2", "minMarks": 0, "displayColumns": 0, "variableReplacementStrategy": "originalfirst"}], "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"js": "", "css": ""}, "ungrouped_variables": ["n", "equationlist", "wordlist"], "statement": "

Are the following, functions or not?

\n

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

Given an equation or a worded formula determine if it is a function or not

A function is a rule that assigns at most one output for each input.

\n

\n

For an equation such as $y=x^2+3$, we think of $x$ as the input and $y$ as the output. Since each $x$ gives at most one $y$ value this is a function.

\n

\n

Since things such as $y>x$, $y=\\pm\\sqrt{x}$ and '$y=2 \\text{ and } 3x$' give more than one $y$ value for an $x$ value these are not functions.

\n

\n

Graphically, the requirement that there is at most one $y$ value for each $x$ value means a curve is the graph of a function if it passes the 'vertical line test'. That is, if you draw vertical lines through the graph and each vertical line only cuts the graph at most once, the graph 'passes' the vertical line test and it represents a function.

\n

", "tags": [], "type": "question"}, {"name": "Maria's copy of Inverse and composite functions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}], "parts": [{"type": "gapfill", "variableReplacements": [], "useCustomName": false, "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "sortAnswers": false, "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showFeedbackIcon": true, "showCorrectAnswer": true, "unitTests": [], "gaps": [{"type": "jme", "showPreview": true, "checkVariableNames": false, "useCustomName": false, "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "vsetRange": [0, 1], "checkingAccuracy": 0.001, "checkingType": "absdiff", "showFeedbackIcon": true, "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "unitTests": [], "answerSimplification": "all", "vsetRangePoints": 5, "answer": "(x-{a[1]})/{a[0]}", "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showCorrectAnswer": true, "marks": 1, "failureRate": 1}], "marks": 0, "prompt": "

Find $f^{-1}(x)$ when $\\simplify{f(x)={a[0]}x+{a[1]} }$.

\n

$\\displaystyle f^{-1}(x)=$ [[0]]

"}, {"type": "gapfill", "variableReplacements": [], "useCustomName": false, "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "sortAnswers": false, "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showFeedbackIcon": true, "showCorrectAnswer": true, "unitTests": [], "gaps": [{"type": "jme", "showPreview": true, "checkVariableNames": false, "useCustomName": false, "adaptiveMarkingPenalty": 0, "vsetRange": [0, 1], "checkingAccuracy": 0.001, "checkingType": "absdiff", "showFeedbackIcon": true, "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "unitTests": [], "customMarkingAlgorithm": "", "vsetRangePoints": 5, "answer": "(x+{a[2]})/{a[3]}", "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showCorrectAnswer": true, "marks": 1, "failureRate": 1}], "marks": 0, "prompt": "

Find $g^{-1}(x)$ when $\\simplify{g(x)={a[3]}x-{a[2]} }$.

\n

$\\displaystyle g^{-1}(x)=$ [[0]]

"}, {"type": "gapfill", "variableReplacements": [], "useCustomName": false, "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "sortAnswers": false, "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showFeedbackIcon": true, "showCorrectAnswer": true, "unitTests": [], "gaps": [{"type": "jme", "showPreview": true, "checkVariableNames": false, "useCustomName": false, "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "vsetRange": [0, 1], "checkingAccuracy": 0.001, "checkingType": "absdiff", "showFeedbackIcon": true, "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "unitTests": [], "answerSimplification": "all", "vsetRangePoints": 5, "answer": "(x-{a[1]}+({a[2]}{a[0]}))/({a[3]}*{a[0]})", "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showCorrectAnswer": true, "marks": 1, "failureRate": 1}], "marks": 0, "prompt": "

Use your above answers for $f^{-1}(x)$ and $g^{-1}(x)$ to find the inverse, composed function, $(g^{-1}\\circ f^{-1}) (x)$ terms of $x$:
$\\displaystyle (g^{-1}\\circ f^{-1}) (x)$ =[[0]]

"}, {"type": "gapfill", "variableReplacements": [], "useCustomName": false, "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "sortAnswers": false, "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showFeedbackIcon": true, "showCorrectAnswer": true, "unitTests": [], "gaps": [{"type": "jme", "showPreview": true, "checkVariableNames": false, "useCustomName": false, "adaptiveMarkingPenalty": 0, "vsetRange": [0, 1], "checkingAccuracy": 0.001, "checkingType": "absdiff", "showFeedbackIcon": true, "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "unitTests": [], "customMarkingAlgorithm": "", "vsetRangePoints": 5, "answer": "{a[0]}({a[3]}x-{a[2]})+{a[1]}", "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showCorrectAnswer": true, "marks": 1, "failureRate": 1}], "marks": 0, "prompt": "

Using:
\\\begin{align} f(x)&=\\simplify{{a[0]}x+{a[1]} }\\\\ &\\text{ and } \\\\ g(x)&=\\simplify{{a[3]}x-{a[2]} }\\text{,} \\end{align} \
find $(f\\circ g)(x)$, the composition of $f(x)$ with $g(x)$.

\n

$\\displaystyle (f\\circ g)(x)=$ [[0]]

"}, {"type": "gapfill", "variableReplacements": [], "useCustomName": false, "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "sortAnswers": false, "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showFeedbackIcon": true, "showCorrectAnswer": true, "unitTests": [], "gaps": [{"type": "jme", "showPreview": true, "checkVariableNames": false, "useCustomName": false, "adaptiveMarkingPenalty": 0, "vsetRange": [0, 1], "checkingAccuracy": 0.001, "checkingType": "absdiff", "showFeedbackIcon": true, "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "unitTests": [], "customMarkingAlgorithm": "", "vsetRangePoints": 5, "answer": "(x-{a[1]}+({a[2]}{a[0]}))/({a[3]}*{a[0]})", "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showCorrectAnswer": true, "marks": 1, "failureRate": 1}], "marks": 0, "prompt": "

Use your above answer for $(f\\circ g)(x)$ to find the inverse, composed function,$(f\\circ g)^{-1}(x)$ in terms of $x$:

\n

$\\displaystyle (f\\circ g)^{-1}(x)=$ [[0]]

"}, {"type": "1_n_2", "showCellAnswerState": true, "shuffleChoices": false, "variableReplacements": [], "useCustomName": false, "adaptiveMarkingPenalty": 0, "matrix": [0, 0, 0, "1"], "showFeedbackIcon": true, "distractors": ["", "", "", ""], "unitTests": [], "displayColumns": "1", "prompt": "

When should your answer for c), $(g^{-1}\\circ f^{-1}) (x)$ be the same as your answer for e) $(f\\circ g)^{-1}(x)$?

Never

", "

Only when $f(x)=g(x)$

", "

Only when $f(x)$ is in the same family as $g(x)$

", "

Always, provided that composite and inverse functions exist

"], "customMarkingAlgorithm": "", "minMarks": 0, "customName": "", "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "extendBaseMarkingAlgorithm": true, "scripts": {}, "showCorrectAnswer": true, "marks": 0}], "functions": {}, "tags": [], "preamble": {"js": "", "css": ""}, "variables": {"b": {"description": "", "definition": "repeat(random(5..9),5)", "group": "Ungrouped variables", "templateType": "anything", "name": "b"}, "a": {"description": "", "definition": "repeat(random(2..5),5)", "group": "Ungrouped variables", "templateType": "anything", "name": "a"}}, "advice": "

#### a)

\n

$f^{-1}(x)$ is the function with the property that $f^{-1}(f(x)) = x$.

\n

To find this, we first set $x=f(y)$ and rearrange to find $y$ in terms of $x$, i.e. $y = f^{-1}(x)$.

\n

\\begin{align}
f(y)=\\simplify{{a[0]}y+{a[1]}}&=x\\\\
\\simplify{{a[0]}y}&=x-\\var{a[1]}\\\1em] y&=\\simplify[]{(x-{a[1]})/{a[0]}}\\\\[1em] f^{-1}(x)&=\\simplify{(x-{a[1]})/{a[0]}}\\text{.}\\\\ \\end{align} \n #### b) \n We use the same method as part a) to find g^{-1}(x): \n \\begin{align} g(y)=\\simplify{{a[3]}y-{a[2]}}&=x\\\\ \\simplify{{a[3]}y}&=x+\\var{a[2]}\\\\[1em] y&=\\simplify[]{(x+{a[2]})/{a[3]}}\\\\[1em] g^{-1}(x)&=\\simplify{(x+{a[2]})/{a[3]}}\\text{.}\\\\ \\end{align} \n #### c) \n (g^{-1} \\circ f^{-1})(x) is the function which first applies f^{-1}(x) and then applies g^{-1} to the result of that. \n We use the previous answers: f^{-1}(x)=\\simplify{(x-{a[1]})/{a[0]}} and g^{-1}(x)=\\simplify{(x+{a[2]})/{a[3]}} to find the definition of (g^{-1} \\circ f^{-1})(x) by substituting f^{-1}(x) everywhere x occurs in the definition of g^{-1}(x). \n \\begin{align} (g^{-1}\\circ f^{-1}) (x)&=g^{-1}(f^{-1}(x))\\\\[1em] &=g^{-1} \\left( \\simplify[]{(x-{a[1]})/{a[0]}} \\right) \\\\[1em] &=\\frac{\\left(\\simplify[]{(x-{a[1]})/{a[0]}}\\right)+\\simplify[]{{a[2]}}}{\\var{a[3]}\\text{.}} \\end{align} \n #### d) \n (f \\circ g)(x) is the function which first applies g(x) and then applies f to the result of that. \n We find the definition of (f \\circ g)(x) by substituting g(x) everywhere that x occurs in the definition of f(x). \n \\begin{align} (f\\circ g)(x)&=f(g(x))\\\\ &=f(\\simplify{{a[3]}x-{a[2]}})\\\\ &=\\simplify{{a[0]}({a[3]}x-{a[2]})+{a[1]}} \\end{align} \n #### e) \n Now that we have the definition of (f \\circ g)(x), we can find its inverse by using the same method as in parts a) and b). \n \\begin{align} (f \\circ g)(y) &= x \\\\ \\simplify{{a[0]}({a[3]}y-{a[2]})+{a[1]}}&=x\\\\ \\simplify{{a[0]}({a[3]}y-{a[2]})}&=x-\\var{a[1]}\\\\[1em] \\simplify{{a[3]}y-{a[2]}}&=\\frac{(x-\\var{a[1]})}{\\var{a[0]}}\\\\[1em] \\simplify{{a[3]}y}&=\\left( \\frac{(x-\\var{a[1]})}{\\var{a[0]}} \\right) +\\var{a[2]}\\\\[1em] y&=\\frac{\\left(\\frac{(x-\\var{a[1]})}{\\var{a[0]}}\\right)+\\var{a[2]})}{\\var{a[3]}}\\\\[1em] (f\\circ g)^{-1}(x)&=\\frac{\\left(\\frac{(x-\\var{a[1]})}{\\var{a[0]}}\\right)+\\var{a[2]}}{\\var{a[3]}}\\\\[1em] \\end{align} \n We can see that in this case (f\\circ g)^{-1}(x) = (g^{-1}\\circ f^{-1}) (x). \n #### f) \n So long as the inverses of f and g exist and they can be composed, it is always true that \\[(f \\circ g)^{-1}(x) \\equiv (g^{-1} \\circ f^{-1}) (x)\\text{.}\

", "rulesets": {}, "metadata": {"description": "

Find the inverse of a composite function by finding the inverses of two functions and then the composite of these; and by finding the composite of two functions then finding the inverse. The question then concludes by asking students to compare their two answers and verify they're equivalent.

", "licence": "Creative Commons Attribution 4.0 International"}, "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

Given a function $f(x)$, the inverse function $f^{-1}(x)$ reverses whatever $f$ does.

\n

Function composition is applying one function to the results of another.

\n

The following questions will ask you to find the inverses and compositions of some functions.

\n

Give all of your answers in terms of $x$.

", "ungrouped_variables": ["a", "b"]}, {"name": "Maria's copy of Domain of a square root function", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "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/"}], "statement": "

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

", "ungrouped_variables": ["out", "inp", "num", "n", "c", "rat", "a", "b", "base", "d"], "rulesets": {}, "parts": [{"scripts": {}, "unitTests": [], "marks": 0, "customMarkingAlgorithm": "", "adaptiveMarkingPenalty": 0, "customName": "", "extendBaseMarkingAlgorithm": true, "type": "gapfill", "prompt": "

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

\n

\$f(x)=\\sqrt{x}.\$

\n

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

", "showCorrectAnswer": true, "gaps": [{"scripts": {}, "unitTests": [], "customMarkingAlgorithm": "", "adaptiveMarkingPenalty": 0, "correctAnswerStyle": "plain", "showCorrectAnswer": true, "showFractionHint": true, "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "allowFractions": true, "marks": 1, "mustBeReduced": false, "customName": "", "extendBaseMarkingAlgorithm": true, "type": "numberentry", "maxValue": "{infinity}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "useCustomName": false, "minValue": "0", "variableReplacements": []}], "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "useCustomName": false, "showFeedbackIcon": true, "variableReplacements": []}, {"scripts": {}, "displayColumns": "1", "unitTests": [], "customMarkingAlgorithm": "", "adaptiveMarkingPenalty": 0, "minMarks": 0, "maxMarks": 0, "showCellAnswerState": true, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0, "choices": ["

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

", "

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

", "

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

", "

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

", "

$t>0$

", "

$t\\ne0$

"], "customName": "", "extendBaseMarkingAlgorithm": true, "type": "1_n_2", "prompt": "

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

\n

", "distractors": ["", "", "", "", "", ""], "matrix": ["1", 0, 0, 0, 0, 0], "shuffleChoices": true, "showCorrectAnswer": true, "useCustomName": false, "variableReplacements": [], "displayType": "radiogroup"}, {"scripts": {}, "displayColumns": "1", "unitTests": [], "customMarkingAlgorithm": "", "adaptiveMarkingPenalty": 0, "minMarks": 0, "maxMarks": 0, "showCellAnswerState": true, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0, "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])}}\\}$

"], "customName": "", "extendBaseMarkingAlgorithm": true, "type": "1_n_2", "prompt": "

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

\n

", "distractors": ["", "", "", "", ""], "matrix": ["1", 0, 0, 0, 0], "shuffleChoices": true, "showCorrectAnswer": true, "useCustomName": false, "variableReplacements": [], "displayType": "radiogroup"}, {"scripts": {}, "displayColumns": "1", "unitTests": [], "customMarkingAlgorithm": "", "adaptiveMarkingPenalty": 0, "minMarks": 0, "maxMarks": 0, "showCellAnswerState": true, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0, "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}}\\}$

"], "customName": "", "extendBaseMarkingAlgorithm": true, "type": "1_n_2", "prompt": "

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

\n

", "distractors": ["", "", "", "", ""], "matrix": ["0", "1", 0, 0, 0], "shuffleChoices": true, "showCorrectAnswer": true, "useCustomName": false, "variableReplacements": [], "displayType": "radiogroup"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

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

"}, "variable_groups": [], "variables": {"rat": {"name": "rat", "description": "", "group": "Ungrouped variables", "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", "templateType": "anything"}, "n": {"name": "n", "description": "", "group": "Ungrouped variables", "definition": "random(2..4)", "templateType": "anything"}, "a": {"name": "a", "description": "", "group": "Ungrouped variables", "definition": "random(-12..-1)", "templateType": "anything"}, "out": {"name": "out", "description": "", "group": "Ungrouped variables", "definition": "expression(random('f','h','g','p','q','y'))", "templateType": "anything"}, "d": {"name": "d", "description": "", "group": "Ungrouped variables", "definition": "random(1..12)", "templateType": "anything"}, "inp": {"name": "inp", "description": "", "group": "Ungrouped variables", "definition": "expression(random('x','r','s','t','w'))", "templateType": "anything"}, "num": {"name": "num", "description": "", "group": "Ungrouped variables", "definition": "[random(-12..12),random(-12..12 except 0)]", "templateType": "anything"}, "b": {"name": "b", "description": "", "group": "Ungrouped variables", "definition": "a+random(1..12)", "templateType": "anything"}, "c": {"name": "c", "description": "", "group": "Ungrouped variables", "definition": "shuffle(-12..12 except 0)", "templateType": "anything"}, "base": {"name": "base", "description": "

base

", "group": "Ungrouped variables", "definition": "random(2..12 except 10)", "templateType": "anything"}}, "functions": {}, "tags": [], "advice": "

a) The domain of $f(x)=\\sqrt{x}$ is the set of all non-negative numbers, i.e. $\\{x\\in\\mathbb{R}:\\,x\\ge0\\}$ or in interval notation, $[0,\\infty)$. This means that the square root of any negative number is not defined.

\n

\n

b) For a function such as $g(t)=\\sqrt{\\simplify{t-{c[0]}}}$ we require that the square root acts on a non-negative 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 $\\simplify{{out}({inp})}=\\sqrt{\\simplify{{inp}^2-{a+b}{inp}+{a*b}}}$ we require that the square root acts on a non-negative 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})}$, which is non-negative when $\\simplify{({inp}-{a})}$ and $\\simplify{({inp}-{b})}$ are both negative, or both non-negative. 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

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

\n

\n

", "preamble": {"css": "", "js": ""}}, {"name": "Algebra: Functions, inverses and compositions", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}], "tags": [], "rulesets": {}, "advice": "

See Lecture 7.1 and Workshop 7.2

", "variable_groups": [{"name": "part a", "variables": ["mf", "cf", "mg", "cg", "mh", "ch", "x", "fx", "gx", "hx", "fgx", "ghx", "ggx"]}], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

A few simple functions are provided of the form ax, x+b and cx+d. Values of the functions, inverses and compositions are asked for. Most are numerical but the last few questions are algebraic.

"}, "variables": {"ghx": {"group": "part a", "name": "ghx", "definition": "hx*mg+vector(cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg)", "description": "", "templateType": "anything"}, "x": {"group": "part a", "name": "x", "definition": "vector(shuffle(-4..4)+shuffle(-4..4)+shuffle(1..2))", "description": "", "templateType": "anything"}, "fgx": {"group": "part a", "name": "fgx", "definition": "gx*mf+vector(cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf)", "description": "", "templateType": "anything"}, "ggx": {"group": "part a", "name": "ggx", "definition": "gx*mg+vector(cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg)", "description": "", "templateType": "anything"}, "cg": {"group": "part a", "name": "cg", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything"}, "cf": {"group": "part a", "name": "cf", "definition": "0", "description": "", "templateType": "anything"}, "gx": {"group": "part a", "name": "gx", "definition": "x*mg+vector(cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg)", "description": "", "templateType": "anything"}, "mh": {"group": "part a", "name": "mh", "definition": "random(2..6)", "description": "", "templateType": "anything"}, "ch": {"group": "part a", "name": "ch", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything"}, "mg": {"group": "part a", "name": "mg", "definition": "1", "description": "", "templateType": "anything"}, "mf": {"group": "part a", "name": "mf", "definition": "random(-4..4 except [0,1])", "description": "", "templateType": "anything"}, "fx": {"group": "part a", "name": "fx", "definition": "x*mf+vector(cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf)", "description": "", "templateType": "anything"}, "hx": {"group": "part a", "name": "hx", "definition": "x*mh+vector(ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch)", "description": "", "templateType": "anything"}}, "functions": {"eqnline": {"type": "html", "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 = -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: 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 and y-axis\nvar xaxis = board.create('axis',[[0,0],[1,0]]);\n\n// create the y-axis\nvar yaxis = board.create('axis',[[0,0],[0,1]], );\n\n\n\n\n// Plot the function.\n board.create('functiongraph',\n [function(x){ return m*x+c},x_min,x_max]);\n\n\n\nreturn div;", "parameters": [["m", "number"], ["c", "number"]], "language": "javascript"}}, "preamble": {"css": "", "js": ""}, "statement": "", "ungrouped_variables": [], "parts": [{"showCorrectAnswer": true, "sortAnswers": false, "unitTests": [], "customMarkingAlgorithm": "", "variableReplacements": [], "type": "gapfill", "prompt": "

$f(x) = \\simplify{{mf}x+{cf}}$.

\n

$g(x) = \\simplify{{mg}x+{cg}}$.

\n

$h(x) = \\simplify{{mh}x+{ch}}$.

\n

\n

Determine the following.

\n

\n

\n

$f(\\var{x[1]}) =$ [[0]]

\n

$h(\\var{x[2]}) =$ [[1]]

\n

$f(g(\\var{x[3]}))=$ [[2]]

\n

$g(h(\\var{x[4]})) =$ [[3]]

\n

$g(g(\\var{x[5]})) =$ [[4]]

\n

$f^{-1}(\\var{fx[6]}) =$ [[5]]

\n

$h^{-1}(\\var{hx[7]}) =$ [[6]]

\n

$g^{-1}(\\var{gx[8]}) =$ [[7]]

\n

$h^{-1}(\\var{hx[9]}) =$ [[8]]

\n

$g(g(\\var{x[10]})) =$ [[9]]

\n

If $a$ is any number, what is $g(g(a))$?

\n

$g(g(a)) =$ [[10]]

\n

\n

If $p$ is some number, what is $f^{-1}(p)$?

\n

$f^{-1}(p) =$ [[11]]

\n

\n

If $s$ is some number, what is $g^{-1}(s)$?

\n

$g^{-1}(s) =$   [[12]]

Which of the following describe the interval $(\\var{a},\\var{b}]$?

", "tags": [], "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": "

The closed (square) bracket in $(\\var{a},\\var{b}]$ signifies that the endpoint $\\var{b}$ is included in the interval whereas, the open (round) bracket signifies that the endpoint $\\var{a}$ is not included. This is known as the half-closed interval (or half-open interval) $(\\var{a},\\var{b}]$.

", "ungrouped_variables": ["a", "b", "delta"], "variables": {"delta": {"group": "Ungrouped variables", "definition": "random(1..10#0.25)", "templateType": "anything", "name": "delta", "description": "

delta

"}, "b": {"group": "Ungrouped variables", "definition": "a+delta", "templateType": "anything", "name": "b", "description": ""}, "a": {"group": "Ungrouped variables", "definition": "random(-10..10#0.25)", "templateType": "anything", "name": "a", "description": ""}}, "parts": [{"showFeedbackIcon": true, "type": "1_n_2", "scripts": {}, "minMarks": 0, "distractors": ["", "", "", ""], "marks": 0, "choices": ["

All the real numbers between $\\var{a}$ and $\\var{b}$ inclusive (i.e. including $\\var{a}$ and $\\var{b}$).

", "

All the real numbers between $\\var{a}$ and $\\var{b}$ exclusive (i.e. excluding $\\var{a}$ and $\\var{b}$).

", "

All the real numbers between $\\var{a}$ and $\\var{b}$, including $\\var{a}$ but not including $\\var{b}$.

", "

All the real numbers between $\\var{a}$ and $\\var{b}$, including $\\var{b}$ but not including $\\var{a}$.

"], "showCorrectAnswer": true, "shuffleChoices": false, "variableReplacements": [], "displayType": "radiogroup", "maxMarks": 0, "matrix": ["0", "0", 0, "1"], "displayColumns": "1", "variableReplacementStrategy": "originalfirst"}], "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

Simple questions on interval notation. If you are not randomising the order of your questions please turn on randomise choices in these questions.

"}, "type": "question"}, {"name": "Intervals - graphing (a,b)", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "metadata": {"description": "

Simple questions on interval notation. If you are not randomising the order of your questions please turn on randomise choices in these questions.

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

Which of the following best represents the interval $(\\var{a},\\var{b})$?

", "preamble": {"js": "", "css": ""}, "functions": {"closed": {"parameters": [], "language": "javascript", "type": "html", "definition": "var div = Numbas.extensions.jsxgraph.makeBoard('600px','100px',{boundingBox:[0.5,1,12.5,-1],grid:false,axis:false});\nvar board = div.board;\n\n//reordring layers\nJXG.Options.layer['circle'] = 7;\nJXG.Options.layer['line'] = 6;\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 fixed:true\n});\n\n\na = Numbas.jme.unwrapValue(scope.variables.a);\nb = Numbas.jme.unwrapValue(scope.variables.b);\n\n\n//board.create('point',[x0,y0],{fixed:true});\n//board.create('point',[x1,y1],{fixed:true});\nboard.create('line',[[a+0.2,0],[b-0.2,0]],{strokeColor:'#00ff00',strokeWidth:2,fixed:true,straightFirst:false, straightLast:false,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[a,0],[a+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fillColor:'#00ff00',fillOpacity:2,fixed:true,highlightStrokeColor:'#00ff00',highlightfillcolor:'#00ff00'});\nboard.createElement('circle',[[b,0],[b+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fillColor:'#00ff00',fillOpacity:2,fixed:true,highlightStrokeColor:'#00ff00',highlightfillcolor:'#00ff00'});\n\n\nreturn div;"}, "closedopen": {"parameters": [], "language": "javascript", "type": "html", "definition": "var div = Numbas.extensions.jsxgraph.makeBoard('600px','100px',{boundingBox:[0.5,1,12.5,-1],grid:false,axis:false});\nvar board = div.board;\n\n//reordring layers\nJXG.Options.layer['circle'] = 7;\nJXG.Options.layer['line'] = 6;\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 fixed:true\n});\n\n\na = Numbas.jme.unwrapValue(scope.variables.a);\nb = Numbas.jme.unwrapValue(scope.variables.b);\n\n\n//board.create('point',[x0,y0],{fixed:true});\n//board.create('point',[x1,y1],{fixed:true});\nboard.create('line',[[a+0.2,0],[b-0.2,0]],{strokeColor:'#00ff00',strokeWidth:2,fixed:true,straightFirst:false, straightLast:false,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[a,0],[a+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fillColor:'#00ff00',fillOpacity:2,fixed:true,highlightStrokeColor:'#00ff00',highlightfillcolor:'#00ff00'});\nboard.createElement('circle',[[b,0],[b+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fixed:true,highlightStrokeColor:'#00ff00'});\n\n\nreturn div;"}, "open": {"parameters": [], "language": "javascript", "type": "html", "definition": "var div = Numbas.extensions.jsxgraph.makeBoard('600px','100px',{boundingBox:[0.5,1,12.5,-1],grid:false,axis:false});\nvar board = div.board;\n\n\n//reordring layers\nJXG.Options.layer['circle'] = 7;\nJXG.Options.layer['line'] = 6;\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 fixed:true\n});\n\n\na = Numbas.jme.unwrapValue(scope.variables.a);\nb = Numbas.jme.unwrapValue(scope.variables.b);\n\n\n//board.create('point',[x0,y0],{fixed:true});\n//board.create('point',[x1,y1],{fixed:true});\nboard.create('line',[[a+0.2,0],[b-0.2,0]],{strokeColor:'#00ff00',strokeWidth:2,fixed:true,straightFirst:false, straightLast:false,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[a,0],[a+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fixed:true,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[b,0],[b+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fixed:true,highlightStrokeColor:'#00ff00'});\n\n\nreturn div;"}, "openclosed": {"parameters": [], "language": "javascript", "type": "html", "definition": "var div = Numbas.extensions.jsxgraph.makeBoard('600px','100px',{boundingBox:[0.5,1,12.5,-1],grid:false,axis:false});\nvar board = div.board;\n\n//reordring layers\nJXG.Options.layer['circle'] = 7;\nJXG.Options.layer['line'] = 6;\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 fixed:true\n});\n\n\na = Numbas.jme.unwrapValue(scope.variables.a);\nb = Numbas.jme.unwrapValue(scope.variables.b);\n\n\n//board.create('point',[x0,y0],{fixed:true});\n//board.create('point',[x1,y1],{fixed:true});\nboard.create('line',[[a+0.2,0],[b-0.2,0]],{strokeColor:'#00ff00',strokeWidth:2,fixed:true,straightFirst:false, straightLast:false,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[a,0],[a+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fixed:true,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[b,0],[b+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fillColor:'#00ff00',fillOpacity:2,fixed:true,highlightStrokeColor:'#00ff00',highlightfillcolor:'#00ff00'});\n\n\nreturn div;"}}, "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

The open (round) brackets in $(\\var{a},\\var{b})$ signify that those endpoints are not included in the interval (but all real numbers between them are included). This is known as the open interval $(\\var{a},\\var{b})$.

\n

\n

When we graph the interval, endpoints that are not included are represented by circles that are not filled in, whereas, endpoints that are included are represented by circles that are filled in.

", "parts": [{"showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "choices": ["

{open()}

", "

{closed()}

", "

{openclosed()}

", "

{closedopen()}

"], "type": "1_n_2", "displayType": "radiogroup", "maxMarks": 0, "displayColumns": "1", "minMarks": 0, "variableReplacements": [], "distractors": ["", "", "", ""], "marks": 0, "matrix": ["1", "0", 0, 0], "shuffleChoices": false, "scripts": {}}], "ungrouped_variables": ["a", "b", "delta"], "variable_groups": [], "variables": {"b": {"name": "b", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "a+delta"}, "delta": {"name": "delta", "description": "

delta

", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)"}, "a": {"name": "a", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..7)"}}, "type": "question"}, {"name": "Intervals - graphing [a,b]", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "rulesets": {}, "variable_groups": [], "preamble": {"css": "", "js": ""}, "statement": "

Which of the following best represents the interval $[\\var{a},\\var{b}]$?

", "tags": [], "functions": {"closedopen": {"language": "javascript", "parameters": [], "definition": "var div = Numbas.extensions.jsxgraph.makeBoard('600px','100px',{boundingBox:[0.5,1,12.5,-1],grid:false,axis:false});\nvar board = div.board;\n\n//reordring layers\nJXG.Options.layer['circle'] = 7;\nJXG.Options.layer['line'] = 6;\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 fixed:true\n});\n\n\na = Numbas.jme.unwrapValue(scope.variables.a);\nb = Numbas.jme.unwrapValue(scope.variables.b);\n\n\n//board.create('point',[x0,y0],{fixed:true});\n//board.create('point',[x1,y1],{fixed:true});\nboard.create('line',[[a+0.2,0],[b-0.2,0]],{strokeColor:'#00ff00',strokeWidth:2,fixed:true,straightFirst:false, straightLast:false,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[a,0],[a+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fillColor:'#00ff00',fillOpacity:2,fixed:true,highlightStrokeColor:'#00ff00',highlightfillcolor:'#00ff00'});\nboard.createElement('circle',[[b,0],[b+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fixed:true,highlightStrokeColor:'#00ff00'});\n\n\nreturn div;", "type": "html"}, "open": {"language": "javascript", "parameters": [], "definition": "var div = Numbas.extensions.jsxgraph.makeBoard('600px','100px',{boundingBox:[0.5,1,12.5,-1],grid:false,axis:false});\nvar board = div.board;\n\n\n//reordring layers\nJXG.Options.layer['circle'] = 7;\nJXG.Options.layer['line'] = 6;\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 fixed:true\n});\n\n\na = Numbas.jme.unwrapValue(scope.variables.a);\nb = Numbas.jme.unwrapValue(scope.variables.b);\n\n\n//board.create('point',[x0,y0],{fixed:true});\n//board.create('point',[x1,y1],{fixed:true});\nboard.create('line',[[a+0.2,0],[b-0.2,0]],{strokeColor:'#00ff00',strokeWidth:2,fixed:true,straightFirst:false, straightLast:false,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[a,0],[a+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fixed:true,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[b,0],[b+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fixed:true,highlightStrokeColor:'#00ff00'});\n\n\nreturn div;", "type": "html"}, "closed": {"language": "javascript", "parameters": [], "definition": "var div = Numbas.extensions.jsxgraph.makeBoard('600px','100px',{boundingBox:[0.5,1,12.5,-1],grid:false,axis:false});\nvar board = div.board;\n\n//reordring layers\nJXG.Options.layer['circle'] = 7;\nJXG.Options.layer['line'] = 6;\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 fixed:true\n});\n\n\na = Numbas.jme.unwrapValue(scope.variables.a);\nb = Numbas.jme.unwrapValue(scope.variables.b);\n\n\n//board.create('point',[x0,y0],{fixed:true});\n//board.create('point',[x1,y1],{fixed:true});\nboard.create('line',[[a+0.2,0],[b-0.2,0]],{strokeColor:'#00ff00',strokeWidth:2,fixed:true,straightFirst:false, straightLast:false,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[a,0],[a+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fillColor:'#00ff00',fillOpacity:2,fixed:true,highlightStrokeColor:'#00ff00',highlightfillcolor:'#00ff00'});\nboard.createElement('circle',[[b,0],[b+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fillColor:'#00ff00',fillOpacity:2,fixed:true,highlightStrokeColor:'#00ff00',highlightfillcolor:'#00ff00'});\n\n\nreturn div;", "type": "html"}, "openclosed": {"language": "javascript", "parameters": [], "definition": "var div = Numbas.extensions.jsxgraph.makeBoard('600px','100px',{boundingBox:[0.5,1,12.5,-1],grid:false,axis:false});\nvar board = div.board;\n\n//reordring layers\nJXG.Options.layer['circle'] = 7;\nJXG.Options.layer['line'] = 6;\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 fixed:true\n});\n\n\na = Numbas.jme.unwrapValue(scope.variables.a);\nb = Numbas.jme.unwrapValue(scope.variables.b);\n\n\n//board.create('point',[x0,y0],{fixed:true});\n//board.create('point',[x1,y1],{fixed:true});\nboard.create('line',[[a+0.2,0],[b-0.2,0]],{strokeColor:'#00ff00',strokeWidth:2,fixed:true,straightFirst:false, straightLast:false,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[a,0],[a+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fixed:true,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[b,0],[b+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fillColor:'#00ff00',fillOpacity:2,fixed:true,highlightStrokeColor:'#00ff00',highlightfillcolor:'#00ff00'});\n\n\nreturn div;", "type": "html"}}, "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": "

The closed (square) brackets in $[\\var{a},\\var{b}]$ signify that those endpoints are included in the interval (as well as all real numbers between them). This is known as the closed interval $[\\var{a},\\var{b}]$.

\n

\n

When we graph the interval, endpoints that are not included are represented by circles that are not filled in, whereas, endpoints that are included are represented by circles that are filled in.

", "ungrouped_variables": ["a", "b", "delta"], "variables": {"delta": {"templateType": "anything", "name": "delta", "description": "

delta

", "definition": "random(2..5)", "group": "Ungrouped variables"}, "b": {"templateType": "anything", "name": "b", "description": "", "definition": "a+delta", "group": "Ungrouped variables"}, "a": {"templateType": "anything", "name": "a", "description": "", "definition": "random(2..7)", "group": "Ungrouped variables"}}, "parts": [{"showFeedbackIcon": true, "type": "1_n_2", "scripts": {}, "minMarks": 0, "distractors": ["", "", "", ""], "marks": 0, "choices": ["

{open()}

", "

{closed()}

", "

{openclosed()}

", "

{closedopen()}

"], "showCorrectAnswer": true, "shuffleChoices": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "matrix": ["0", "1", 0, 0], "displayColumns": "1", "displayType": "radiogroup"}], "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

Simple questions on interval notation. If you are not randomising the order of your questions please turn on randomise choices in these questions.

"}, "type": "question"}, {"name": "Intervals - graphing [a,b)", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "tags": [], "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

Simple questions on interval notation. If you are not randomising the order of your questions please turn on randomise choices in these questions.

"}, "variables": {"a": {"description": "", "definition": "random(2..7)", "templateType": "anything", "group": "Ungrouped variables", "name": "a"}, "b": {"description": "", "definition": "a+delta", "templateType": "anything", "group": "Ungrouped variables", "name": "b"}, "delta": {"description": "

delta

", "definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "delta"}}, "ungrouped_variables": ["a", "b", "delta"], "statement": "

Which of the following best represents the interval $[\\var{a},\\var{b})$?

", "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}, "parts": [{"type": "1_n_2", "minMarks": 0, "scripts": {}, "matrix": ["0", "0", 0, "1"], "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "maxMarks": 0, "displayColumns": "1", "showCorrectAnswer": true, "shuffleChoices": false, "choices": ["

{open()}

", "

{closed()}

", "

{openclosed()}

", "

{closedopen()}

"], "distractors": ["", "", "", ""], "marks": 0, "displayType": "radiogroup"}], "preamble": {"css": "", "js": ""}, "functions": {"openclosed": {"type": "html", "language": "javascript", "parameters": [], "definition": "var div = Numbas.extensions.jsxgraph.makeBoard('600px','100px',{boundingBox:[0.5,1,12.5,-1],grid:false,axis:false});\nvar board = div.board;\n\n//reordring layers\nJXG.Options.layer['circle'] = 7;\nJXG.Options.layer['line'] = 6;\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 fixed:true\n});\n\n\na = Numbas.jme.unwrapValue(scope.variables.a);\nb = Numbas.jme.unwrapValue(scope.variables.b);\n\n\n//board.create('point',[x0,y0],{fixed:true});\n//board.create('point',[x1,y1],{fixed:true});\nboard.create('line',[[a+0.2,0],[b-0.2,0]],{strokeColor:'#00ff00',strokeWidth:2,fixed:true,straightFirst:false, straightLast:false,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[a,0],[a+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fixed:true,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[b,0],[b+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fillColor:'#00ff00',fillOpacity:2,fixed:true,highlightStrokeColor:'#00ff00',highlightfillcolor:'#00ff00'});\n\n\nreturn div;"}, "open": {"type": "html", "language": "javascript", "parameters": [], "definition": "var div = Numbas.extensions.jsxgraph.makeBoard('600px','100px',{boundingBox:[0.5,1,12.5,-1],grid:false,axis:false});\nvar board = div.board;\n\n\n//reordring layers\nJXG.Options.layer['circle'] = 7;\nJXG.Options.layer['line'] = 6;\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 fixed:true\n});\n\n\na = Numbas.jme.unwrapValue(scope.variables.a);\nb = Numbas.jme.unwrapValue(scope.variables.b);\n\n\n//board.create('point',[x0,y0],{fixed:true});\n//board.create('point',[x1,y1],{fixed:true});\nboard.create('line',[[a+0.2,0],[b-0.2,0]],{strokeColor:'#00ff00',strokeWidth:2,fixed:true,straightFirst:false, straightLast:false,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[a,0],[a+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fixed:true,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[b,0],[b+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fixed:true,highlightStrokeColor:'#00ff00'});\n\n\nreturn div;"}, "closed": {"type": "html", "language": "javascript", "parameters": [], "definition": "var div = Numbas.extensions.jsxgraph.makeBoard('600px','100px',{boundingBox:[0.5,1,12.5,-1],grid:false,axis:false});\nvar board = div.board;\n\n//reordring layers\nJXG.Options.layer['circle'] = 7;\nJXG.Options.layer['line'] = 6;\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 fixed:true\n});\n\n\na = Numbas.jme.unwrapValue(scope.variables.a);\nb = Numbas.jme.unwrapValue(scope.variables.b);\n\n\n//board.create('point',[x0,y0],{fixed:true});\n//board.create('point',[x1,y1],{fixed:true});\nboard.create('line',[[a+0.2,0],[b-0.2,0]],{strokeColor:'#00ff00',strokeWidth:2,fixed:true,straightFirst:false, straightLast:false,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[a,0],[a+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fillColor:'#00ff00',fillOpacity:2,fixed:true,highlightStrokeColor:'#00ff00',highlightfillcolor:'#00ff00'});\nboard.createElement('circle',[[b,0],[b+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fillColor:'#00ff00',fillOpacity:2,fixed:true,highlightStrokeColor:'#00ff00',highlightfillcolor:'#00ff00'});\n\n\nreturn div;"}, "closedopen": {"type": "html", "language": "javascript", "parameters": [], "definition": "var div = Numbas.extensions.jsxgraph.makeBoard('600px','100px',{boundingBox:[0.5,1,12.5,-1],grid:false,axis:false});\nvar board = div.board;\n\n//reordring layers\nJXG.Options.layer['circle'] = 7;\nJXG.Options.layer['line'] = 6;\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 fixed:true\n});\n\n\na = Numbas.jme.unwrapValue(scope.variables.a);\nb = Numbas.jme.unwrapValue(scope.variables.b);\n\n\n//board.create('point',[x0,y0],{fixed:true});\n//board.create('point',[x1,y1],{fixed:true});\nboard.create('line',[[a+0.2,0],[b-0.2,0]],{strokeColor:'#00ff00',strokeWidth:2,fixed:true,straightFirst:false, straightLast:false,highlightStrokeColor:'#00ff00'});\nboard.createElement('circle',[[a,0],[a+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fillColor:'#00ff00',fillOpacity:2,fixed:true,highlightStrokeColor:'#00ff00',highlightfillcolor:'#00ff00'});\nboard.createElement('circle',[[b,0],[b+0.2,0]], {strokeColor:'#00ff00',strokeWidth:2, fixed:true,highlightStrokeColor:'#00ff00'});\n\n\nreturn div;"}}, "advice": "

The closed (square) bracket in $[\\var{a},\\var{b})$ signifies that the endpoint $\\var{a}$ is included in the interval whereas, the open (round) bracket signifies that the endpoint $\\var{b}$ is not included. This is known as the half-closed interval (or half-open interval) $[\\var{a},\\var{b})$.

\n

\n

When we graph the interval, endpoints that are not included are represented by circles that are not filled in, whereas, endpoints that are included are represented by circles that are filled in.

", "type": "question"}, {"name": "Giving the domain and range of some common functions", "extensions": [], "custom_part_types": [], "resources": [["question-resources/Fig1.png", "/srv/numbas/media/question-resources/Fig1.png"], ["question-resources/Fig02-piece2.png", "/srv/numbas/media/question-resources/Fig02-piece2.png"], ["question-resources/Fig03-piece3.png", "/srv/numbas/media/question-resources/Fig03-piece3.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Owen Jepps", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1195/"}], "variable_groups": [], "advice": "", "ungrouped_variables": ["ranges", "r0", "r1", "r2", "r3", "domains", "d0", "d1", "d2", "d3", "funcNames", "xIntervals", "yIntervals", "correctDomain", "correctRange", "rN0", "rN1", "rN2", "rN3", "dN0", "dN1", "dN2", "dN3"], "functions": {}, "tags": [], "variables": {"correctRange": {"templateType": "list of numbers", "name": "correctRange", "definition": "[ 3, 6, 1, 2, 0, 2 ]", "description": "", "group": "Ungrouped variables"}, "rN2": {"templateType": "anything", "name": "rN2", "definition": "filter(x<>correctRange[r2],x,shuffle(0..6))", "description": "", "group": "Ungrouped variables"}, "d3": {"templateType": "anything", "name": "d3", "definition": "domains[3]", "description": "", "group": "Ungrouped variables"}, "dN3": {"templateType": "anything", "name": "dN3", "definition": "filter(x<>correctDomain[d3],x,shuffle(0..6))", "description": "", "group": "Ungrouped variables"}, "d2": {"templateType": "anything", "name": "d2", "definition": "domains[2]", "description": "", "group": "Ungrouped variables"}, "dN2": {"templateType": "anything", "name": "dN2", "definition": "filter(x<>correctDomain[d2],x,shuffle(0..6))", "description": "", "group": "Ungrouped variables"}, "rN0": {"templateType": "anything", "name": "rN0", "definition": "filter(x<>correctRange[r0],x,shuffle(0..6))", "description": "", "group": "Ungrouped variables"}, "d0": {"templateType": "anything", "name": "d0", "definition": "domains[0]", "description": "", "group": "Ungrouped variables"}, "r0": {"templateType": "anything", "name": "r0", "definition": "ranges[0]", "description": "", "group": "Ungrouped variables"}, "r3": {"templateType": "anything", "name": "r3", "definition": "ranges[3]", "description": "", "group": "Ungrouped variables"}, "rN1": {"templateType": "anything", "name": "rN1", "definition": "filter(x<>correctRange[r1],x,shuffle(0..6))", "description": "", "group": "Ungrouped variables"}, "yIntervals": {"templateType": "list of strings", "name": "yIntervals", "definition": "[ \"$y>0$\", \"$y\\\\ge0$\", \"any real $y$\", \"$-1\\\\le y\\\\le1$\", \"$y\\\\ge1$\", \"$y\\\\le1$\", \"$y\\\\not=0$\" ]", "description": "", "group": "Ungrouped variables"}, "ranges": {"templateType": "anything", "name": "ranges", "definition": "shuffle(0..5)", "description": "", "group": "Ungrouped variables"}, "r2": {"templateType": "anything", "name": "r2", "definition": "ranges[2]", "description": "", "group": "Ungrouped variables"}, "correctDomain": {"templateType": "list of numbers", "name": "correctDomain", "definition": "[ 2, 6, 2, 2, 2, 0 ]", "description": "", "group": "Ungrouped variables"}, "dN0": {"templateType": "anything", "name": "dN0", "definition": "filter(x<>correctDomain[d0],x,shuffle(0..6))", "description": "", "group": "Ungrouped variables"}, "funcNames": {"templateType": "list of strings", "name": "funcNames", "definition": "[ \"$\\\\sin x$\", \"$1/x$\", \"$x^2$\", \"$x^3$\", \"$e^x$\", \"$\\\\ln x$\" ]", "description": "", "group": "Ungrouped variables"}, "xIntervals": {"templateType": "list of strings", "name": "xIntervals", "definition": "[ \"$x>0$\", \"$x\\\\ge0$\", \"any real $x$\", \"$-1\\\\le x\\\\le1$\", \"$x\\\\ge1$\", \"$x\\\\le1$\", \"$x\\\\not=0$\" ]", "description": "", "group": "Ungrouped variables"}, "d1": {"templateType": "anything", "name": "d1", "definition": "domains[1]", "description": "", "group": "Ungrouped variables"}, "dN1": {"templateType": "anything", "name": "dN1", "definition": "filter(x<>correctDomain[d1],x,shuffle(0..6))", "description": "", "group": "Ungrouped variables"}, "rN3": {"templateType": "anything", "name": "rN3", "definition": "filter(x<>correctRange[r3],x,shuffle(0..6))", "description": "", "group": "Ungrouped variables"}, "r1": {"templateType": "anything", "name": "r1", "definition": "ranges[1]", "description": "", "group": "Ungrouped variables"}, "domains": {"templateType": "anything", "name": "domains", "definition": "shuffle(0..5)", "description": "", "group": "Ungrouped variables"}}, "parts": [{"maxMarks": 0, "displayType": "radiogroup", "distractors": ["", "", "", ""], "choices": ["

$\\var{xIntervals[correctDomain[d0]]}$

", "

$\\var{xIntervals[dN0[0]]}$

", "

$\\var{xIntervals[dN0[1]]}$

", "

$\\var{xIntervals[dN0[2]]}$

"], "shuffleChoices": true, "showCorrectAnswer": true, "variableReplacements": [], "displayColumns": 0, "marks": 0, "minMarks": 0, "prompt": "

Give the domain of the function $y=\\var{funcNames[d0]}$

", "matrix": ["1", 0, 0, 0], "type": "1_n_2", "variableReplacementStrategy": "originalfirst", "scripts": {}, "showFeedbackIcon": true}, {"maxMarks": 0, "displayType": "radiogroup", "distractors": ["", "", "", ""], "choices": ["

$\\var{yIntervals[correctRange[r0]]}$

", "

$\\var{yIntervals[rN0[0]]}$

", "

$\\var{yIntervals[rN0[1]]}$

", "

$\\var{yIntervals[rN0[2]]}$

"], "shuffleChoices": true, "showCorrectAnswer": true, "variableReplacements": [], "displayColumns": 0, "marks": 0, "minMarks": 0, "prompt": "

Give the range of the function $y=\\var{funcNames[r0]}$

", "matrix": ["1", 0, 0, 0], "type": "1_n_2", "variableReplacementStrategy": "originalfirst", "scripts": {}, "showFeedbackIcon": true}, {"maxMarks": 0, "displayType": "radiogroup", "distractors": ["", "", "", ""], "choices": ["

$\\var{xIntervals[correctDomain[d1]]}$

", "

$\\var{xIntervals[dN1[0]]}$

", "

$\\var{xIntervals[dN1[1]]}$

", "

$\\var{xIntervals[dN1[2]]}$

"], "shuffleChoices": true, "showCorrectAnswer": true, "variableReplacements": [], "displayColumns": 0, "marks": 0, "minMarks": 0, "prompt": "

Give the domain of the function $y=\\var{funcNames[d1]}$

", "matrix": ["1", 0, 0, 0], "type": "1_n_2", "variableReplacementStrategy": "originalfirst", "scripts": {}, "showFeedbackIcon": true}, {"maxMarks": 0, "displayType": "radiogroup", "distractors": ["", "", "", ""], "choices": ["

$\\var{yIntervals[correctRange[r1]]}$

", "

$\\var{yIntervals[rN1[0]]}$

", "

$\\var{yIntervals[rN1[1]]}$

", "

$\\var{yIntervals[rN1[2]]}$

"], "shuffleChoices": true, "showCorrectAnswer": true, "variableReplacements": [], "displayColumns": 0, "marks": 0, "minMarks": 0, "prompt": "

Give the range of the function $y=\\var{funcNames[r1]}$

", "matrix": ["1", 0, 0, 0], "type": "1_n_2", "variableReplacementStrategy": "originalfirst", "scripts": {}, "showFeedbackIcon": true}, {"maxMarks": 0, "displayType": "radiogroup", "distractors": ["", "", "", ""], "choices": ["

$\\var{xIntervals[correctDomain[d2]]}$

", "

$\\var{xIntervals[dN2[0]]}$

", "

$\\var{xIntervals[dN2[1]]}$

", "

$\\var{xIntervals[dN2[2]]}$

"], "shuffleChoices": true, "showCorrectAnswer": true, "variableReplacements": [], "displayColumns": 0, "marks": 0, "minMarks": 0, "prompt": "

Give the domain of the function $y=\\var{funcNames[d2]}$

", "matrix": ["1", 0, 0, 0], "type": "1_n_2", "variableReplacementStrategy": "originalfirst", "scripts": {}, "showFeedbackIcon": true}, {"maxMarks": 0, "displayType": "radiogroup", "distractors": ["", "", "", ""], "choices": ["

$\\var{yIntervals[correctRange[r2]]}$

", "

$\\var{yIntervals[rN2[0]]}$

", "

$\\var{yIntervals[rN2[1]]}$

", "

$\\var{yIntervals[rN2[2]]}$

"], "shuffleChoices": true, "showCorrectAnswer": true, "variableReplacements": [], "displayColumns": 0, "marks": 0, "minMarks": 0, "prompt": "

Give the range of the function $y=\\var{funcNames[r2]}$

", "matrix": ["1", 0, 0, 0], "type": "1_n_2", "variableReplacementStrategy": "originalfirst", "scripts": {}, "showFeedbackIcon": true}], "preamble": {"js": "", "css": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "metadata": {"licence": "None specified", "description": ""}, "statement": "

Testing your knowledge of the domain and range of some common important functions

", "rulesets": {}, "type": "question"}]}], "type": "exam", "contributors": [{"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}], "extensions": ["geogebra", "jsxgraph"], "custom_part_types": [], "resources": [["question-resources/Fig1.png", "/srv/numbas/media/question-resources/Fig1.png"], ["question-resources/Fig02-piece2.png", "/srv/numbas/media/question-resources/Fig02-piece2.png"], ["question-resources/Fig03-piece3.png", "/srv/numbas/media/question-resources/Fig03-piece3.png"]]}