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

Simplify (qx+a)/(rx+b) +/- (sx+c)/(tx+d)

\n

x is a randomised variable. a,b,c,d,q,r,s,t are randomised integers. a,b,c,d run from -5 to 5, including 0. q,r,s,t run from -3 to 3, and can be 0 if the constant term is nonzero, but are mostly 1.

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

Express $\\displaystyle{\\var{te[0]}\\var{sgnl}\\var{te[1]}}$ as a single fraction.

", "advice": "

\\[\\begin{align*} \\var{te[0]}\\var{sgnl}\\var{te[1]} &= \\frac{\\var{ndnde[3]}}{\\var{ndnde[3]}}\\times\\var{te[0]}\\var{sgnl}\\frac{\\var{ndnde[1]}}{\\var{ndnde[1]}}\\times\\var{te[1]}\\\\&=\\frac{\\var{cnd[0]}\\var{sgnl}\\var{cnd[1]}}{(\\var{ndnde[1]})(\\var{ndnde[3]})}\\\\&=\\frac{(\\var{cnd[2]})\\var{sgnl}(\\var{cnd[3]})}{(\\var{ndnde[1]})(\\var{ndnde[3]})}\\\\&=\\frac{\\var{cnd[4]}}{(\\var{ndnde[1]})(\\var{ndnde[3]})}\\\\&=\\var{ans} \\end{align*}\\]

\n

There is no benefit in expanding the denominator. In fact, it is best to leave the denominator factorised, because then it is easier to see if the fraction can be simplified.

\n

Use this link to find some resources which will help you revise this topic.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"te": {"name": "te", "group": "Ungrouped variables", "definition": "[simplify(expression(\"(\"+ndnd[0]+\")/(\"+ndnd[1]+\")\"),\"all\"),\n simplify(expression(\"(\"+ndnd[2]+\")/(\"+ndnd[3]+\")\"),\"all\")\n]", "description": "", "templateType": "anything", "can_override": false}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "random(\"a\",\"b\",\"c\",\"d\",\"f\",\"g\",\"h\",\"k\",\"m\",\"n\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\")", "description": "

the variable to use

", "templateType": "anything", "can_override": false}, "xc": {"name": "xc", "group": "Ungrouped variables", "definition": "repeat(weighted_random([ [1,0.7] , [random(1..3),0.3] ])\n ,4)", "description": "

the x-coefficients

", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "map(\nswitch(xc[i]=0, random(2..5),\n xc[i]=1, random(-5..5 except 0),\n xc[i]=2, random(-5..5 except [-4,-2,2,4]),\n random(-5..5 except [-xc[i],xc[i]])\n),i,[0,1,2,3])", "description": "

the constants. Make sure that the constants are coprime with their x-coefficient, and if their x-coefficient is 0, that they are positive. There is a condition in variable testing to ensure that no fraction = 1.

", "templateType": "anything", "can_override": false}, "ndnd": {"name": "ndnd", "group": "Ungrouped variables", "definition": "[\"+\"+c[0],\n xc[1]+\"*\"+v+\"+\"+c[1],\n \"+\"+c[2],\n xc[3]+\"*\"+v+\"+\"+c[3]\n ]", "description": "

numerator 1, denominator 1, numerator 2, denominator 2, as strings.

", "templateType": "anything", "can_override": false}, "sgn": {"name": "sgn", "group": "Ungrouped variables", "definition": "random(\"+\",\"-\")", "description": "", "templateType": "anything", "can_override": false}, "sgnl": {"name": "sgnl", "group": "Ungrouped variables", "definition": "latex(sgn)", "description": "

for display purposes

", "templateType": "anything", "can_override": false}, "ndnde": {"name": "ndnde", "group": "Ungrouped variables", "definition": "map(simplify(expression(x),\"all\"),x,ndnd)", "description": "", "templateType": "anything", "can_override": false}, "cnd": {"name": "cnd", "group": "Ungrouped variables", "definition": "[simplify(expression(\"(\"+ndnd[3]+\")*(\"+ndnd[0]+\")\"),\"all\"),\nsimplify(expression(\"(\"+ndnd[1]+\")*(\"+ndnd[2]+\")\"),\"all\"),\nsimplify(expression(\"(\"+ndnd[3]+\")*(\"+ndnd[0]+\")\"),[\"expandBrackets\",\"all\"]),\nsimplify(expression(\"(\"+ndnd[1]+\")*(\"+ndnd[2]+\")\"),[\"expandBrackets\",\"all\"]),\nsimplify(expression(\n string(simplify(\n expression(\"(\"+ndnd[3]+\")*(\"+ndnd[0]+\")\"),\n [\"expandBrackets\",\"all\",\"!noLeadingMinus\"])\n )+\"+\"+\n string(simplify(\n expression(sgn+\"(\"+ndnd[1]+\")*(\"+ndnd[2]+\")\"),\n [\"expandBrackets\",\"all\",\"!noLeadingMinus\"])\n )\n),[\"expandBrackets\",\"basic\"]),\n \nsimplify(expression(\n string(simplify(expression(\"(\"+ndnd[3]+\")*(\"+ndnd[0]+\")\"),\n [\"expandBrackets\",\"all\",\"!noLeadingMinus\"]))+ \"+\" +\n string(simplify(expression(sgn+\"(\"+ndnd[1]+\")*(\"+ndnd[2]+\")\"),\n [\"expandBrackets\",\"all\",\"!noLeadingMinus\"]))\n ),[\"all\",\"!noLeadingMinus\"])\n ]", "description": "

The combined numerator and denominator terms:

\n

0) numerator term 1, 1) numerator term 2,

\n

2) brackets expanded num t1, 3) brackets expanded num t2

\n

4) numerator, no brackets

\n

5) numerator simplified

\n

", "templateType": "anything", "can_override": false}, "ansnum": {"name": "ansnum", "group": "Ungrouped variables", "definition": "simplify(expression(\n string(simplify(expression(\"(\"+ndnd[3]+\")*(\"+ndnd[0]+\")\"),\n [\"expandBrackets\",\"all\",\"!noLeadingMinus\"]))+ \"+\" +\n string(simplify(expression(sgn+\"(\"+ndnd[1]+\")*(\"+ndnd[2]+\")\"),\n [\"expandBrackets\",\"all\",\"!noLeadingMinus\"]))\n ),[\"all\",\"!noLeadingMinus\"])", "description": "", "templateType": "anything", "can_override": false}, "ansden": {"name": "ansden", "group": "Ungrouped variables", "definition": "simplify(expression(\"(\"+ndnd[1]+\")*(\"+ndnd[3]+\")\"),\"all\")", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "expression(\"(\"+string(ansnum)+\")/(\"+string(ansden)+\")\")", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "(xc[0]<>xc[1] or c[0]<>c[1]) and (xc[2]<>xc[3] or c[2]<>c[3])", "maxRuns": "76"}, "ungrouped_variables": ["v", "xc", "c", "ndnd", "te", "sgn", "sgnl", "ndnde", "cnd", "ansnum", "ansden", "ans"], "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": "{ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "?`+/?`+", "partialCredit": 0, "message": "You need to give your answer as just one fraction", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}, {"name": "Andrew Neate", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21832/"}]}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}, {"name": "Andrew Neate", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21832/"}]}