// Numbas version: exam_results_page_options {"name": "George's copy of Equation of a Chord", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"type": "question", "showQuestionGroupNames": false, "rulesets": {"dpoly": ["std", "fractionNumbers"], "std": ["all", "!collectNumbers"]}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "George's copy of Equation of a Chord", "preamble": {"js": "", "css": ""}, "metadata": {"notes": "\n \t\t

20/06/2012:

\n \t\t

Added tags.

\n \t\t

Decided to include Steps as a tag. Perhaps the presence of Steps can be searched for in another way?

\n \t\t

03/07/2012:

\n \t\t

Added tags.

\n \t\t", "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"}, "parts": [{"type": "gapfill", "marks": 0, "steps": [{"type": "jme", "marks": 0, "vsetrangepoints": 5, "vsetrange": [0, 1], "prompt": "

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}}\\]

", "answer": "", "expectedvariablenames": [], "checkvariablenames": false, "showCorrectAnswer": true, "checkingaccuracy": 0.001, "showpreview": true, "scripts": {}, "checkingtype": "absdiff"}], "showCorrectAnswer": true, "stepsPenalty": 1, "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 ", "gaps": [{"type": "numberentry", "minValue": "{val-tol}", "marks": 1, "showPrecisionHint": false, "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false, "scripts": {}, "maxValue": "{val+tol}"}, {"type": "numberentry", "minValue": "{val-tol}", "marks": 1, "showPrecisionHint": false, "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false, "scripts": {}, "maxValue": "{val+tol}"}, {"type": "numberentry", "minValue": "{val1-tol}", "marks": 1, "showPrecisionHint": false, "showCorrectAnswer": true, "correctAnswerFraction": false, "allowFractions": false, "scripts": {}, "maxValue": "{val1+tol}"}], "scripts": {}}], "functions": {}, "variable_groups": [], "ungrouped_variables": ["a", "b", "d", "val", "h", "n", "s", "b1", "tol", "val1", "d1"], "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 ", "variablesTest": {"maxRuns": 100, "condition": ""}, "tags": ["calculus", "Calculus", "checked2015", "equation of a chord", "equation of a straight line", "function", "functions", "gradient of chord", "mas1601", "MAS1601", "Newton quotient", "steps", "Steps", "straight line"], "variables": {"s": {"group": "Ungrouped variables", "name": "s", "templateType": "anything", "definition": "random(1,-1)", "description": ""}, "n": {"group": "Ungrouped variables", "name": "n", "templateType": "anything", "definition": "random(2,3)", "description": ""}, "d": {"group": "Ungrouped variables", "name": "d", "templateType": "anything", "definition": "precround((a+b)^n-d1*a,5)", "description": ""}, "b": {"group": "Ungrouped variables", "name": "b", "templateType": "anything", "definition": "if(a=-b1,-b1,b1)", "description": ""}, "val1": {"group": "Ungrouped variables", "name": "val1", "templateType": "anything", "definition": "precround(d,3)", "description": ""}, "b1": {"group": "Ungrouped variables", "name": "b1", "templateType": "anything", "definition": "random(-4,-3,-2,-1,1,2,3,4)", "description": ""}, "tol": {"group": "Ungrouped variables", "name": "tol", "templateType": "anything", "definition": "0.001", "description": ""}, "a": {"group": "Ungrouped variables", "name": "a", "templateType": "anything", "definition": "random(1..5)", "description": ""}, "val": {"group": "Ungrouped variables", "name": "val", "templateType": "anything", "definition": "precround(d1,3)", "description": ""}, "d1": {"group": "Ungrouped variables", "name": "d1", "templateType": "anything", "definition": "precround(((a+b+h)^n-(a+b)^n)/h,5)", "description": ""}, "h": {"group": "Ungrouped variables", "name": "h", "templateType": "anything", "definition": "s*random(0.005..0.1#0.005)", "description": ""}}, "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

", "contributors": [{"name": "George Loughlin", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1619/"}]}]}], "contributors": [{"name": "George Loughlin", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1619/"}]}