// Numbas version: finer_feedback_settings {"name": "2.1.2.4 Evaluate f(x+h)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "2.1.2.4 Evaluate f(x+h)", "tags": [], "metadata": {"description": "
Given one of ax^2, ax^3, a/x (where a is a positive integer), calculate f(x+h) and f(x+h)-f(x)
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Given the function $f(x)=\\var{fn}$
", "advice": "Given $f(x)=\\var{fn}$
\n(a) $\\displaystyle{f(x+h)= \\var{ans1}}$
\n(b) $\\displaystyle{f(x+h)-f(x) = \\var{ans2} = \\var{ans2sim} }$
\n(b) $\\displaystyle{f(x+h)-f(x) = \\var{ans2} = \\var{ans2bits} = \\var{ans2sim} }$
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "fn": {"name": "fn", "group": "Ungrouped variables", "definition": "expression([c+\"*x^2\",c+\"*x^3\",c+\"/x\"][idx])", "description": "the function
", "templateType": "anything", "can_override": false}, "ans1": {"name": "ans1", "group": "Ungrouped variables", "definition": "expression([c+\"*(x+h)^2\",c+\"*(x+h)^3\",c+\"/(x+h)\"][idx])", "description": "The value to feed into the function.
", "templateType": "anything", "can_override": false}, "idx": {"name": "idx", "group": "Ungrouped variables", "definition": "random(0..2)", "description": "", "templateType": "anything", "can_override": false}, "ans2": {"name": "ans2", "group": "Ungrouped variables", "definition": "expression([\n c+\"*(x+h)^2-(\"+c+\"*(x)^2)\",\n c+\"*(x+h)^3-(\"+c+\"*(x)^3)\",\n c+\"/(x+h)-(\"+c+\"/x)\"\n ][idx])", "description": "", "templateType": "anything", "can_override": false}, "ans2sim": {"name": "ans2sim", "group": "Ungrouped variables", "definition": "simplify(\nexpression(\n [c+\"*2*x*h+h^2*\"+c,\n c+\"*3*x^2*h+3*\"+c+\"*x*h^2+\"+c+\"*h^3\",\n \"(-1*\"+c+\")/(x(x+h))\"][idx]),\n[\"expandBrackets\",\"all\",\"!noleadingMinus\",\"cancelTerms\"]) ", "description": "", "templateType": "anything", "can_override": false}, "ans2bits": {"name": "ans2bits", "group": "Ungrouped variables", "definition": "expression([\n \"(\"+c+\"*x^2+\"+c+\"*2*x*h+\"+c+\"*h^2)-(\"+c+\"*(x)^2)\",\n \"(\"+c+\"*x^3+\"+c+\"*3*x^2*h+\"+c+\"*3*x*h^2+\"+c+\"*h^3)-(\"+c+\"*(x)^3)\",\n c+\"/(x+h)-(\"+c+\"/x)\"\n ][idx])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["c", "fn", "idx", "ans1", "ans2", "ans2bits", "ans2sim"], "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": "find $f(x+h)$
", "answer": "{ans1}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"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": "Find $f(x+h)-f(x)$
", "answer": "{ans2}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}