// Numbas version: exam_results_page_options {"name": "Gemma's copy of Maclaurin series (first three terms) - cosine", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["a", "number"], "functions": {}, "rulesets": {}, "preamble": {"js": "", "css": ""}, "statement": "

Consider the function $f(x)=\\cos{(\\var{a}x})$.

", "variables": {"a": {"name": "a", "definition": "random(2..9#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "number": {"name": "number", "definition": "6", "description": "", "templateType": "number", "group": "Ungrouped variables"}}, "variablesTest": {"maxRuns": 100, "condition": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find the first three non-zero terms in the Maclaurin series for $\\cos(x)$.

"}, "tags": [], "advice": "

Recall that a Maclaurin series is simply a Taylor series about the point $x_0=0$.

\n

The general expression for the Maclaurin series of a function $f(x)$ is

\n

$f(x) = f(0) + f'(0)x + \\frac{f''(0)}{2!}x^2 + \\dots + \\frac{f^{n}(0)}{n!}x^n + \\dots$

\n

For this example,
\\[\\begin{eqnarray*} f'(x)&=& -\\var{a} \\sin{\\var{a}x}\\\\ f''(x)&=& -\\var{a^2}\\cos{\\var{a}x}\\\\ f'''(x) &=& \\var{a^3}\\sin{\\var{a}x} \\\\ f^{(iv)}(x) &=& \\var{a^4}\\cos\\var{a}x\\end{eqnarray*}\\]

\n

Evaluating at $x=0$ gives:
\\[\\begin{eqnarray*} f(0)&=& 1\\\\ f'(0)&=& 0\\\\ f''(0)&=& -\\var{a^2} \\\\ f'''(0) &=& 0 \\\\ f^{(iv)}(0) &=& \\var{a^4}\\end{eqnarray*}\\]

\n


Hence the first three non-zero terms of the Maclaurin series are:

\n

\\[  1 -  \\frac{\\var{a^2}}{2}x^2+ \\frac{\\var{a^4}}{24} x^4\\]

\n

For further information see Chapter 2 (Series) notes.

", "parts": [{"vsetRangePoints": 5, "scripts": {}, "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "answer": "1 - {a^2}*x^2/2+{a^4}*x^4/24", "customMarkingAlgorithm": "", "type": "jme", "showPreview": true, "variableReplacementStrategy": "originalfirst", "marks": 4, "checkingType": "absdiff", "answerSimplification": "all,fractionNumbers,!collectNumbers", "failureRate": 1, "variableReplacements": [], "showFeedbackIcon": true, "checkingAccuracy": 0.001, "prompt": "

Find the first three non-zero terms for the Maclaurin Series of $f(x)$.

\n


Do not use factorials in your answer. For example, input 6 rather than 3!.

", "unitTests": [], "expectedVariableNames": [], "showCorrectAnswer": true, "vsetRange": [0, 1]}], "extensions": [], "name": "Gemma's copy of Maclaurin series (first three terms) - cosine", "variable_groups": [], "type": "question", "contributors": [{"name": "Adrian Jannetta", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/164/"}, {"name": "Antonia Wilmot-Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2410/"}, {"name": "Gemma Crowe", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2440/"}]}]}], "contributors": [{"name": "Adrian Jannetta", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/164/"}, {"name": "Antonia Wilmot-Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2410/"}, {"name": "Gemma Crowe", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2440/"}]}