// Numbas version: finer_feedback_settings {"name": "Graphs and derivatives", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [["question-resources/01.png", "/srv/numbas/media/question-resources/01.png"], ["question-resources/02.png", "/srv/numbas/media/question-resources/02.png"], ["question-resources/03.png", "/srv/numbas/media/question-resources/03.png"], ["question-resources/04.png", "/srv/numbas/media/question-resources/04.png"], ["question-resources/05.png", "/srv/numbas/media/question-resources/05.png"], ["question-resources/06.png", "/srv/numbas/media/question-resources/06.png"], ["question-resources/07.png", "/srv/numbas/media/question-resources/07.png"], ["question-resources/01_64PppR1.png", "/srv/numbas/media/question-resources/01_64PppR1.png"], ["question-resources/02_DV1GGRw.png", "/srv/numbas/media/question-resources/02_DV1GGRw.png"], ["question-resources/03_gkxR6jw.png", "/srv/numbas/media/question-resources/03_gkxR6jw.png"], ["question-resources/04_04l6kxN.png", "/srv/numbas/media/question-resources/04_04l6kxN.png"], ["question-resources/05_dtQHfg2.png", "/srv/numbas/media/question-resources/05_dtQHfg2.png"], ["question-resources/06_hmyIi3s.png", "/srv/numbas/media/question-resources/06_hmyIi3s.png"], ["question-resources/07_BheRM8T.png", "/srv/numbas/media/question-resources/07_BheRM8T.png"], ["question-resources/08.png", "/srv/numbas/media/question-resources/08.png"], ["question-resources/08_CuEKgAA.png", "/srv/numbas/media/question-resources/08_CuEKgAA.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Graphs and derivatives", "tags": [], "metadata": {"description": "

Sketch a function graph by using fist and second derivatives.

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

Consider the function \\( f: \\mathbb{R} \\to \\mathbb{R} : x \\mapsto  \\ln{ \\frac{\\var{c} \\cdot x-\\var{a}}{x-\\var{b}} }\\, . \\)

", "advice": "

a) In order to obtain the domain of \\( f \\) , we need to solve the inequality  \\[ \\frac{\\var{c}\\cdot x-\\var{a}}{x-\\var{b}} > 0 \\]

\n

Since the sign of \\( \\frac{\\var{c}\\cdot x-\\var{a}}{x-\\var{b}} \\) is given by

\n

\\[
\\begin{array}{  c | c c c c c}
x   &            & \\simplify[all,fractionNumbers]{{nulp1}} & &  \\simplify[all,fractionNumbers]{{nulp2}} &    \\\\
    \\hline
 \\frac{\\var{c}\\cdot x-\\var{a}}{x-\\var{b}} & + & \\var{teken1} &  - & \\var{teken2} & +    \\\\
\\end{array}
\\]
we get
\\[ dom f = \\left ]  - \\infty , \\simplify[all,fractionNumbers]{{nulp1}} \\right[ \\quad \\cup  \\quad  \\left] \\simplify[all,fractionNumbers]{{nulp2}} , +\\infty \\right[  .\\]

\n

\n

b) Since \\( \\mathrm{D} \\ln x = \\frac{1}{x}  \\) , the chain rule leads to
\\[ \\mathrm{D} \\ln{\\left( \\frac{\\var{c}\\cdot x-\\var{a}}{x-\\var{b}}\\right) } = \\frac {x-\\var{b}} {\\var{c}\\cdot x-\\var{a}} \\cdot \\mathrm{D} \\frac{\\var{c}\\cdot x-\\var{a}}{x-\\var{b}} , \\]
i.e.
\\begin{align} f'(x) &= \\frac {x-\\var{b}} {\\var{c}\\cdot x-\\var{a}} \\cdot  \\frac{(x-\\var{b})\\cdot \\var{c} - (\\var{c}\\cdot x-\\var{a}) \\cdot 1}{(x-\\var{b})^2} \\\\
&=   \\frac{\\var{c}\\cdot (x-\\var{b}) - (\\var{c}\\cdot x-\\var{a}) }{(\\var{c}\\cdot x-\\var{a}) \\cdot (x-\\var{b})} \\\\
&=  \\frac{\\var{a-b*c} }{(\\var{c}\\cdot x-\\var{a}) \\cdot (x-\\var{b})}
\\end{align}

\n

Remark: you can get the same result (making abstraction of the domain) by using 
\\[ \\ln{\\left( \\frac{\\var{c}\\cdot x-\\var{a}}{x-\\var{b}}\\right) } = \\ln{\\left( {\\var{c}\\cdot x-\\var{a}}\\right) } - \\ln{\\left( {x-\\var{b}}\\right) } , \\]
such that
\\begin{align}
\\mathrm{D} \\ln{\\left( \\frac{\\var{c}\\cdot x-\\var{a}}{x-\\var{b}}\\right) } &=  \\mathrm{D} \\left( \\ln { \\left( {\\var{c}\\cdot x-\\var{a}} \\right)}  \\right) - \\mathrm{D} \\left( \\ln { \\left( {x-\\var{b}} \\right)}  \\right) \\\\
&= \\frac{1}{\\var{c}\\cdot x-\\var{a}} \\cdot \\var{c}- \\frac{1}{x-\\var{b}}\\\\
&=  \\frac{  \\var{c} \\cdot ({x-\\var{b}}) - (\\var{c} \\cdot x-\\var{a}) }{(\\var{c} \\cdot x-\\var{a}) \\cdot (x-\\var{b})} \\\\
&=  \\frac{\\var{a-b*c} }{(\\var{c} \\cdot x-\\var{a}) \\cdot (x-\\var{b})}
\\end{align}

\n

c) The second order derivative can be calculated as follows:
\\[ \\begin{align}
\\mathrm{D} \\frac{\\var{a-b*c} }{(\\var{c} \\cdot x-\\var{a}) \\cdot (x-\\var{b})} &= {\\var{a-b*c}} \\cdot \\mathrm{D} {\\left( (\\var{c} \\cdot x-\\var{a}) \\cdot (x-\\var{b}) \\right) ^{-1}}\\\\
&= {\\var{-a+b*c}} \\cdot {\\left( (\\var{c} \\cdot x-\\var{a}) \\cdot (x-\\var{b}) \\right) ^{-2}} \\cdot \\mathrm{D} {\\left( (\\var{c} \\cdot x-\\var{a}) \\cdot (x-\\var{b}) \\right) }\\\\
&=  {\\var{-a+b*c}} \\cdot {\\frac {1}{\\left( (\\var{c} \\cdot x-\\var{a}) \\cdot (x+\\var{b}) \\right) ^{2}}} \\cdot {\\left( \\var{c} \\cdot (x-\\var{b}) + (\\var{c} \\cdot x-\\var{a})  \\right) }\\\\
&= {\\var{-a+b*c}} \\cdot {\\frac {1}{\\left( (\\var{c} \\cdot x-\\var{a}) \\cdot (x+\\var{b}) \\right) ^{2}}} \\cdot {\\left( \\var{2*c} \\cdot  x - \\var{a+b*c}  \\right) }\\\\
&= \\frac{{\\var{-a+b*c}} \\cdot {\\left( \\var{2*c} \\cdot  x - \\var{a+b*c}  \\right) }}{ (\\var{c} \\cdot x-\\var{a})^2 \\cdot (x+\\var{b})^2}
\\end{align}
\\]

\n

\n

d) On each subinterval\\( f'(x) \\)  {ordeafg1}  \\( 0 \\), which implies  \\( f \\) {stijgafg1} on both \\( I_- \\)  and \\( I_+ \\).

\n

\n

e) Since\\[   \\simplify[all,fractionNumbers]{{nulp1}} <  \\simplify[all,fractionNumbers]{{a+b*c}/{2*c}} < \\simplify[all,fractionNumbers]{{nulp2}} \\]
we find
\\begin{array}{  c | c c c c c c c}
x   &            & \\simplify[all,fractionNumbers]{{nulp1}} & & \\simplify[all,fractionNumbers]{{a+b*c}/{2*c}} & &  \\simplify[all,fractionNumbers]{{nulp2}} &    \\\\
    \\hline
 f''(x) & \\var{{opI1tekenafg2}} & | & // & // & // & | & \\var{{opI2tekenafg2}}   
\\end{array}
Consequently the curvature of \\( f\\) can be determined from
\\begin{array}{  c | c c c c c c c}
x   &            & \\simplify[all,fractionNumbers]{{nulp1}} & & \\simplify[all,fractionNumbers]{{a+b*c}/{2*c}} & &  \\simplify[all,fractionNumbers]{{nulp2}} &    \\\\
    \\hline
 f''(x) & \\var{{opI1tekenafg2}} & | & // & // & // & | & \\var{{opI2tekenafg2}}    \\\\
    \\hline
f'(x) & \\var{{tekenafg1}} & | & // & // & // & | & \\var{{tekenafg1}}
\\end{array}

\n

\n

{GetekendeGrafiek()}

", "rulesets": {}, "extensions": ["jsxgraph"], "variables": {"d": {"name": "d", "group": "Ungrouped variables", "definition": "random(-5..5 except 0) ", "description": "", "templateType": "anything"}, "teken1": {"name": "teken1", "group": "Ungrouped variables", "definition": "if(d<0,\"0\",\"|\")", "description": "", "templateType": "anything"}, "nulp1": {"name": "nulp1", "group": "Ungrouped variables", "definition": "if(d>0,b,a/c)", "description": "", "templateType": "anything"}, "tekenafg1": {"name": "tekenafg1", "group": "Ungrouped variables", "definition": "if(d>0,\"+\",\"-\")", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(3..10)", "description": "

c

", "templateType": "anything"}, "ordeafg1": {"name": "ordeafg1", "group": "Ungrouped variables", "definition": "if(d<0,\"<\",\">\")", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(3..10)", "description": "

b

", "templateType": "anything"}, "nulp2": {"name": "nulp2", "group": "Ungrouped variables", "definition": "if(d>0,a/c,b)", "description": "", "templateType": "anything"}, "opI2tekenafg2": {"name": "opI2tekenafg2", "group": "Ungrouped variables", "definition": "if(d<0,\"+\",\"-\")", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "b*c+d", "description": "", "templateType": "anything"}, "opI1tekenafg2": {"name": "opI1tekenafg2", "group": "Ungrouped variables", "definition": "if(d<0,\"-\",\"+\")", "description": "", "templateType": "anything"}, "teken2": {"name": "teken2", "group": "Ungrouped variables", "definition": "if(d>0,\"0\",\"|\")", "description": "", "templateType": "anything"}, "stijgafg1": {"name": "stijgafg1", "group": "Ungrouped variables", "definition": "if(d<0,\"decreases\",\"increases\")", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "d", "nulp1", "nulp2", "teken1", "teken2", "ordeafg1", "stijgafg1", "opI1tekenafg2", "opI2tekenafg2", "tekenafg1"], "variable_groups": [], "functions": {"GetekendeGrafiek": {"parameters": [], "type": "html", "language": "javascript", "definition": "//point coordinate variables\nvar a = Numbas.jme.unwrapValue(scope.variables.a);\nvar b = Numbas.jme.unwrapValue(scope.variables.b);\nvar c = Numbas.jme.unwrapValue(scope.variables.c);\nvar nulp1 = Numbas.jme.unwrapValue(scope.variables.nulp1);\nvar nulp2 = Numbas.jme.unwrapValue(scope.variables.nulp2);\n\n//make board\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',\n{boundingBox:[-2,1.5*nulp2,1.5*nulp2,-5],grid: false,axis:true,keepaspectratio:true});\nvar board = div.board;\n\n\txaxis = board.create('axis', [[0, 0], [1,0]], \n\t {name:'X', \n\t\t\twithLabel: true, \n\t\t\tlabel: {position: 'rt', // possible values are 'lft', 'rt', 'top', 'bot'\n\t\t\t\t\t offset: [-15, 10] // (in pixels)\n\t\t\t\t\t }\n\t\t\t});\n yaxis = board.create('axis', [[0, 0], [0, 1]], \n\t\t {name:'Y', \n\t\t\twithLabel: true, \n\t\t\tlabel: {\n\t\t\t position: 'rt', // possible values are 'lft', 'rt', 'top', 'bot'\n\t\t\t offset: [-20, 0] // (in pixels)\n\t\t\t\t}\n\t\t\t});\nxaxis.removeAllTicks();\nyaxis.removeAllTicks();\n\nvar grafiek = board.create('functiongraph',\n [function(x){ return Math.log((c*x-a)/(x-b))},-10,20], \n{strokeColor:\"green\",setLabelText:'grafiek',visible: true, strokeWidth: 4, highlightStrokeColor: 'green'} \n ); \nvar asymptoot1 = board.create('curve', [\n function(t) { return nulp1;}, \n function(t) { return t;},-10,20\n],\n{strokeColor:\"red\",visible: true, strokeWidth: 1}\n ); \nvar asymptoot2 = board.create('curve', [\n function(t) { return nulp2;}, \n function(t) { return t;},-10,20\n],\n{strokeColor:\"red\",visible: true, strokeWidth: 1}\n ); \nvar asymptootHA = board.create('curve', [\n function(t) { return t;}, \n function(t) { return Math.log(c);},-10,20\n],\n{strokeColor:\"red\",visible: true, strokeWidth: 1}\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 domain of  \\( f \\) is given by:

\n

     \\( \\left ]  - \\infty , \\right. \\)  [[0]]  \\( \\left.  \\right[ \\quad \\cup  \\quad  \\left] \\right. \\) [[1]] \\( \\left. \\, , +\\infty \\right[ \\)

", "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": "{nulp1}", "maxValue": "{nulp1}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "si-en"], "correctAnswerStyle": "plain"}, {"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": "{nulp2}", "maxValue": "{nulp2}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "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": "

What is the first order derivative of \\( f \\)?
Write down your answer as a fraction with nominator an integer, and denominator in the form \\(  \\left( NaturalNumber1 *  x - NaturalNumber2 \\right) \\left(  x - NaturalNumber3\\right) \\):

\n

      \\( f' (x) = \\) [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a-b*c}/(({c}*x - {a})*(x-{b}))", "answerSimplification": "all,FractionNumbers", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "mustmatchpattern": {"pattern": "$n/(($n*x-$n)*(x-$n)) `| -$n/(($n*x-$n)*(x-$n))", "partialCredit": 0, "message": "", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "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": "

Calculate the second order derivative of  \\( f \\).
Write down \\( f''(x) \\) as a fraction with nominator an integer multiplied by a first order polynomial in \\( x \\) , and denominator in the form \\(  \\left( NaturalNumber1 *  x - NaturalNumber2 \\right)^2 \\left(  x - NatuurlijkGetal3\\right)^2 \\):

\n

     \\( f'' (x) = \\) [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "- {a-b*c} * (2*{c}*x - {a+b*c})/(({c}*x-{a})^2*(x-{b})^2)", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "mustmatchpattern": {"pattern": "$n*($n*x-$n)/(($n*x-$n)^2*(x-$n)^2) `| -$n*($n*x-$n)/(($n*x-$n)^2*(x-$n)^2)", "partialCredit": 0, "message": "Schrijf het antwoord als \\( \\frac{\\pm NatuurlijkGetal4 (NatuurlijkGetal5 * x - NatuurlijkGetal6 )}{ (NatuurlijkGetal1 * x - NatuurlijkGetal2)^2 * (x-NatuurlijkGetal3)^2} \\)", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "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": "

The domain of \\( f \\) is the union of two open intervals, where the first of these  interals, called \\(I_- \\), has as endpoint \\( -\\infty \\) and the second one, \\(I_+ \\), has endpoint \\( +\\infty \\).
Which of the following is correct?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": "1", "showCellAnswerState": true, "choices": ["The function \\( f \\) increases on both subintervals.", "The function \\( f \\) decreases on both subintervals..", "The function \\( f \\) increases on \\(I_- \\) and decreases on \\(I_+ \\).", "The function \\( f \\) decreases on \\(I_- \\) and increases on \\(I_+ \\)."], "matrix": ["if(d>0,1,0)", "if(d<0,1,0)", 0, 0], "distractors": ["", "", "", ""]}, {"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": "

Select the correct expression concerning the curvature of \\( f \\):

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": "1", "showCellAnswerState": true, "choices": ["", "", "", "", "", "", "", ""], "matrix": [0, 0, "0", 0, "if(d>0,1,0)", 0, "0", "if(d<0,1,0)"], "distractors": ["", "", "", "", "", "0", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Paul Verheyen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3610/"}]}]}], "contributors": [{"name": "Paul Verheyen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3610/"}]}