// Numbas version: finer_feedback_settings {"name": "Graphing logarithms with horizontal and vertical transformations and base>1 ", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Graphing logarithms with horizontal and vertical transformations and base>1 ", "tags": [], "metadata": {"description": "
Graphing $y=a\\log_{b}(\\pm x+d)+c$
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "The following questions will gauge your understanding of logarithms and how to graph them.
\nThe logarithm you will be working with for this question is \\[y=\\simplify{{a}log({s}x+{d},{b})+{c}}.\\]
", "advice": "This question assumes you understand the definition and the laws of logarithms.
\na) To find the $x$-intercept, substitute $y=0$ into the equation and solve for $x$:
\n$\\begin{align*}&&0&=\\simplify{{a}log({s}x+{d},{b})+{c}}\\\\\\implies&& \\var{-c}&=\\simplify{{a}log({s}x+{d},{b})}\\\\\\implies&&\\simplify[fractionNumbers,simplifyFractions,basic]{-{c/a}}&=\\simplify{log({s}x+{d},{b})}\\\\\\implies&&\\simplify[fractionNumbers,simplifyFractions,basic]{{b}^(-{c/a})}&=\\simplify{{s}x+{d}}\\\\\\implies&&\\simplify[fractionNumbers,simplifyFractions,basic,unitDenominator,unitFactor]{({b}^(-{c/a})-{d})/{s}}&=x\\end{align*}$
\nTherefore, the $x$-intercept is the point $\\left(\\simplify[fractionNumbers,simplifyFractions,basic,unitDenominator,unitFactor]{({b}^(-{c/a})-{d})/{s}},0\\right)$.
\nb) Substitute $x=\\simplify[fractionNumbers]{{(b-d)/s}}$ into the equation: $y=\\simplify[!collectNumbers,basic,fractionNumbers]{{a}log(({(b-d)})+{d},{b})+{c}}=\\simplify[!collectNumbers,basic]{{a}log({b},{b})+{c}}=\\var{a+c}$. Therefore, another easily found point is $\\left(\\simplify[fractionNumbers]{{(b-d)/s}},\\var{a+c}\\right)$.
\n\nc) As $x$ gets larger and larger (increases without bound, or approaches infinity) $y=\\simplify{{a}log({s}x+{d},{b})+{c}}$ gets smaller and smaller (decreases without bound, or approaches negative infinity). larger and larger (increases without bound, or approaches infinity).
\n\nc) As $x$ gets smaller and smaller (decreases without bound, or approaches negative infinity) $y=\\simplify{{a}log({s}x+{d},{b})+{c}}$ gets smaller and smaller (decreases without bound, or approaches negative infinity). larger and larger (increases without bound, or approaches infinity).
\n\n\nd) An asymptote is a line or curve that approaches a given curve arbitrarily closely. For the curve $y=\\simplify{{a}log({s}x+{d},{b})+{c}}$ the closer $\\simplify{{s}x+{d}}$ gets to zero (approaching from the right), the smaller larger $y$ gets (without bound). In other words, as $x$ approaches $\\simplify[fractionNumbers]{{-d/s}}$ from the right left, $y$ approaches negative infinity. This means that the asymptote for $y=\\simplify{{a}log({s}x+{d},{b})+{c}}$ is the line $x=\\simplify[fractionNumbers]{{-d/s}}$.
\ne) Given all the information above, it should be clear that the graph should look like
\n{graph1(1)}
", "rulesets": {}, "extensions": ["jsxgraph"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-4..4 except [0,1,b])", "description": "a
", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(-4..4 except 0)", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "Ungrouped variables", "definition": "random(-1,1)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-6..6 except [0,a,b,-a])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["b", "a", "c", "d", "s"], "variable_groups": [], "functions": {"graph1": {"parameters": [["quad", "number"]], "type": "html", "language": "javascript", "definition": "var div = Numbas.extensions.jsxgraph.makeBoard('300px','300px',{boundingBox:[-12,12,12,-12],grid:true,axis:false});\nvar board = div.board;\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,2],{\n drawLabels: false,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n\n// create the y-axis\nvar yaxis = board.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\nvar yticks = board.create('ticks',[yaxis,2],{\ndrawLabels: false,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n\na = Numbas.jme.unwrapValue(scope.variables.a);\nb = Numbas.jme.unwrapValue(scope.variables.b);\nc = Numbas.jme.unwrapValue(scope.variables.c);\nd = Numbas.jme.unwrapValue(scope.variables.d);\ns = Numbas.jme.unwrapValue(scope.variables.s);\n\n\n\nif(quad==1){board.create('functiongraph',[function(x){ return a*Math.log(s*x+d)/Math.log(b)+c}],{strokeWidth:2});}\nif(quad==2){board.create('functiongraph',[function(x){ return a*Math.log(-s*x-d)/Math.log(b)+c}],{strokeWidth:2});}\nif(quad==3){board.create('functiongraph',[function(x){ return -a*Math.log(s*x+d)/Math.log(b)-c}],{strokeWidth:2});}\nif(quad==4){board.create('functiongraph',[function(x){ return -a*Math.log(-s*x-d)/Math.log(b)-c}],{strokeWidth:2});}\n\nreturn div;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "The $x$-intercept of $y=\\simplify{{a}log({s}x+{d},{b})+{c}}$ is the point $\\large($[[0]], [[1]]$\\large)$.
\nNote: You should input the exact answer, not just a decimal approximation.
", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{s}*{b}^(-{c/a})-{s}*{d}", "answerSimplification": "fractionNumbers, simplifyFractions, basic, unitFactor", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "0", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Another important point on the curve is ${\\large(}\\simplify[fractionNumbers]{{(b-d)/s}},$ [[0]]$\\large)$.
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{a+c}", "maxValue": "{a+c}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "As $x$ increases decreases without bound,
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": "1", "showCellAnswerState": true, "choices": ["$y$ increases without bound.
", "$y$ decreases without bound.
", "$y$ approaches $\\var{c}$.
", "$y$ approaches $0$.
"], "matrix": ["if(a>0,1,0)", "if(a<0,1,0)", "0", 0], "distractors": ["", "", "", ""]}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "The vertical asymptote of $y=\\simplify{{a}log({s}x+{d},{b})+{c}}$ is $x=$ [[0]].
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{-d/s}", "maxValue": "{-d/s}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Which graph best represents $y=\\simplify{{a}log({s}x+{d},{b})+{c}}$?
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": "2", "showCellAnswerState": true, "choices": ["{graph1(1)}
", "{graph1(2)}
", "{graph1(3)}
", "{graph1(4)}
"], "matrix": ["1", 0, 0, 0], "distractors": ["", "", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}