// Numbas version: exam_results_page_options {"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": [{"variable_groups": [], "variables": {"val": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(d1,3)", "description": "", "name": "val"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2,3)", "description": "", "name": "n"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(a=-b1,-b1,b1)", "description": "", "name": "b"}, "h": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s*random(0.005..0.1#0.005)", "description": "", "name": "h"}, "s": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s"}, "tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "description": "", "name": "tol"}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-4,-3,-2,-1,1,2,3,4)", "description": "", "name": "b1"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround((a+b)^n-d1*a,5)", "description": "", "name": "d"}, "d1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(((a+b+h)^n-(a+b)^n)/h,5)", "description": "", "name": "d1"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "name": "a"}, "val1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(d,3)", "description": "", "name": "val1"}}, "ungrouped_variables": ["a", "b", "d", "val", "h", "n", "s", "b1", "tol", "val1", "d1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Equation of a Chord", "functions": {}, "showQuestionGroupNames": false, "parts": [{"stepsPenalty": 1, "scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{val+tol}", "minValue": "{val-tol}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{val+tol}", "minValue": "{val-tol}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{val1+tol}", "minValue": "{val1-tol}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "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 ", "steps": [{"answer": "", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "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}}\\]

", "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 0, "vsetrangepoints": 5}], "showCorrectAnswer": true, "marks": 0}], "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 ", "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"], "rulesets": {"std": ["all", "!collectNumbers"], "dpoly": ["std", "fractionNumbers"]}, "preamble": {"css": "", "js": ""}, "type": "question", "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", "licence": "Creative Commons Attribution 4.0 International", "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$.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "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": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}