// Numbas version: finer_feedback_settings {"name": "Partial fractions updated", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Partial fractions updated", "tags": [], "metadata": {"description": "

Asks students to find the partil fraction decomposition for a rational function Denominator is a quadratic with distinct factors.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "

We first note that

\\[\\frac{\\simplify{{A+B}x-{A*D+B*C}}}{\\simplify{x^2-{C+D}x+{C*D}}}=\\frac{\\simplify{{A+B}x-{A*D+B*C}}}{(\\simplify{x-{C}})(\\simplify{x-{D}})}
\\]
hence we want to express the function in the form
\\begin{align*}\\frac{\\simplify{{A+B}x-{A*D+B*C}}}{(\\simplify{x-{C}})(\\simplify{x-{D}})}&=\\frac{A}{(\\simplify{x-{C}})}+\\frac{B}{(\\simplify{x-{D}})}\\\\&=\\frac{A(\\simplify{x-{D}})+B(\\simplify{x-{C}})}{(\\simplify{x-{C}})(\\simplify{x-{D}})}\\end{align*}
Equating the numerators we have
\\[\\simplify{{A+B}x-{A*D+B*C}}=A(\\simplify{x-{D}})+B(\\simplify{x-{C}})
\\]
Now letting $x=\\var{D}$ we obtain
\\begin{align*}\\simplify[zeroTerm,!cancelTerms]{{(A+B)*D}-{A*D+B*C}}&=A\\times 0+B\\times\\simplify{{D-C}}\\\\\\simplify{{(A+B)*D}-{A*D+B*C}}&=\\var{D-C}B\\\\B&=\\frac{\\simplify{{(A+B)*D}-{A*D+B*C}}}{\\simplify{{D-C}}}\\\\&=\\var{B}\\end{align*}
Similarly, setting $x=\\var{C}$ we obtain
\\begin{align*}\\simplify[zeroTerm,!cancelTerms]{{(A+B)*C}-{A*D+B*C}}&=A\\times \\simplify{{C-D}}+B\\times 0\\\\\\simplify{{(A+B)*C}-{A*D+B*C}}&=- \\simplify{{C-D}}A\\\\A&=\\frac{{\\simplify{{(A+B)*C}-{A*D+B*C}}}}{\\var{C-D}}\\\\&=\\var{A}\\end{align*}
Hence our partial fraction decomposition is
\\[\\frac{\\simplify{{A+B}x-{A*D+B*C}}}{\\simplify{x^2-{C+D}x+{C*D}}}=\\frac{\\var{A}}{\\simplify{x-{C}}}+\\frac{\\var{B}}{\\simplify{x-{D}}}
\\]

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"A": {"name": "A", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "templateType": "anything", "can_override": false}, "B": {"name": "B", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "templateType": "anything", "can_override": false}, "C": {"name": "C", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "templateType": "anything", "can_override": false}, "D": {"name": "D", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,C])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["A", "B", "C", "D"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "marked_original_order (Mark the gaps in the original order, mainly to establish if every gap has a valid answer):\n map(\n mark_part(gap[\"path\"],studentAnswer),\n [gap,studentAnswer],\n zip(gaps,studentAnswer)\n )\n\ninterpreted_answers (The interpreted answers for each gap, in the original order):\n map(\n res[\"values\"][\"interpreted_answer\"],\n res,\n marked_original_order\n )\n\nanswers (The student's answers to each gap):\n if(settings[\"sortAnswers\"],\n sort(interpreted_answers)\n ,\n interpreted_answers\n )\n\ngap_order:\n if(settings[\"sortAnswers\"],\n sort_destinations(interpreted_answers)\n ,\n gap_adaptive_order\n )\n\nanswer_order:\n if(settings[\"sortAnswers\"],\n 0..(len(studentAnswer)-1)\n ,\n gap_adaptive_order\n )\n\ngap_feedback (Feedback on each of the gaps):\n map(\n try(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n gap, gaps[gap_number],\n name, gap[\"name\"],\n noFeedbackIcon, not gap[\"settings\"][\"showFeedbackIcon\"],\n non_warning_feedback, filter(x[\"op\"]<>\"warning\",x,result[\"feedback\"]),\n assert(noFeedbackIcon,\n assert(name=\"\" or len(gaps)=1 or len(non_warning_feedback)=0,feedback(translate('part.gapfill.feedback header',[\"name\": name])))\n );\n concat_feedback(non_warning_feedback, if(marks>0,result[\"marks\"]/marks,1/len(gaps)), noFeedbackIcon);\n result\n ),\n err,\n fail(translate(\"part.gapfill.error marking gap\",[\"name\": gaps[gap_number][\"name\"], \"message\": err]))\n ),\n [gap_number,answer_number],\n zip(gap_order,answer_order)\n )\n\nall_valid (Are the answers to all of the gaps valid?):\n all(map(res[\"valid\"],res,marked_original_order))\n\nstring_match:\n string(answers[0]) in string(answers[1])\n\nnumerical_match:\n numerical_compare(expression(string(answers[0])),expression(string(answers[1])))\n\ncheck_answers:\n if(numerical_match,\n sub_credit(0.5, \"Partial fractions cannot be the same\"),\n feedback(\"\")\n )\n\nmark:\n assert(all_valid or not settings[\"sortAnswers\"], fail(translate(\"question.can not submit\")));\n apply(answers);\n apply(check_answers);\n apply(gap_feedback)\n\ninterpreted_answer:\n answers", "extendBaseMarkingAlgorithm": false, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Express \\(\\displaystyle{\\frac{\\simplify{{A+B}x-{A*D+B*C}}}{\\simplify{x^2-{C+D}x+{C*D}}}}\\) in partial fraction form. Show full working on your handwritten working.

\n

\\(\\displaystyle{\\frac{\\simplify{{A+B}x-{A*D+B*C}}}{\\simplify{x^2-{C+D}x+{C*D}}}}=\\)[[0]]\\(+\\)[[1]]

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Part 1", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "jme", "useCustomName": true, "customName": "Alt part 1", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "answer": "{B}/(x-{D})", "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": [{"name": "x", "value": ""}]}], "answer": "{A}/(x-{C})", "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": [{"name": "x", "value": ""}]}, {"type": "jme", "useCustomName": true, "customName": "Part 2", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "jme", "useCustomName": true, "customName": "Alt part 2", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "answer": "{A}/(x-{C})", "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": [{"name": "x", "value": ""}]}], "answer": "{B}/(x-{D})", "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": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Don Shearman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/680/"}]}]}], "contributors": [{"name": "Don Shearman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/680/"}]}