// Numbas version: exam_results_page_options {"name": "Fourier Series Step function.", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"k": {"group": "Ungrouped variables", "name": "k", "templateType": "randrange", "definition": "random(2 .. 7#2)", "description": ""}, "a": {"group": "Ungrouped variables", "name": "a", "templateType": "randrange", "definition": "random(1 .. 6#1)", "description": ""}}, "tags": [], "name": "Fourier Series Step function.", "variablesTest": {"maxRuns": 100, "condition": ""}, "functions": {}, "parts": [{"prompt": "

\n

Calculate the value of the trigonometric Fourier coefficient \$$\\frac{a_{0}}{2}\$$.

\n

\$$\\frac{a_{0}}{2}=\$$ [[0]]

", "unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "marks": 0, "adaptiveMarkingPenalty": 0, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "scripts": {}, "customMarkingAlgorithm": "", "type": "gapfill", "customName": "", "showCorrectAnswer": true, "sortAnswers": false, "showFeedbackIcon": true, "gaps": [{"correctAnswerFraction": false, "variableReplacements": [], "marks": "2", "notationStyles": ["plain", "en", "si-en"], "extendBaseMarkingAlgorithm": true, "allowFractions": false, "useCustomName": false, "precisionType": "dp", "customMarkingAlgorithm": "", "mustBeReduced": false, "minValue": "({a}-{a})/2", "showCorrectAnswer": true, "showFeedbackIcon": true, "strictPrecision": false, "customName": "", "precisionMessage": "You have not given your answer to the correct precision.", "showPrecisionHint": true, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "precision": "3", "type": "numberentry", "precisionPartialCredit": 0, "maxValue": "({a}-{a})/2", "scripts": {}, "adaptiveMarkingPenalty": 0, "unitTests": []}]}, {"prompt": "

Calculate the value for the trigonometric Fourier coefficient \$$a_{k}\$$.

\n

\$$a_{k}\$$ = [[0]]

", "unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "marks": 0, "adaptiveMarkingPenalty": 0, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "scripts": {}, "customMarkingAlgorithm": "", "type": "gapfill", "customName": "", "showCorrectAnswer": false, "sortAnswers": false, "showFeedbackIcon": true, "gaps": [{"correctAnswerFraction": false, "variableReplacements": [], "marks": "2", "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "allowFractions": false, "useCustomName": false, "customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "minValue": "0", "showCorrectAnswer": true, "showFeedbackIcon": true, "customName": "", "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "0", "scripts": {}, "adaptiveMarkingPenalty": 0, "unitTests": [], "showFractionHint": true}]}, {"showPreview": true, "failureRate": 1, "variableReplacements": [], "prompt": "

Determine an expression for the trigonometric Fourier coefficient \$$b_{1}\$$, and hence evaluate \$$b_{1}\$$.

\n

\$$b_{1}\$$ =

", "extendBaseMarkingAlgorithm": true, "useCustomName": false, "answer": "-4*{a}/pi", "customMarkingAlgorithm": "", "checkingType": "absdiff", "valuegenerators": [], "showFeedbackIcon": true, "vsetRange": [0, 1], "customName": "", "checkingAccuracy": 0.001, "scripts": {}, "vsetRangePoints": 5, "variableReplacementStrategy": "originalfirst", "type": "jme", "marks": "2", "showCorrectAnswer": true, "adaptiveMarkingPenalty": 0, "unitTests": [], "checkVariableNames": false}, {"prompt": "

Determine an expression for the trigonometric Fourier coefficient \$$b_{2}\$$, and hence evaluate \$$b_{2}\$$.

\n

\$$b_{2}\$$ = [[0]]

", "unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "marks": 0, "adaptiveMarkingPenalty": 0, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "scripts": {}, "customMarkingAlgorithm": "", "type": "gapfill", "customName": "", "showCorrectAnswer": true, "sortAnswers": false, "showFeedbackIcon": true, "gaps": [{"correctAnswerFraction": true, "variableReplacements": [], "marks": "2", "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "allowFractions": true, "useCustomName": false, "customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "minValue": "0", "showCorrectAnswer": true, "showFeedbackIcon": true, "customName": "", "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "0", "scripts": {}, "adaptiveMarkingPenalty": 0, "unitTests": [], "showFractionHint": true}]}, {"showPreview": true, "failureRate": 1, "variableReplacements": [], "prompt": "

Determine an expression for the trigonometric Fourier coefficient \$$b_{n}\$$, and hence evaluate \$$b_{n}\$$, for n=1,3,....

\n

\$$b_{n}\$$ =

", "extendBaseMarkingAlgorithm": true, "useCustomName": false, "answer": "-4*{a}/(n pi)", "customMarkingAlgorithm": "", "checkingType": "absdiff", "valuegenerators": [{"value": "", "name": "n"}], "showFeedbackIcon": true, "vsetRange": [0, 1], "customName": "", "checkingAccuracy": 0.001, "scripts": {}, "vsetRangePoints": 5, "variableReplacementStrategy": "originalfirst", "type": "jme", "marks": "2", "showCorrectAnswer": true, "adaptiveMarkingPenalty": 0, "unitTests": [], "checkVariableNames": false}, {"prompt": "

Determine an expression for the trigonometric Fourier coefficient \$$b_{n}\$$, and hence evaluate \$$b_{n}\$$, for n=2,4,....

\n

\$$b_{n}\$$ =

\n

[[0]]

", "unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "marks": 0, "adaptiveMarkingPenalty": 0, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "scripts": {}, "customMarkingAlgorithm": "", "type": "gapfill", "customName": "", "showCorrectAnswer": true, "sortAnswers": false, "showFeedbackIcon": true, "gaps": [{"showPreview": true, "failureRate": 1, "variableReplacements": [], "marks": "2", "extendBaseMarkingAlgorithm": true, "useCustomName": false, "answer": "0", "customMarkingAlgorithm": "", "checkingType": "absdiff", "valuegenerators": [], "showFeedbackIcon": true, "vsetRange": [0, 1], "customName": "", "checkingAccuracy": 0.001, "scripts": {}, "vsetRangePoints": 5, "variableReplacementStrategy": "originalfirst", "type": "jme", "showCorrectAnswer": true, "adaptiveMarkingPenalty": 0, "unitTests": [], "checkVariableNames": false}]}, {"matrix": [0, "1", 0], "variableReplacements": [], "prompt": "

Is the function even or odd?

", "extendBaseMarkingAlgorithm": true, "choices": ["Even", "Odd", "Neither even or odd"], "useCustomName": false, "displayType": "radiogroup", "showFeedbackIcon": true, "customMarkingAlgorithm": "", "showCellAnswerState": true, "maxMarks": 0, "shuffleChoices": false, "customName": "", "scripts": {}, "displayColumns": 0, "variableReplacementStrategy": "originalfirst", "minMarks": 0, "type": "1_n_2", "marks": 0, "showCorrectAnswer": true, "adaptiveMarkingPenalty": 0, "unitTests": [], "distractors": ["", "", ""]}], "extensions": [], "ungrouped_variables": ["a", "k"], "statement": "

Given the function:

\n

\$$f(t)=\\left[\\begin{array}{cc}\\,\\,\\var{a} &\\,\\,-\\pi<t<0\\\\\\,\\,-\\var{a}&\\,\\,\\,\\,0<t<\\pi\\end{array}\\right] \$$

\n

Calculating particular harmonic components of a Fourier series expansion.

"}, "preamble": {"css": "", "js": ""}, "advice": "

\$$f(t)=\\{\\begin{array}{cc}\\,\\,\\var{a}&\\,\\,-\\pi<t<0\\\\\\,\\,-\\var{a}&\\,\\,\\,\\,\\,\\,\\,\\,\\,0<t<\\pi\\end{array}\$$

\n

\$$\\frac{a_0}{2}=\$$ the average value of the wave over one complete cycle

\n

\$$\\frac{a_0}{2}=\\frac{\\var{a}+\\var{a}}{2}=\\simplify{({a}+{a})/2}\$$

\n

As the function is odd

\n

\$$a_n=0\$$

\n

\$$b_n=\\frac{1}{\\pi}\\int_{-\\pi}^{\\pi} f(t)\\sin\\left(nx\\right)dx\$$

\n

\$$b_n=\\frac{1}{\\pi}\\left(\\int_{-\\pi}^{0}\\var{a}\\sin\\left({k}x\\right)dx+\\int_{0}^{\\pi}-\\var{a}\\sin\\left({n}x\\right)dx\\right)\$$

\n

\$$b_n=\\frac{1}{\\pi}\\left(\\frac{\\var{2} *\\var{a} (\\cos (\\pi n) -1) }{n}\\right)\$$

\n

\n

If \$$n\$$ is an odd number \$$\\cos(n\\pi)=-1\$$

\n

\$$b_n=\\frac{1}{\\pi}\\left(\\frac{\\var{-4} *\\var{a} }{n}\\right)\$$

\n

If \$$n\$$ is an even number \$$\\cos(n\\pi)=1\$$

\n

\$$b_n=0\$$

\n

", "variable_groups": [], "rulesets": {}, "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "John Butler", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/555/"}, {"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}]}], "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "John Butler", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/555/"}, {"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}