// Numbas version: finer_feedback_settings {"name": "Equation of a Chord", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Equation of a Chord", "tags": ["Calculus", "calculus", "checked2015", "equation of a chord", "Equation of a straight line", "equation of a straight line", "function", "functions", "gradient of chord", "Newton quotient", "steps", "Steps", "Straight Line", "straight line"], "metadata": {"description": "

Given $f(x)=(x+b)^n$. Find the gradient and equation of the chord between $(a,f(a))$ and $(a+h,f(a+h))$ for randomised values of $a$, $b$ and $h$.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "\n

Let $f(x)=\\simplify[std]{(x+{b})^{n}}$. What are the gradient and equation of the chord between $(\\var{a},f(\\var{a}))$ and $(\\simplify[std]{{a}+{h}},f(\\simplify[std]{{a}+{h}}))$?

\n

You can get help by clicking on Show steps. If you do so you will lose 1 mark.

\n ", "advice": "

Given two points $(a,f(a))$ and $(a+h,f(a+h))$ on the graph of the function $y=f(x)$.
Then the chord is the straight line between these two points and has the equation \\[y-f(a)=m(x-a)\\] where $m$ is the gradient of the chord.
The gradient is given by dividing the change in $y$ by the change in $x$.
Hence for this example \\[m = \\frac{f(a+h)-f(a)}{h} = \\frac{f(\\var{a+h})-f(\\var{a})}{\\var{h}} = \\var{d1} = \\var{val}\\] to 3 decimal places.
Hence the equation of the chord is of the form $y=\\var{d1}x+b$ for some constant $b$.
But we know that when $x=\\var{a}$ then $y=f(\\var{a}) = \\var{a+b}^\\var{n}=\\var{(a+b)^n}$
So \\[b=\\var{(a+b)^n}-\\var{d1}\\times\\var{a} = \\var{d}=\\var{val1}\\] to 3 decimal places

", "rulesets": {"std": ["all", "!collectNumbers"], "dpoly": ["std", "fractionNumbers"]}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"val": {"name": "val", "group": "Ungrouped variables", "definition": "precround(d1,3)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(2,3)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "if(a=-b1,-b1,b1)", "description": "", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "Ungrouped variables", "definition": "s*random(0.005..0.1#0.005)", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything", "can_override": false}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.001", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(-4,-3,-2,-1,1,2,3,4)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "precround((a+b)^n-d1*a,5)", "description": "", "templateType": "anything", "can_override": false}, "d1": {"name": "d1", "group": "Ungrouped variables", "definition": "precround(((a+b+h)^n-(a+b)^n)/h,5)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "val1": {"name": "val1", "group": "Ungrouped variables", "definition": "precround(d,3)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "d", "val", "h", "n", "s", "b1", "tol", "val1", "d1"], "variable_groups": [], "functions": {}, "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": "\n

The gradient $m =$ [[0]] (input your answer to 3 decimal places).

\n

The equation of the chord is $y=ax+b$ where:

\n

$a= \\;$[[1]] and $b=\\; $[[2]]

\n

Enter both values $a$ and $b$ correct to 3 decimal places.

\n ", "stepsPenalty": 1, "steps": [{"type": "information", "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": "

Given two points $(a,f(a))$ and $(a+h,f(a+h))$ on the graph of the function $y=f(x)$.

\n

Then the chord is the straight line between these two points and has the equation \\[y-f(a)=m(x-a)\\] where $m$ is the gradient of the chord.

\n

The gradient is given by dividing the change in $y$ by the change in $x$.

\n

Hence for this example \\[m = \\frac{f(a+h)-f(a)}{h} = \\frac{f(\\var{a+h})-f(\\var{a})}{\\var{h}}\\]

"}], "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": "{val-tol}", "maxValue": "{val+tol}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "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": "{val-tol}", "maxValue": "{val+tol}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "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": "{val1-tol}", "maxValue": "{val1+tol}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "resources": []}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}