// Numbas version: exam_results_page_options {"name": "Recognise and apply a standard integral - random coefficients version", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Recognise and apply a standard integral - random coefficients version", "tags": [], "metadata": {"description": "

This question is the one described in method 1 of the example \"Apply a standard integral\" in the Numbas documentation.

\n

The student is shown a randomly chosen function to integrate. The function is one of $e^{kx}$, $x^k$, $\\cos(kx)$, $\\sin(kx)$, with $k$ a randomly chosen integer.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Let $f(x) = \\simplify{ {c[0]} * e^({k}x) + {c[1]} * x^{k} + {c[2]} * cos({k}x) + {c[3]}*sin({k}x) }$.

", "advice": "

$f(x) = \\simplify{ {c[0]} * e^({k}x) + {c[1]} * x^{k} + {c[2]} * cos({k}x) + {c[3]}*sin({k}x) }$.

\n

The integral of $\\simplify{ {c[0]} * e^(k*x) + {c[1]} * x^k + {c[2]} * cos(k*x) + {c[3]}*sin(k*x)}$ is $\\simplify{ {c[0]} * (1/k) * e^(k*x) + {c[1]} (1/(k+1))* x^(k+1) + {c[2]} * (1/k) * sin(k*x) - {c[3]}* 1/k * cos(k*x)}$

\n

This is an indefinite integral, so we add an arbitrary constant of integration $C$.

\n

Here, $k = \\var{k}$, so

\n

\\[ \\int f(x) \\, \\mathrm{d}x = \\simplify{{c[0]} * (1/{k}) * e^({k}x) + {c[1]} * (1/{k+1}) * x^{k+1} + {c[2]} * 1/{k} * sin({k}x) + {c[3]} * -1/{k}*cos({k}x)} + C \\]

", "rulesets": {}, "extensions": [], "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "shuffle([1,0,0,0])", "description": "", "templateType": "anything"}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(2 .. 9#1)", "description": "", "templateType": "randrange"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["c", "k"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is $\\int f(x) \\, \\mathrm{d}x$?

", "alternatives": [{"type": "jme", "useCustomName": true, "customName": "Forgot constant of integration", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "

Did you forget to include a constant of integration?

", "useAlternativeFeedback": false, "answer": "{c[0]} * (1/{k}) * e^({k}x) + {c[1]} * (1/{k+1}) * x^{k+1} + {c[2]} * 1/{k} * sin({k}x) + {c[3]} * -1/{k}*cos({k}x)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "jme", "useCustomName": true, "customName": "Differentiated - no constant of integration", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "

Did you differentiate instead of integrating?

", "useAlternativeFeedback": false, "answer": "{c[0]} * {k} * e^({k}x) + {c[1]} * {k} * x^{k-1} + {c[2]} * {-k} * sin({k}x) + {c[3]} * {k} * cos({k}x)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "jme", "useCustomName": true, "customName": "Differentiated - constant of integration", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "

Did you differentiate instead of integrating?

", "useAlternativeFeedback": false, "answer": "{c[0]} * {k} * e^({k}x) + {c[1]} * {k} * x^{k-1} + {c[2]} * {-k} * sin({k}x) + {c[3]} * {k} * cos({k}x) + C", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "c", "value": ""}, {"name": "x", "value": ""}]}], "answer": "{c[0]} * (1/{k}) * e^({k}x) + {c[1]} * (1/{k+1}) * x^{k+1} + {c[2]} * 1/{k} * sin({k}x) + {c[3]} * -1/{k}*cos({k}x)+C", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "c", "value": ""}, {"name": "x", "value": ""}]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}