// Numbas version: exam_results_page_options {"name": "Combining algebraic fractions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"s1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(c<0,-1,1)", "description": "", "name": "s1"}, "b2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sgn(c)*random(1..5 except [round(c*d/a2)])", "description": "", "name": "b2"}, "a2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "1", "description": "", "name": "a2"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "name": "b"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,-a])", "description": "", "name": "c"}, "nb": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(c<0,'taking away','adding')", "description": "", "name": "nb"}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5 except [0,round(a*b/a1)])", "description": "", "name": "b1"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,round(b*a2/a1)])", "description": "", "name": "d"}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "1", "description": "", "name": "a1"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "name": "a"}}, "ungrouped_variables": ["a", "c", "b", "d", "nb", "a1", "a2", "b1", "b2", "s1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Combining algebraic fractions", "functions": {}, "showQuestionGroupNames": false, "parts": [{"showCorrectAnswer": true, "marks": 0, "scripts": {}, "gaps": [{"answer": "({a*a2+a1*c}*x^2 + {b*c+a1*b2+b1*a2+a*d} * x + {b1 * d + b2 * b})/ (({a1}*x + {b}) * ({a2}*x + {d}))", "musthave": {"message": "

Input as a single fraction with the numerator as a quadratic and all terms expanded in the numerator.

", "showStrings": false, "partialCredit": 0, "strings": ["^"]}, "vsetrange": [10, 11], "checkingaccuracy": 1e-05, "showCorrectAnswer": true, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "answersimplification": "std", "variableReplacements": [], "marks": 2, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

Express \\[\\simplify{({a}x+{b1}) / ({a1}x + {b}) + ({c}x+{b2}) / ({a2}x + {d})}\\] as a single fraction.

\n

Note: you do not need to expand the denominator, but you must enter the numerator as a polynomial in $x$.

\n

Input the fraction here: [[0]]

\n

Click on Show steps for more information. You will lose one mark if you do so.

", "steps": [{"prompt": "

The formula for {nb} fractions is :
\\[\\simplify[std]{a / b + {s1} * (c / d) = (a*d + {s1} * b*c) / (b*d)}\\]

\n

and for this exercise we have $\\simplify{a={a}x+{b1}}$, $\\simplify{c={abs(c)}x+{abs(b2)}}$, $\\simplify{b=x+{b}}$, $\\simplify{d=x+{d}}$.

\n

Note that in your answer you do not need to expand the denominator.

", "scripts": {}, "type": "information", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "stepsPenalty": 1}], "statement": "

Add the following two fractions together and express as a single fraction over a common denominator.

", "tags": ["algebra", "algebraic fractions", "algebraic manipulation", "checked2015", "combining algebraic fractions", "common denominator", "MAS1601", "mas1601"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t \t\t \t\t

5/08/2012:

\n \t\t \t\t \t\t

Added tags.

\n \t\t \t\t \t\t

Added description.

\n \t\t \t\t \t\t

Changed to two questions, for the numerator and denomimator, rather than one as difficult to trap student input for this example. Still some ambiguity however.

\n \t\t \t\t \t\t

12/08/2012:

\n \t\t \t\t \t\t

Back to one input of a fraction and trapped input in Forbidden Strings.

\n \t\t \t\t \t\t

Used the except feature of ranges to get non-degenerate examples.

\n \t\t \t\t \t\t

Checked calculation.OK.

\n \t\t \t\t \t\t

Improved display in content areas.

\n \t\t \t\t \n \t\t \n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Express $\\displaystyle \\frac{ax+b}{x + c} \\pm  \\frac{dx+p}{x + q}$ as an algebraic single fraction over a common denominator. 

"}, "variablesTest": {"condition": "let(\n qa,a*a2+a1*c,\n qb,b*c+a1*b2+b1*a2+a*d,\n qc,b1*d+b2*b,\n roots,[-b/a1,-d/a2],\n \n not (((-qb+sqrt(qb*qb+4*qa*qc))/(2*qa) in roots) or ((-qb-sqrt(qb*qb+4*qa*qc))/(2*qa) in roots))\n)", "maxRuns": "300"}, "advice": "

The formula for {nb} fractions is :

\n

\\[\\simplify[std]{a / b + {s1} * (c / d) = (a*d + {s1} * b*c) / b*d}\\]

\n

and for this exercise we have $\\simplify{a={a}x+{b1}}$, $\\simplify{c={abs(c)}x+{abs(b2)}}$, $\\simplify{b=x+{b}}$, $\\simplify{d=x+{d}}$.

\n

Hence we have:
\\[\\begin{eqnarray*}\\simplify{({a}x+{b1}) / ({a1}*x + {b}) + ({c}x+{b2}) / ({a2}*x + {d})} &=& \\simplify{(({a}x+{b1}) * ({a2}*x + {d}) + ({c}x+{b2}) * ({a1}*x + {b})) / (({a1}*x + {b}) * ({a2}*x + {d}))}\\\\ &=&\\simplify[std]{ (({a*a2} * x^2 + {b1*a2+ a*d}x+{b1*d})+({a1*c}x^2+{b*c+a1*b2}x+{b*b2})) / (({a1}*x + {b}) * ({a2}*x + {d}))}\\\\&=&\\simplify[std]{ ({a*a2 + c*a1} * x^2 + {a * d +a1*b2+b1*a2+ c * b}x+{b1*d+b*b2}) / (({a1}*x + {b}) * ({a2}*x + {d}))}\\end{eqnarray*}\\]

", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}