// Numbas version: finer_feedback_settings {"name": "Updated Quadratic Function Fourier Series", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"rulesets": {"std": ["all", "fractionNumbers"]}, "statement": "

Calculate the Fourier Series of the function $f(x) = \\var{a}x^2$.

", "metadata": {"description": "

Widget Sales

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "functions": {}, "name": "Updated Quadratic Function Fourier Series", "parts": [{"answer": "", "checkingaccuracy": 0.001, "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "vsetrange": [0, 1], "marks": 0, "type": "jme", "prompt": "
\n
\n
\n
\n
\n
\n
Calculate the value of $a_0$.
", "expectedvariablenames": [], "checkingtype": "absdiff", "variableReplacements": [], "scripts": {}, "checkvariablenames": false}], "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"t": {"definition": "random(2..10#2)", "description": "", "templateType": "anything", "name": "t", "group": "Ungrouped variables"}, "a": {"definition": "random(1,2,3,4)", "description": "", "templateType": "anything", "name": "a", "group": "Ungrouped variables"}, "shift": {"definition": "random(-t/2..t/2 except 0)", "description": "", "templateType": "anything", "name": "shift", "group": "Ungrouped variables"}, "c": {"definition": "random(4..12#1 except t)", "description": "", "templateType": "anything", "name": "c", "group": "Ungrouped variables"}}, "ungrouped_variables": ["t", "c", "shift", "a"], "tags": [], "extensions": ["jsxgraph"], "preamble": {"js": "function dragpoint_board() {\n var scope = question.scope;\n\n JXG.Options.text.display = 'internal';\n \n var t = scope.variables.t.value;\n var c = scope.variables.c.value;\n var a = scope.variables.a.value;\n \n var div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[-3*t,a*t*t + 10,3*t,-a*t], axis:true, grid:false, title:{\n text: \"\"}});\n \n $(question.display.html).find('#dragpoint').append(div);\n \n var board = div.board;\n \n var graph = board.create('curve',\n [function(x){ return x;},\n function(x){ return a*x*x;},\n -t, t],{strokeWidth:1,strokeColor:'blue'}\n );\n var graph = board.create('curve',\n [function(x){ return x+2*t;},\n function(x){ return a*x*x;},\n -t, t],{strokeWidth:1,strokeColor:'blue'}\n );\n var graph = board.create('curve',\n [function(x){ return x-2*t;},\n function(x){ return a*x*x;},\n -t, t],{strokeWidth:1,strokeColor:'blue'}\n );\n \n \n}\n\nquestion.signals.on('HTMLAttached',function() {\n dragpoint_board();\n});", "css": "table#values th {\n background: none;\n text-align: center;\n}"}, "advice": "", "type": "question", "contributors": [{"name": "Gareth Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/978/"}]}]}], "contributors": [{"name": "Gareth Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/978/"}]}