// Numbas version: exam_results_page_options {"name": "Difference tables 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"stp": {"name": "stp", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(0.1..1#0.1)"}, "x7": {"name": "x7", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "x6+stp"}, "d30": {"name": "d30", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "d21-d20"}, "e22": {"name": "e22", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "e21"}, "d12": {"name": "d12", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "y3-y2"}, "e16": {"name": "e16", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "y17-y16"}, "d14": {"name": "d14", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "y5-y4"}, "f1": {"name": "f1", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "y21-y20"}, "y10": {"name": "y10", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "b*x0^2+c*x0+d"}, "y0": {"name": "y0", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "a*x0^3+b*x0^2+c*x0+d"}, "x0": {"name": "x0", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(0..5#1)"}, "b": {"name": "b", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(-13..15#2)"}, "y2": {"name": "y2", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "a*x2^3+b*x2^2+c*x2+d"}, "d21": {"name": "d21", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "d12-d11"}, "d22": {"name": "d22", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "d13-d12"}, "d13": {"name": "d13", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "y4-y3"}, "y14": {"name": "y14", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "b*x4^2+c*x4+d"}, "d10": {"name": "d10", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "y1-y0"}, "y26": {"name": "y26", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "c*x6+d"}, "e13": {"name": "e13", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "y14-y13"}, "y25": {"name": "y25", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "c*x5+d"}, "y12": {"name": "y12", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "b*x2^2+c*x2+d"}, "d24": {"name": "d24", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "d15-d14"}, "y11": {"name": "y11", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "b*x1^2+c*x1+d"}, "x4": {"name": "x4", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "x3+stp"}, "x5": {"name": "x5", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "x4+stp"}, "y22": {"name": "y22", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "c*x2+d"}, "x1": {"name": "x1", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "x0+stp"}, "y27": {"name": "y27", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "c*x7+d"}, "d20": {"name": "d20", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "d11-d10"}, "y3": {"name": "y3", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "a*x3^3+b*x3^2+c*x3+d"}, "a": {"name": "a", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(2..7#1)"}, "d31": {"name": "d31", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "d22-d21"}, "d11": {"name": "d11", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "y2-y1\n"}, "e15": {"name": "e15", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "y16-y15"}, "y6": {"name": "y6", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "a*x6^3+b*x6^2+c*x6+d"}, "e20": {"name": "e20", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "e11-e10"}, "e23": {"name": "e23", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "e21"}, "y5": {"name": "y5", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "a*x5^3+b*x5^2+c*x5+d"}, "e24": {"name": "e24", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "e21"}, "d15": {"name": "d15", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "y6-y5"}, "y13": {"name": "y13", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "b*x3^2+c*x3+d"}, "e11": {"name": "e11", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "y12-y11"}, "e12": {"name": "e12", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "y13-y12"}, "e21": {"name": "e21", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "e12-e11"}, "c": {"name": "c", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(0..15#1)"}, "x2": {"name": "x2", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "x1+stp"}, "y1": {"name": "y1", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "a*x1^3+b*x1^2+c*x1+d"}, "e25": {"name": "e25", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "e21"}, "y15": {"name": "y15", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "b*x5^2+c*x5+d"}, "d": {"name": "d", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(6..24#1)"}, "y23": {"name": "y23", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "c*x3+d"}, "y24": {"name": "y24", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "c*x4+d"}, "y7": {"name": "y7", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "a*x7^3+b*x7^2+c*x7+d"}, "d32": {"name": "d32", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "d23-d22"}, "y17": {"name": "y17", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "b*x7^2+c*x7+d"}, "d25": {"name": "d25", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "d16-d15"}, "x6": {"name": "x6", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "x5+stp"}, "y16": {"name": "y16", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "b*x6^2+c*x6+d"}, "y20": {"name": "y20", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "c*x0+d"}, "y4": {"name": "y4", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "a*x4^3+b*x4^2+c*x4+d"}, "d23": {"name": "d23", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "d14-d13"}, "y21": {"name": "y21", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "c*x1+d"}, "x3": {"name": "x3", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "x2+stp"}, "e10": {"name": "e10", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "y11-y10"}, "e14": {"name": "e14", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "y15-y14"}, "d16": {"name": "d16", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "y7-y6"}}, "tags": [], "metadata": {"description": "

Use a series of difference tables to determine the coefficients of a degree three polynomial function from a set of data values, equally spaced over the x-axis.

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "name": "Difference tables 2", "parts": [{"variableReplacements": [], "showCorrectAnswer": true, "type": "gapfill", "gaps": [{"variableReplacements": [], "minValue": "{a}", "showCorrectAnswer": true, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "maxValue": "{a}", "mustBeReduced": false, "mustBeReducedPC": 0, "allowFractions": false, "scripts": {}, "marks": 1, "correctAnswerStyle": "plain"}], "prompt": "

Use a difference table to show it was generated by a degree 3 polynomial \\(f(x)=ax^3+bx^2+cx+d\\)  and hence calculate the leading coefficient,  \\(a\\).

\n

\\(a=\\) [[0]]

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

Use a modified difference table to calculate the coefficient of \\(x^2\\).

\n

\\(b=\\) [[0]] 

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

Use a modified difference table to calculate the coefficient of \\(x\\).

\n

\\(c=\\) [[0]]

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

Finally, calculate the constant value in the polynomial.

\n

\\(d=\\) [[0]]

", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0}], "rulesets": {}, "extensions": [], "variablesTest": {"condition": "", "maxRuns": 100}, "functions": {}, "variable_groups": [], "statement": "

The following set of data was generated by a polynomial.

\n

\\(\\begin{matrix} {x}&{f(x)} \\\\ \\var{x0}&\\var{y0}\\\\\\var{x1}&\\var{y1}\\\\\\var{x2}&\\var{y2}\\\\\\var{x3}&\\var{y3}\\\\\\var{x4}&\\var{y4}\\\\\\var{x5}&\\var{y5}\\\\\\var{x6}&\\var{y6}\\\\\\var{x7}&\\var{y7}\\\\\\end{matrix}\\)

\n

", "preamble": {"css": "", "js": ""}, "ungrouped_variables": ["x0", "stp", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "a", "b", "c", "d", "y0", "y1", "y2", "y3", "y4", "y5", "y6", "y7", "d10", "d11", "d12", "d13", "d14", "d15", "d16", "d20", "d21", "d22", "d23", "d24", "d25", "d30", "d31", "d32", "y10", "y11", "y12", "y13", "y14", "y15", "y16", "y17", "e10", "e11", "e12", "e13", "e14", "e15", "e16", "e20", "e21", "e22", "e23", "e24", "e25", "y20", "y21", "y22", "y23", "y24", "y25", "y26", "y27", "f1"], "advice": "

The difference table should take the form:

\n

\\(\\begin{matrix} {x}&{f(x)}&\\delta_1&\\delta_2&\\delta_3 \\\\ \\var{x0}&\\var{y0}&\\var{d10}&\\var{d20}&\\var{d30}\\\\\\var{x1}&\\var{y1}&\\var{d11}&\\var{d21}&\\var{d31}\\\\\\var{x2}&\\var{y2}&\\var{d12}&\\var{d22}&\\var{d32}\\\\\\var{x3}&\\var{y3}&\\var{d13}&\\var{d23}&\\var{d32}\\\\\\var{x4}&\\var{y4}&\\var{d14}&\\var{d24}&\\var{d32}\\\\\\var{x5}&\\var{y5}&\\var{d15}&\\var{d25}\\\\\\var{x6}&\\var{y6}&\\var{d16}\\\\\\var{x7}&\\var{y7}\\\\\\end{matrix}\\)

\n

All the 3rd differences equal the constant \\(\\var{d32}\\)

\n

The coefficient of \\(x^3\\) is given by the formula:   \\(a=\\frac{constant}{3!*(step-size)^3}\\)

\n

\\(a=\\frac{\\var{d32}}{3!*(\\var{stp})^3}=\\var{a}\\)

\n

\n

The next difference table should relate the \\(x\\) values to the \\(f(x)-\\var{a}x^3\\) values.

\n

Repeat the process:

\n

\\(\\begin{matrix} {x}&{f(x)-\\var{a}x^3}&\\delta_1&\\delta_2 \\\\ \\var{x0}&\\var{y10}&\\var{e10}&\\var{e20}\\\\\\var{x1}&\\var{y11}&\\var{e11}&\\var{e21}\\\\\\var{x2}&\\var{y12}&\\var{e12}&\\var{e22}\\\\\\var{x3}&\\var{y13}&\\var{e13}&\\var{e23}\\\\\\var{x4}&\\var{y14}&\\var{e14}&\\var{e24}\\\\\\var{x5}&\\var{y15}&\\var{e15}&\\var{e25}\\\\\\var{x6}&\\var{y16}&\\var{e16}\\\\\\var{x7}&\\var{y17}\\\\\\end{matrix}\\)

\n

All the 2nd differences equal the constant \\(\\var{e25}\\)

\n

The coefficient of \\(x^2\\) is given by:   \\(b=\\frac{\\var{e25}}{2!*(\\var{stp})^2}=\\var{b}\\)

\n

\n

The next difference table should relate the \\(x\\) values to the \\(f(x)-\\var{a}x^3-(\\var{b}x^2)\\) values.

\n

Repeat the process:

\n

\\(\\begin{matrix} {x}&{f(x)-\\var{a}x^3}-(\\var{b}x^2)&\\delta_1 \\\\ \\var{x0}&\\var{y20}&\\var{f1}&\\\\\\var{x1}&\\var{y21}&\\var{f1}\\\\\\var{x2}&\\var{y22}&\\var{f1}\\\\\\var{x3}&\\var{y23}&\\var{f1}\\\\\\var{x4}&\\var{y24}&\\var{f1}\\\\\\var{x5}&\\var{y25}&\\var{f1}\\\\\\var{x6}&\\var{y26}&\\var{f1}\\\\\\var{x7}&\\var{y27}\\\\\\end{matrix}\\)

\n

All the 1st differences equal the constant \\(\\var{f1}\\)

\n

The coefficient of \\(x\\) is given by:   \\(c=\\frac{\\var{f1}}{1!*(\\var{stp})}=\\var{c}\\)

\n

\n

\\(f(x)=\\simplify{{a}x^3+{b}x^2}+\\var{c}x+{d}\\)

\n

From the initial set of data we see that \\((\\var{x0},\\var{y0})\\) satisfies the polynomial function.

\n

\\(\\var{y0}=\\var{a}(\\var{x0})^3+(\\var{b})(\\var{x0}^2)+\\var{c}(\\var{x0})+{d}\\)

\n

\\({d}=\\var{d}\\)

\n

Therefore \\(f(x)=\\simplify{{a}x^3+{b}x^2}+\\var{c}x+\\var{d}\\)

", "type": "question", "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}