// Numbas version: exam_results_page_options {"name": "Priyanka's copy of Taylor series (three terms)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Priyanka's copy of Taylor series (three terms)", "tags": [], "metadata": {"description": "

Find the first 3 terms in the Taylor series at $x=c$ for $f(x)=(a+bx)^{1/n}$ i.e. up to and including terms in $x^2$.

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

You are asked to find the first 3 terms in the Taylor series at $x=\\var{c}$ for $f(x)=(\\simplify[all]{{a-b*c}+{b}*x})^{1/\\var{n}}$ i.e. up to terms in $x^2$.

", "advice": "

The first three terms in the Taylor series are given by $\\simplify[all]{a+b(x-{c})+c(x-{c})^2}$ where $\\displaystyle a=f(\\var{c}),\\;\\;b=f'(\\var{c}),\\;\\;c=\\frac{f''(\\var{c})}{2}$
For this example,
\\[\\begin{eqnarray*} f'(x)&=&\\simplify[all,fractionNumbers]{{b}/{n}*({a-b*c}+{b}x)^(-{n-1}/{n})}\\\\ f''(x)&=&\\simplify[all,fractionNumbers]{-{b^2*(n-1)}/{n^2}*({a-b*c}+{b}x)^(-{2*n-1}/{n})} \\end{eqnarray*} \\]
and so we get:
\\[\\begin{eqnarray*} a&=&f(\\var{c})=\\simplify[all]{{a}^(1/{n})={tm0}}\\\\ b&=&f'(\\var{c})=\\simplify[all,fractionNumbers]{{tm1}/{a*n}}\\\\ c&=&\\frac{f''(\\var{c})}{2}=\\simplify[all,fractionNumbers]{{tm2}/{2*a^2*n^2}} \\end{eqnarray*}\\]
Hence the first three terms of the Taylor series are:
\\[\\simplify[all,fractionNumbers,!collectNumbers]{{tm0}+{tm1}/{a*n}*(x-{c})+{tm2}/{2*a^2*n^2}*(x-{c})^2} \\]

", "rulesets": {}, "extensions": [], "variables": {"s1": {"name": "s1", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything"}, "tm1": {"name": "tm1", "group": "Ungrouped variables", "definition": "tm0*b", "description": "", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "if(a=4 or a=9 or a=25 or a=36 or a=49,2,if(a=8 or a=27,3,if(a=32,5,if(a=16,random(2,4),random(2..5)))))", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1,4,8,9,16,27,32,25,36,49)", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything"}, "tm0": {"name": "tm0", "group": "Ungrouped variables", "definition": "a^(1/n)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "s1*switch(a=1,random(2..9),a=4,random(3,5,7,9),a=8,random(1,3,5,7,9),a=9,random(1,2,4,5,7,8),a=16,random(1,3,5,7,9),a=32,random(1,3,5,7,9),a=25,random(1,2,4,6,7,9),a=27,random(1,2,4,5,7,8),a=36,random(1,5,7,9),random(1,2,3,4,5,8,9))", "description": "", "templateType": "anything"}, "tm2": {"name": "tm2", "group": "Ungrouped variables", "definition": "-(n-1)*tm1*b", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "tm0", "tm2", "b", "tm1", "s1", "c", "n"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 4, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "\n

Input the first three terms in the Taylor series in the form $a+b(x-\\var{c})+c(x-\\var{c})^2$ for suitable coefficients $a,\\;b$ and $c$.

\n


Input coefficients as fractions, not as decimals. Also do not use factorials in your answer. For example, input 6 rather than 3!.

\n ", "answer": "{tm0}+{tm1}/{a*n}*(x-{c})+{tm2}/{2*a^2*n^2}*(x-{c})^2", "answerSimplification": "all,fractionNumbers,!collectNumbers", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 1e-06, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "notallowed": {"strings": ["!", "."], "showStrings": false, "partialCredit": 0, "message": "

Do not input factorials or decimals in the Taylor series.

"}, "valuegenerators": [{"name": "x", "value": ""}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Priyanka Pandya", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4134/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Priyanka Pandya", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4134/"}]}