// Numbas version: finer_feedback_settings {"name": "Integration: Definite Integrals 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Integration: Definite Integrals 1", "tags": [], "metadata": {"description": "
Calculating the definite integral $\\int_{n_1}^{n_2}ax^b dx$.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Evaluate \\[ \\simplify{defint({a}x^{b},x,{n_1},{n_2})} . \\]
", "advice": "Integrating a function of the form \\[ f(x)=x^n \\] has the integral \\[ \\int_a^b x^n dx = \\left[\\frac{x^{n+1}}{n+1}\\right]_a^b,\\]
\nand \\[\\int_a^b kf(x) dx = k \\int_a^b f(x) dx.\\]
\nTherefore,
\n{advice}
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-4..4 except [0,-1,1])", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(1 .. 3#1)", "description": "", "templateType": "randrange", "can_override": false}, "n_1": {"name": "n_1", "group": "Ungrouped variables", "definition": "random(0..3)", "description": "", "templateType": "anything", "can_override": false}, "n_2": {"name": "n_2", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "advice": {"name": "advice", "group": "Ungrouped variables", "definition": "if(sol=round(sol),'{simplified}','{simplify}')", "description": "", "templateType": "anything", "can_override": false}, "sol": {"name": "sol", "group": "Ungrouped variables", "definition": "a*(n_2^(b+1)-n_1^(b+1))/(b+1)", "description": "", "templateType": "anything", "can_override": false}, "simplify": {"name": "simplify", "group": "Ungrouped variables", "definition": "\"\\\\[ \\\\begin{split}\\\\simplify{defint({a}x^{b},x,{n_1},{n_2})} = \\\\simplify{{a}defint(x^{b},x,{n_1},{n_2})}&\\\\,= \\\\left[\\\\simplify[all,fractionNumbers]{{a}x^{b+1}/{b+1}}\\\\right]_\\\\var{n_1}^\\\\var{n_2},\\\\\\\\ \\\\\\\\&\\\\,= \\\\left[\\\\frac{\\\\var{a}\\\\times\\\\var{n_2}^\\\\var{b+1}}{\\\\var{b+1}} \\\\right] - \\\\left[\\\\frac{\\\\var{a}\\\\times\\\\var{n_1}^\\\\var{b+1}}{\\\\var{b+1}} \\\\right]\\\\\\\\ &\\\\,= \\\\simplify[!noLeadingMinus,fractionNumbers]{{a*n_2^(b+1)/(b+1)}-{a*n_1^(b+1)/(b+1)}}, \\\\\\\\ &\\\\,=\\\\simplify[all]{{a}({n_2}^{b+1}-{n_1}^{b+1})/{b+1}} \\\\\\\\&\\\\,=\\\\var{sol1} \\\\end{split} \\\\]
\"", "description": "", "templateType": "long string", "can_override": false}, "sol1": {"name": "sol1", "group": "Ungrouped variables", "definition": "if(round(sol)=sol,{sol},precround(sol,2))", "description": "", "templateType": "anything", "can_override": false}, "simplified": {"name": "simplified", "group": "Ungrouped variables", "definition": "\"\\\\[ \\\\begin{split}\\\\simplify{defint({a}x^{b},x,{n_1},{n_2})} = \\\\simplify{{a}defint(x^{b},x,{n_1},{n_2})}&\\\\,= \\\\left[\\\\simplify[all,!collectNumbers,simplifyFractions]{{a}x^{b+1}/{b+1}}\\\\right]_\\\\var{n_1}^\\\\var{n_2},\\\\\\\\ \\\\\\\\&\\\\,= \\\\left[\\\\frac{\\\\var{a}\\\\times\\\\var{n_2}^\\\\var{b+1}}{\\\\var{b+1}} \\\\right] - \\\\left[\\\\frac{\\\\var{a}\\\\times\\\\var{n_1}^\\\\var{b+1}}{\\\\var{b+1}} \\\\right]\\\\\\\\ &\\\\,= \\\\simplify[!noLeadingMinus,fractionNumbers]{{a*n_2^(b+1)/(b+1)}-{a*n_1^(b+1)/(b+1)}}, \\\\\\\\ &\\\\,=\\\\simplify[all]{{a}({n_2}^{b+1}-{n_1}^{b+1})/{b+1}} \\\\end{split} \\\\]
\"", "description": "", "templateType": "long string", "can_override": false}}, "variablesTest": {"condition": "n_2>n_1", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "n_1", "n_2", "sol", "sol1", "advice", "simplified", "simplify"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "[[0]]
\n(Give your answers to two decimal places where necessary)
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{sol1}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.01", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}