// Numbas version: exam_results_page_options {"name": "Graphing logarithms with vertical transformations and base>1 ", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "

The following questions will gauge your understanding of logarithms and how to graph them.

\n

The logarithm you will be working with for this question is \$y=\\simplify{{a}log(x,{b})+{c}}.\$

\n

\n

", "tags": [], "preamble": {"css": "", "js": ""}, "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

Graphing $y=a\\log_{b}(x)+c$

"}, "rulesets": {}, "ungrouped_variables": ["b", "a", "c"], "name": "Graphing logarithms with vertical transformations and base>1 ", "variablesTest": {"condition": "", "maxRuns": 100}, "functions": {"graph1": {"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: true,\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: true,\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);\n\n\n\nif(quad==1){board.create('functiongraph',[function(x){ return a*Math.log(x)/Math.log(b)+c}],{strokeWidth:2});}\nif(quad==2){board.create('functiongraph',[function(x){ return a*Math.log(-x)/Math.log(b)+c}],{strokeWidth:2});}\nif(quad==3){board.create('functiongraph',[function(x){ return -a*Math.log(x)/Math.log(b)-c}],{strokeWidth:2});}\nif(quad==4){board.create('functiongraph',[function(x){ return -a*Math.log(-x)/Math.log(b)-c}],{strokeWidth:2});}\n\nreturn div;", "language": "javascript", "parameters": [["quad", "number"]], "type": "html"}}, "extensions": ["jsxgraph"], "variables": {"c": {"group": "Ungrouped variables", "definition": "random(-4..4 except [0,a,-a])", "description": "", "templateType": "anything", "name": "c"}, "a": {"group": "Ungrouped variables", "definition": "random(-3..3 except [0,1,b])", "description": "

a

", "templateType": "anything", "name": "a"}, "b": {"group": "Ungrouped variables", "definition": "random(2..10)", "description": "", "templateType": "anything", "name": "b"}}, "parts": [{"showFeedbackIcon": true, "scripts": {}, "showCorrectAnswer": true, "prompt": "

The $x$-intercept of $y=\\simplify{{a}log(x,{b})+{c}}$ is the point $\\large($ [[0]], [[1]]$\\large)$.

\n

Note: You should input the exact answer, not just a decimal approximation.

", "variableReplacements": [], "gaps": [{"showFeedbackIcon": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showpreview": true, "expectedvariablenames": [], "vsetrange": [0, 1], "marks": 1, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "answer": "{b}^(-{c/a})", "checkvariablenames": false, "answersimplification": "fractionNumbers, simplifyFractions,basic", "checkingaccuracy": 0.001, "checkingtype": "absdiff", "type": "jme"}, {"showFeedbackIcon": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "minValue": "0", "mustBeReducedPC": 0, "marks": 1, "variableReplacementStrategy": "originalfirst", "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "correctAnswerFraction": false, "maxValue": "0", "allowFractions": false, "correctAnswerStyle": "plain"}], "marks": 0, "variableReplacementStrategy": "originalfirst", "type": "gapfill"}, {"showFeedbackIcon": true, "scripts": {}, "showCorrectAnswer": true, "prompt": "

Another easily found point on the curve is ${\\large(}\\var{b},$ [[0]]$\\large)$.

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

As $x$ increases without bound,

", "displayColumns": "1", "variableReplacements": [], "choices": ["

$y$ increases without bound.

", "

$y$ decreases without bound.

", "

$y$ approaches $\\var{c}$.

", "

$y$ approaches $0$.

"], "marks": 0, "minMarks": 0, "maxMarks": 0, "matrix": ["if(a>0,1,0)", "if(a<0,1,0)", 0, 0], "shuffleChoices": true, "variableReplacementStrategy": "originalfirst", "distractors": ["", "", "", ""], "type": "1_n_2"}, {"showFeedbackIcon": true, "scripts": {}, "showCorrectAnswer": true, "prompt": "

The vertical asymptote of $y=\\simplify{{a}log(x,{b})+{c}}$ is $x=$ [[0]].

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

Which graph best represents $y=\\simplify{{a}log(x,{b})+{c}}$?

", "displayColumns": "2", "variableReplacements": [], "choices": ["

{graph1(1)}

", "

{graph1(2)}

", "

{graph1(3)}

", "

{graph1(4)}

"], "marks": 0, "minMarks": 0, "maxMarks": 0, "matrix": ["1", 0, 0, 0], "shuffleChoices": true, "variableReplacementStrategy": "originalfirst", "distractors": ["", "", "", ""], "type": "1_n_2"}], "advice": "

This question assumes you understand the definition and the laws of logarithms.

\n

a) To find the $x$-intercept, substitute $y=0$ into the equation and solve for $x$:

\n

\\begin{align*}&&0&=\\simplify{{a}log(x,{b})+{c}}\\\\\\implies&& \\var{-c}&=\\simplify{{a}log(x,{b})}\\\\\\implies&&\\simplify[fractionNumbers,simplifyFractions,basic]{-{c/a}}&=\\simplify{log(x,{b})}\\\\\\implies&&\\simplify[fractionNumbers,simplifyFractions,basic]{{b}^(-{c/a})}&=x\\end{align*}

\n

Therefore, the $x$-intercept is the point $\\left(\\simplify[fractionNumbers,simplifyFractions,basic]{{b}^(-{c/a})},0\\right)$.

\n

b) Substitute $x=\\var{b}$ into the equation: $y=\\simplify[!collectNumbers, basic]{{a}log({b},{b})+{c}}=\\simplify[!collectNumbers]{{a}*1+{c}}=\\var{a+c}$. Therefore, another easily found point is $(\\var{b},\\var{a+c})$.

\n

c) As $x$ gets larger and larger (increases without bound, or approaches infinity) $\\simplify{{a}log(x,{b})+{c}}$ gets smaller and smaller (decreases without bound, or approaches negative infinity). larger and larger (increases without bound, or approaches infinity).

\n

d) An asymptote is a line or curve that approaches a given curve arbitrarily closely. For the curve $y=\\simplify{{a}log(x,{b})+{c}}$ the closer $x$ gets to zero (approaching from the right), the smaller larger $y$ gets (without bound). In other words, as $x$ approaches $0$ from the right, $y$ approaches negative infinity. This means that the asymptote for $y=\\log_{\\var{b}}(x)$ is the line $x=0$ (the $y$-axis).

\n

e) Given all the information above, it should be clear that the graph should look like

\n

{graph1(1)}

", "variable_groups": [], "type": "question", "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/"}]}