// Numbas version: finer_feedback_settings {"name": "Fourier series primer", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["a1", "b1", "n1r", "n1", "a2", "b2", "n2r", "n2", "a3", "b3", "a4", "b4"], "preamble": {"js": "", "css": ""}, "functions": {}, "rulesets": {}, "advice": "", "variable_groups": [{"name": "Unnamed group", "variables": []}], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

A question to test integration by parts in a \"pre-Fourier series\" setting.

"}, "variables": {"a4": {"group": "Ungrouped variables", "name": "a4", "templateType": "anything", "description": "", "definition": "random(2..6)"}, "b3": {"group": "Ungrouped variables", "name": "b3", "templateType": "anything", "description": "", "definition": "random(1..7 except a3)"}, "b4": {"group": "Ungrouped variables", "name": "b4", "templateType": "anything", "description": "", "definition": "random(1..6 except a4)"}, "n2r": {"group": "Ungrouped variables", "name": "n2r", "templateType": "anything", "description": "

n2 generators

", "definition": "random(1..4)"}, "a3": {"group": "Ungrouped variables", "name": "a3", "templateType": "anything", "description": "", "definition": "random(2..6)"}, "a1": {"group": "Ungrouped variables", "name": "a1", "templateType": "anything", "description": "", "definition": "random(2..6)"}, "a2": {"group": "Ungrouped variables", "name": "a2", "templateType": "anything", "description": "

a2

", "definition": "random(2..6)"}, "b1": {"group": "Ungrouped variables", "name": "b1", "templateType": "anything", "description": "", "definition": "random(1..5 except [0,a1])"}, "n1": {"group": "Ungrouped variables", "name": "n1", "templateType": "anything", "description": "", "definition": "2*n1r"}, "b2": {"group": "Ungrouped variables", "name": "b2", "templateType": "anything", "description": "", "definition": "random(1..7 except a2)"}, "n2": {"group": "Ungrouped variables", "name": "n2", "templateType": "anything", "description": "", "definition": "2*n2r+1"}, "n1r": {"group": "Ungrouped variables", "name": "n1r", "templateType": "anything", "description": "

n1 generator

", "definition": "random(2..5)"}}, "extensions": [], "name": "Fourier series primer", "variablesTest": {"condition": "", "maxRuns": 100}, "tags": ["integration by parts"], "parts": [{"marks": "2", "prompt": "

 $\\displaystyle \\int_0^{\\pi/2} (\\var{a1}x+\\var{b1})\\sin(\\var{n1}x) dx$ 

", "variableReplacements": [], "checkingaccuracy": 0.001, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingtype": "absdiff", "vsetrangepoints": 5, "answer": "(2*{b1}*(1-(-1)^{n1r})-{a1}*Pi*(-1)^{n1r})/(2*{n1})", "showCorrectAnswer": true, "checkvariablenames": false, "showFeedbackIcon": true, "showpreview": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "scripts": {}}, {"marks": "2", "answersimplification": "all", "prompt": "

 $\\displaystyle \\int_0^{\\pi/2} (\\var{a2}x+\\var{b2})\\sin(\\var{n2}x) dx$ 

", "variableReplacements": [], "checkingaccuracy": 0.001, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingtype": "absdiff", "vsetrangepoints": 5, "answer": "({b2}*{n2} + {a2}*(-1)^{n2r})/{n2}^2", "showCorrectAnswer": true, "checkvariablenames": false, "showFeedbackIcon": true, "showpreview": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "scripts": {}}, {"marks": "2", "prompt": "

$\\displaystyle \\int_0^{\\pi/2} (\\var{a4}x+\\var{b4})\\cos(\\var{n1}x) dx$ 

", "variableReplacements": [], "checkingaccuracy": 0.001, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingtype": "absdiff", "vsetrangepoints": 5, "answer": "{a4}*(-1+(-1)^{n1r})/({n1}^2)", "showCorrectAnswer": true, "checkvariablenames": false, "showFeedbackIcon": true, "showpreview": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "scripts": {}}, {"marks": "2", "prompt": "

 $\\displaystyle \\int_0^{\\pi/2} (\\var{a3}x+\\var{b3})\\cos(\\var{n2}x) dx$ 

", "variableReplacements": [], "checkingaccuracy": 0.001, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingtype": "absdiff", "vsetrangepoints": 5, "answer": "( {a3}*Pi*(-1)^{n2r}*({n2}) -2*{a3} + (-1)^{n2r}*2*{b3}*{n2})/(2*{n2}^2)", "showCorrectAnswer": true, "checkvariablenames": false, "showFeedbackIcon": true, "showpreview": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "scripts": {}}], "statement": "

Find the following integrals. (Give exact values: use Pi for $\\pi$.)

", "type": "question", "contributors": [{"name": "John Steele", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2218/"}]}]}], "contributors": [{"name": "John Steele", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2218/"}]}