// Numbas version: exam_results_page_options {"name": "Trigonometric form of a Fourier series.", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "L", "k"], "tags": [], "name": "Trigonometric form of a Fourier series.", "advice": "

\\(f(t)=\\{\\begin{array}{cc}\\,\\,\\var{a}&\\,\\,-\\var{L}<t<0\\\\\\,\\,\\var{b}&\\,\\,\\,\\,\\,\\,\\,\\,\\,0<t<\\var{L}\\end{array}\\,\\,\\,\\,\\,\\,\\,\\,\\,\\,\\,\\,f(t+\\simplify{2*{L}})=f(t)\\)

\n

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

\n

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

\n

If we could move the x-axis to \\(y=\\simplify{({a}+{b})/2}\\) the function would become odd.

\n

This implies that \\(f(t)=g(t)+\\simplify{({a}+{b})/2}\\) where \\(g(t)\\) is an odd function and hence \\(a_k=0\\).

\n

\\(b_k=\\frac{1}{L}\\int_{-L}^{L}f(t)sin\\left(\\frac{{k}\\pi}{L}t\\right)dt\\)

\n

\\(2L=\\simplify{2*{L}}\\implies L=\\var{L}\\)

\n

\\(b_k=\\frac{1}{\\var{L}}\\left(\\int_{-\\var{L}}^{0}\\var{a}sin\\left(\\frac{{k}\\pi}{\\var{L}}t\\right)dt+\\int_{0}^{\\var{L}}\\var{b}sin\\left(\\frac{{k}\\pi}{\\var{L}}t\\right)dt\\right)\\)

\n

\\(b_k=\\frac{1}{\\var{L}}\\left(-\\frac{\\var{a}*\\var{L}}{{k}\\pi}cos\\left(\\frac{{k}\\pi}{\\var{L}}t\\right)|_{-\\var{L}}^0-\\frac{\\var{b}*\\var{L}}{{k}\\pi}cos\\left(\\frac{{k}\\pi}{\\var{L}}t\\right)|_{0}^{\\var{L}}\\right)\\)

\n

\\(b_k=-\\frac{\\var{a}}{{k}\\pi}cos(0)+\\frac{\\var{a}}{{k}\\pi}cos(-\\var{k}\\pi)-\\frac{\\var{b}}{{k}\\pi}cos(\\var{k}\\pi)+\\frac{\\var{b}}{{k}\\pi}cos(0)\\)

\n

\\(b_k=\\frac{\\simplify{{b}-{a}}}{\\var{k}\\pi}-\\frac{\\simplify{{b}-{a}}}{{k}\\pi}cos(\\var{k}\\pi)\\)

\n

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

\n

\\(b_k=\\frac{\\simplify{{b}-{a}}}{\\var{k}\\pi}-\\frac{\\simplify{{b}-{a}}}{{k}\\pi}(-1)=\\frac{\\simplify{2*({b}-{a})}}{({k}*pi)}\\)

\n

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

\n

\\(b_k=\\frac{\\simplify{{b}-{a}}}{{k}\\pi}-\\frac{\\simplify{{b}-{a}}}{{k}\\pi}(1)=0\\)

\n

\\(\\implies\\) the value of the \\(\\var{k}\\)th harmonic component is given by \\(b_{\\var{k}}=\\simplify{2*({b}-{a})/({k}*pi)}\\) 

", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Calculating particular harmonic components of a Fourier series expansion.

"}, "variables": {"L": {"group": "Ungrouped variables", "definition": "random(1..7#1)", "description": "", "name": "L", "templateType": "randrange"}, "b": {"group": "Ungrouped variables", "definition": "random(0..16#2)", "description": "", "name": "b", "templateType": "randrange"}, "k": {"group": "Ungrouped variables", "definition": "random(5..19#2)", "description": "", "name": "k", "templateType": "randrange"}, "a": {"group": "Ungrouped variables", "definition": "random(1..17#2)", "description": "", "name": "a", "templateType": "randrange"}}, "rulesets": {}, "extensions": [], "preamble": {"js": "", "css": ""}, "variable_groups": [], "parts": [{"variableReplacementStrategy": "originalfirst", "scripts": {}, "gaps": [{"precisionMessage": "You have not given your answer to the correct precision.", "scripts": {}, "mustBeReducedPC": 0, "variableReplacements": [], "precision": "3", "showCorrectAnswer": true, "showPrecisionHint": true, "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "minValue": "({a}+{b})/2", "maxValue": "({a}+{b})/2", "strictPrecision": false, "showFeedbackIcon": true, "type": "numberentry", "precisionPartialCredit": 0, "precisionType": "dp", "marks": 1}], "variableReplacements": [], "prompt": "

\n

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

\n

\\(\\frac{a_{0}}{2}=\\) [[0]]

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

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

\n

\\(a_{k}\\) = [[0]]

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

Determine an expression for the trigonometric Fourier coefficient \\(b_{k}\\), and hence evaluate \\(b_{\\var{k}}\\). 

\n

 \\(b_{\\var{k}}\\) = [[0]]

", "showFeedbackIcon": true, "type": "gapfill", "showCorrectAnswer": true, "marks": 0}], "functions": {}, "statement": "

Given the function:

\n

  \\(f(t)=\\left[\\begin{array}{cc}\\,\\,\\var{a}&\\,\\,-\\var{L}<t<0\\\\\\,\\,\\var{b}&\\,\\,\\,\\,0<t<\\var{L}\\end{array}\\right]\\,\\,\\,\\,\\,\\,\\,\\,\\,\\,\\,\\,f(t+\\simplify{2*{L}})=f(t)\\)

\n

", "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/"}]}