// Numbas version: finer_feedback_settings {"name": "7b. Adding simple algebraic fractions with multiple variables", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "7b. Adding simple algebraic fractions with multiple variables", "tags": [], "metadata": {"description": "

simplifying pL1^a/n+kL2^bL1^c/m

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

Express the following as a single fraction:

\n

\\[\\simplify[basic,unitFactor,zeroPower,unitPower]{{Frac1}+{Frac2}}\\]

\n

\n

Simplify your answer where possible.

", "advice": "

Adding algebraic fractions is the same as adding ordinary fractions. First we need to write both fractions over the same denominator by multiplying the top and bottom of both fractions

\n

\\[\\simplify[basic,unitFactor,zeroPower,unitPower]{{Frac1}+{Frac2}}
=\\simplify[basic,unitFactor,zeroPower,unitPower]{({Numerator1}{Denominator2})/({Denominator1}{Denominator2})+({Numerator2}{Denominator1})/({Denominator1}{Denominator2})}\\]

\n

Finally we add the numerators together and simplify to get

\n

\\[\\simplify[basic,unitFactor,zeroPower,unitPower]{({Numerator1}{Denominator2})/({Denominator1}{Denominator2})+({Numerator2}{Denominator1})/({Denominator1}{Denominator2})}
=\\simplify[basic,unitFactor,zeroPower,unitPower]{({Numerator1}{Denominator2}+{Numerator2}{Denominator1})/({Denominator1}{Denominator2})}
=\\simplify{({Numerator1}{Denominator2}+{Numerator2}{Denominator1})/({Denominator1}{Denominator2})}.\\]

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"n": {"name": "n", "group": "Ungrouped variables", "definition": "random(2..12)", "description": "

pL1^a/n+kL2^bL1^c/m

", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(2..12 except [-n*k,k])", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "templateType": "anything", "can_override": false}, "L1": {"name": "L1", "group": "Ungrouped variables", "definition": "expression(random('x','y','a','w','c','z','n'))", "description": "", "templateType": "anything", "can_override": false}, "L2": {"name": "L2", "group": "Ungrouped variables", "definition": "expression(random(['x','y','a','w','c','z','n'] except string(L1)))", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "random(1..6)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-2..2 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-1..1)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-2..2 except a)", "description": "", "templateType": "anything", "can_override": false}, "Frac1": {"name": "Frac1", "group": "Ungrouped variables", "definition": "if(a>0,\n exec(op(\"/\"),[exec(op(\"*\"),[p,exec(op(\"^\"),[L1,a])]),n]),\n if(a<0,\n exec(op(\"/\"),[p,exec(op(\"*\"),[n,exec(op(\"^\"),[L1,-a])])]),\n 1))", "description": "", "templateType": "anything", "can_override": false}, "letter": {"name": "letter", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything", "can_override": false}, "Frac2": {"name": "Frac2", "group": "Ungrouped variables", "definition": "if(b>=0 && c>=0,\n exec(op(\"/\"),[exec(op(\"*\"),[k,exec(op(\"*\"),[exec(op(\"^\"),[L1,c]),exec(op(\"^\"),[L2,b])])]),m]),\n if(b<0 && c>=0,\n exec(op(\"/\"),[exec(op(\"*\"),[k,exec(op(\"^\"),[L1,c])]),exec(op(\"*\"),[m,exec(op(\"^\"),[L2,-b])])]),\n if(b>=0 && c<0,\n exec(op(\"/\"),[exec(op(\"*\"),[k,exec(op(\"^\"),[L2,b])]),exec(op(\"*\"),[m,exec(op(\"^\"),[L1,-c])])]),\n if(b<0 && c<0,\n exec(op(\"/\"),[k,exec(op(\"*\"),[m,exec(op(\"*\"),[exec(op(\"^\"),[L1,-c]),exec(op(\"^\"),[L2,-b])])])]),\n1))))", "description": "", "templateType": "anything", "can_override": false}, "Numerator1": {"name": "Numerator1", "group": "Ungrouped variables", "definition": "if(a>0,\n exec(op(\"*\"),[p,exec(op(\"^\"),[L1,a])]),\n if(a<0,\n p,\n 1))", "description": "", "templateType": "anything", "can_override": false}, "Denominator1": {"name": "Denominator1", "group": "Ungrouped variables", "definition": "if(a>0,\n n,\n if(a<0,\n exec(op(\"*\"),[n,exec(op(\"^\"),[L1,-a])]),\n 1))", "description": "", "templateType": "anything", "can_override": false}, "Numerator2": {"name": "Numerator2", "group": "Ungrouped variables", "definition": "if(b>=0 && c>=0,\n exec(op(\"*\"),[k,exec(op(\"*\"),[exec(op(\"^\"),[L1,c]),exec(op(\"^\"),[L2,b])])]),\n if(b<0 && c>=0,\n exec(op(\"*\"),[k,exec(op(\"^\"),[L1,c])]),\n if(b>=0 && c<0,\n exec(op(\"*\"),[k,exec(op(\"^\"),[L2,b])]),\n if(b<0 && c<0,\n k,\n1))))", "description": "", "templateType": "anything", "can_override": false}, "Denominator2": {"name": "Denominator2", "group": "Ungrouped variables", "definition": "if(b>=0 && c>=0,\n m,\n if(b<0 && c>=0,\n exec(op(\"*\"),[m,exec(op(\"^\"),[L2,-b])]),\n if(b>=0 && c<0,\n exec(op(\"*\"),[m,exec(op(\"^\"),[L1,-c])]),\n if(b<0 && c<0,\n exec(op(\"*\"),[m,exec(op(\"*\"),[exec(op(\"^\"),[L1,-c]),exec(op(\"^\"),[L2,-b])])]),\n1))))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["n", "m", "k", "p", "L1", "L2", "a", "b", "c", "Frac1", "Frac2", "letter", "Numerator1", "Denominator1", "Numerator2", "Denominator2"], "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, "answer": "({Numerator1}{Denominator2}+{Numerator2}{Denominator1})/({Denominator1}{Denominator2})", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "?/?", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4679/"}, {"name": "Andrew Neate", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21832/"}], "resources": []}]}], "contributors": [{"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4679/"}, {"name": "Andrew Neate", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21832/"}]}