// Numbas version: exam_results_page_options {"name": "Addition and subtraction of fractions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Addition and subtraction of fractions", "type": "question", "statement": "

Evaluate the following additions and subtractions, giving each fraction in its simplest form.

", "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"d_coprime": {"description": "", "name": "d_coprime", "group": "Part a", "templateType": "anything", "definition": "d/gcd_cd"}, "hlcm2_j": {"description": "

PART B

", "name": "hlcm2_j", "group": "Part b", "templateType": "anything", "definition": "h_coprime*lcm2_j"}, "lcm2": {"description": "

PART B

", "name": "lcm2", "group": "Part b", "templateType": "anything", "definition": "lcm(g_coprime,j_coprime)"}, "denom": {"description": "

PART A answer for the denominator of part a

", "name": "denom", "group": "Part a", "templateType": "anything", "definition": "lcm/gcd"}, "term3": {"description": "", "name": "term3", "group": "Part c", "templateType": "anything", "definition": "gcd3/o_coprime"}, "a": {"description": "

PART A variable a - random number between 1 and 5.

", "name": "a", "group": "Part a", "templateType": "anything", "definition": "random(1..5)"}, "d": {"description": "

PART A variable d - random number between 5 and 15.

", "name": "d", "group": "Part a", "templateType": "anything", "definition": "random(5..15)"}, "gcd_fg": {"description": "

PART B gcd of first fraction num and denom

", "name": "gcd_fg", "group": "Part b", "templateType": "anything", "definition": "gcd(f,g)"}, "j": {"description": "

PART B

", "name": "j", "group": "Part b", "templateType": "anything", "definition": "random(2..10 except h)"}, "gcd_lm": {"description": "", "name": "gcd_lm", "group": "Part c", "templateType": "anything", "definition": "gcd(l,m)"}, "c_coprimeb_coprime": {"description": "

PART A variable c times variable b

", "name": "c_coprimeb_coprime", "group": "Part a", "templateType": "anything", "definition": "c_coprime*b_coprime"}, "l": {"description": "", "name": "l", "group": "Part c", "templateType": "anything", "definition": "random(1..3)"}, "gcd_ab": {"description": "

PART A simplification of fractions in the question.

", "name": "gcd_ab", "group": "Part a", "templateType": "anything", "definition": "gcd(a,b)"}, "k_simp": {"description": "", "name": "k_simp", "group": "Part c", "templateType": "anything", "definition": "(100k)/(gcd_k100)"}, "o_coprime": {"description": "", "name": "o_coprime", "group": "Part c", "templateType": "anything", "definition": "o/gcd_no"}, "n_coprime": {"description": "", "name": "n_coprime", "group": "Part c", "templateType": "anything", "definition": "n/gcd_no"}, "gcd_k100": {"description": "", "name": "gcd_k100", "group": "Part c", "templateType": "anything", "definition": "gcd(100k,100)"}, "lcm_b": {"description": "

PART A lcm of b and d, divided by b

", "name": "lcm_b", "group": "Part a", "templateType": "anything", "definition": "lcm/b_coprime"}, "num": {"description": "

PART A answer for the numerator input

", "name": "num", "group": "Part a", "templateType": "anything", "definition": "alcmclcm/gcd"}, "b": {"description": "

PART A variable b - random number between 5 and 10 and not the same value as d.

", "name": "b", "group": "Part a", "templateType": "anything", "definition": "random(5..10 except d)"}, "h": {"description": "

PART B

", "name": "h", "group": "Part b", "templateType": "anything", "definition": "random(1..10)"}, "gcd_no": {"description": "", "name": "gcd_no", "group": "Part c", "templateType": "anything", "definition": "gcd(n,o)"}, "f": {"description": "

PART B

", "name": "f", "group": "Part b", "templateType": "anything", "definition": "random(1..10)"}, "gcd_numgcd3": {"description": "", "name": "gcd_numgcd3", "group": "Part c", "templateType": "anything", "definition": "gcd(num1,gcd3)"}, "simp": {"description": "", "name": "simp", "group": "Part c", "templateType": "anything", "definition": "(100)/(gcd_k100)"}, "a_coprimed_coprime": {"description": "

PART A variable a times variable d

", "name": "a_coprimed_coprime", "group": "Part a", "templateType": "anything", "definition": "a_coprime*d_coprime"}, "o": {"description": "", "name": "o", "group": "Part c", "templateType": "anything", "definition": "random(5..15 except m except n except 7 except 11 except 13)"}, "lcm_d": {"description": "

PART A lcm of b and d, divided by d

", "name": "lcm_d", "group": "Part a", "templateType": "anything", "definition": "lcm/d_coprime"}, "gcd2": {"description": "

PART B

", "name": "gcd2", "group": "Part b", "templateType": "anything", "definition": "gcd(num2unsim,lcm2)"}, "c": {"description": "

PART A variable c - random number between 1 and 5.

", "name": "c", "group": "Part a", "templateType": "anything", "definition": "random(1..5)"}, "m": {"description": "", "name": "m", "group": "Part c", "templateType": "anything", "definition": "random(5..12 except 7 except 11)"}, "clcm_d": {"description": "

PART A variable c times the lcm of b and d, divided by d

", "name": "clcm_d", "group": "Part a", "templateType": "anything", "definition": "c_coprime*lcm_d"}, "h_coprime": {"description": "

PART B

", "name": "h_coprime", "group": "Part b", "templateType": "anything", "definition": "h/gcd_hj"}, "twolcm2": {"description": "

PART B

", "name": "twolcm2", "group": "Part b", "templateType": "anything", "definition": "2*lcm2"}, "lcm2_j": {"description": "

PART B

", "name": "lcm2_j", "group": "Part b", "templateType": "anything", "definition": "lcm2/j_coprime"}, "k": {"description": "", "name": "k", "group": "Part c", "templateType": "anything", "definition": "random(0.01..0.9#0.01)"}, "gcd": {"description": "

PART A greatest common divisor of the variables alcmclcm and lcm

", "name": "gcd", "group": "Part a", "templateType": "anything", "definition": "gcd(alcmclcm,lcm)"}, "m_coprime": {"description": "", "name": "m_coprime", "group": "Part c", "templateType": "anything", "definition": "m/gcd(l,m)"}, "j_coprime": {"description": "

PART B

", "name": "j_coprime", "group": "Part b", "templateType": "anything", "definition": "j/gcd_hj"}, "flcmhlcm": {"description": "

PART B

", "name": "flcmhlcm", "group": "Part b", "templateType": "anything", "definition": "flcm2_g-hlcm2_j"}, "term1": {"description": "", "name": "term1", "group": "Part c", "templateType": "anything", "definition": "gcd3/simp"}, "alcm_b": {"description": "

PART A variable a times the lcm of b and d, divided by b

", "name": "alcm_b", "group": "Part a", "templateType": "anything", "definition": "a_coprime*lcm_b"}, "a_coprime": {"description": "

PART A

", "name": "a_coprime", "group": "Part a", "templateType": "anything", "definition": "a/gcd_ab"}, "b_coprime": {"description": "

PART A 

", "name": "b_coprime", "group": "Part a", "templateType": "anything", "definition": "b/gcd_ab"}, "g_coprime": {"description": "

PART B g_coprime

", "name": "g_coprime", "group": "Part b", "templateType": "anything", "definition": "g/gcd_fg"}, "gcd_hj": {"description": "

PART B

", "name": "gcd_hj", "group": "Part b", "templateType": "anything", "definition": "gcd(h,j)"}, "gcd1": {"description": "", "name": "gcd1", "group": "Part c", "templateType": "anything", "definition": "lcm(simp,m_coprime)"}, "g": {"description": "

PART B

", "name": "g", "group": "Part b", "templateType": "anything", "definition": "random(2..10 except f except j)"}, "gcd_cd": {"description": "

PART A 

", "name": "gcd_cd", "group": "Part a", "templateType": "anything", "definition": "gcd(c,d)"}, "lcm": {"description": "

PART A lowest common multiple of variable b_coprime and variable d_coprime.

", "name": "lcm", "group": "Part a", "templateType": "anything", "definition": "lcm(b_coprime,d_coprime)"}, "flcm2_g": {"description": "

PART B

", "name": "flcm2_g", "group": "Part b", "templateType": "anything", "definition": "f_coprime*lcm2_g"}, "lcm2_g": {"description": "

PART B

", "name": "lcm2_g", "group": "Part b", "templateType": "anything", "definition": "lcm2/g_coprime"}, "term2": {"description": "", "name": "term2", "group": "Part c", "templateType": "anything", "definition": "gcd3/m_coprime"}, "n": {"description": "", "name": "n", "group": "Part c", "templateType": "anything", "definition": "random(1..5)"}, "alcmclcm": {"description": "

PART A 

", "name": "alcmclcm", "group": "Part a", "templateType": "anything", "definition": "alcm_b+clcm_d"}, "gcd3": {"description": "", "name": "gcd3", "group": "Part c", "templateType": "anything", "definition": "lcm(gcd1,o_coprime)"}, "f_coprime": {"description": "

PART B

", "name": "f_coprime", "group": "Part b", "templateType": "anything", "definition": "f/gcd_fg"}, "num1": {"description": "", "name": "num1", "group": "Part c", "templateType": "anything", "definition": "(k_simp*term1)+(l_coprime*term2)-(n_coprime*term3)"}, "c_coprime": {"description": "", "name": "c_coprime", "group": "Part a", "templateType": "anything", "definition": "c/gcd_cd"}, "num2unsim": {"description": "

PART B

", "name": "num2unsim", "group": "Part b", "templateType": "anything", "definition": "flcmhlcm+twolcm2"}, "l_coprime": {"description": "", "name": "l_coprime", "group": "Part c", "templateType": "anything", "definition": "l/gcd_lm"}}, "extensions": [], "functions": {}, "tags": ["adding and subtracting fractions", "adding fractions", "converting between decimals and fractions", "converting integers to fractions", "fractions", "Fractions", "integers", "manipulation of fractions", "subtracting fractions", "taxonomy"], "variable_groups": [{"name": "Part a", "variables": ["a", "a_coprime", "b", "b_coprime", "gcd_ab", "c", "c_coprime", "d", "d_coprime", "gcd_cd", "lcm", "a_coprimed_coprime", "c_coprimeb_coprime", "lcm_b", "lcm_d", "alcm_b", "clcm_d", "alcmclcm", "gcd", "num", "denom"]}, {"name": "Part b", "variables": ["f", "f_coprime", "g", "g_coprime", "gcd_fg", "h", "h_coprime", "j", "j_coprime", "gcd_hj", "lcm2", "lcm2_g", "flcm2_g", "lcm2_j", "hlcm2_j", "flcmhlcm", "twolcm2", "num2unsim", "gcd2"]}, {"name": "Part c", "variables": ["k", "gcd_k100", "k_simp", "simp", "l", "l_coprime", "m", "m_coprime", "gcd_lm", "n", "n_coprime", "o", "o_coprime", "gcd_no", "gcd1", "gcd3", "term1", "term2", "term3", "num1", "gcd_numgcd3"]}], "parts": [{"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "num", "showFeedbackIcon": true, "minValue": "num", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "denom", "showFeedbackIcon": true, "minValue": "denom", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "showFeedbackIcon": true, "prompt": "

$\\displaystyle\\frac{\\var{a_coprime}}{\\var{b_coprime}}+\\frac{\\var{c_coprime}}{\\var{d_coprime}}=$ [[0]] [[1]]

", "marks": 0}, {"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "num2unsim/gcd2", "showFeedbackIcon": true, "minValue": "num2unsim/gcd2", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": "2", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "lcm2/gcd2", "showFeedbackIcon": true, "minValue": "lcm2/gcd2", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "showFeedbackIcon": true, "prompt": "

$\\displaystyle\\frac{\\var{f_coprime}}{\\var{g_coprime}}-\\frac{\\var{h_coprime}}{\\var{j_coprime}}+2=$  [[0]] [[1]]

", "marks": 0}, {"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "gaps": [{"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "num1/gcd_numgcd3", "showFeedbackIcon": true, "minValue": "num1/gcd_numgcd3", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}, {"correctAnswerFraction": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "maxValue": "gcd3/gcd_numgcd3", "showFeedbackIcon": true, "minValue": "gcd3/gcd_numgcd3", "correctAnswerStyle": "plain", "allowFractions": false, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 1, "showCorrectAnswer": true}], "showFeedbackIcon": true, "prompt": "

$\\displaystyle \\var{k}+\\frac{\\var{l}}{\\var{m}}-\\frac{\\var{n}}{\\var{o}}=$ [[0]] [[1]] .

", "marks": 0}], "ungrouped_variables": [], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Manipulate fractions in order to add and subtract them. The difficulty escalates through the inclusion of a whole integer and a decimal, which both need to be converted into a fraction before the addition/subtraction can take place. 

"}, "preamble": {"css": "fraction {\n display: inline-block;\n vertical-align: middle;\n}\nfraction > numerator, fraction > denominator {\n float: left;\n width: 100%;\n text-align: center;\n line-height: 2.5em;\n}\nfraction > numerator {\n border-bottom: 1px solid;\n padding-bottom: 5px;\n}\nfraction > denominator {\n padding-top: 5px;\n}\nfraction input {\n line-height: 1em;\n}\n\nfraction .part {\n margin: 0;\n}\n\n.table-responsive, .fractiontable {\n display:inline-block;\n}\n.fractiontable {\n padding: 0; \n border: 0;\n}\n\n.fractiontable .tddenom \n{\n text-align: center;\n}\n\n.fractiontable .tdnum \n{\n border-bottom: 1px solid black; \n text-align: center;\n}\n\n\n.fractiontable tr {\n height: 3em;\n}\n", "js": ""}, "advice": "

a)

\n

$\\displaystyle\\frac{\\var{a_coprime}}{\\var{b_coprime}}+\\frac{\\var{c_coprime}}{\\var{d_coprime}}$

\n

To add or subtract fractions, we need to have a common denominator on both fractions.

\n

To get a common denominator, we need to find the lowest common multiple of the two denominators.

\n

The lowest common multiple of $\\var{b_coprime}$ and $\\var{d_coprime}$ is $\\var{lcm}.$

\n

This will be the new denominator, and we need to multiply each fraction individually to ensure we get this denominator. 

\n

For $\\displaystyle\\frac{\\var{a_coprime}}{\\var{b_coprime}}$, we need to multiply the fraction by $\\displaystyle\\frac{\\var{lcm_b}}{\\var{lcm_b}}$ to give $\\displaystyle\\frac{\\var{alcm_b}}{\\var{lcm}}.$

\n

For $\\displaystyle\\frac{\\var{c_coprime}}{\\var{d_coprime}}$, we need to multiply the fraction by $\\displaystyle\\frac{\\var{lcm_d}}{\\var{lcm_d}}$ to give $\\displaystyle\\frac{\\var{clcm_d}}{\\var{lcm}}.$

\n

Now that we have each fraction in terms of a common denominator, we can now add the fractions together. 

\n

$\\displaystyle\\frac{\\var{alcm_b}}{\\var{lcm}}+\\frac{\\var{clcm_d}}{\\var{lcm}}=\\frac{(\\var{alcm_b}+\\var{clcm_d})}{\\var{lcm}}=\\frac{\\var{alcmclcm}}{\\var{lcm}}.$

\n

From this, we can try to simplify the result down by finding the greatest common divisor of the numerator and denominator and dividing the whole fraction by this amount. 

\n

The greatest common divisor of $\\var{alcmclcm}$ and $\\var{lcm}$ is $\\var{gcd}.$

\n

Simplifying using this value gives a final answer of $\\displaystyle\\frac{\\var{num}}{\\var{denom}}.$

\n

Therefore, the expression cannot be simplified further, and $\\displaystyle\\frac{\\var{num}}{\\var{denom}}$ is the final answer.

\n

\n

b)

\n

$\\displaystyle\\frac{\\var{f_coprime}}{\\var{g_coprime}}-\\frac{\\var{h_coprime}}{\\var{j_coprime}}+2.$

\n

\n

The two fractions can be individually multiplied to achieve a common denominator of the lowest common multiple, $\\var{lcm2}.$

\n

$\\displaystyle\\frac{\\var{f_coprime}}{\\var{g_coprime}}$ becomes $\\displaystyle\\frac{\\var{flcm2_g}}{\\var{lcm2}}$ and $\\displaystyle\\frac{\\var{h_coprime}}{\\var{j_coprime}}$ becomes $\\displaystyle\\frac{\\var{hlcm2_j}}{\\var{lcm2}}.$

\n

We can now subtract the second fraction from the first.

\n

$\\displaystyle\\frac{\\var{flcm2_g}}{\\var{lcm2}}-\\frac{\\var{hlcm2_j}}{\\var{lcm2}}=\\frac{\\var{flcmhlcm}}{\\var{lcm2}}.$

\n

From this, the question asks us to add $2$. We need to change the mixed number, $2$, into an improper fraction. 

\n

$\\displaystyle2=2\\bigg(\\frac{\\var{lcm2}}{\\var{lcm2}}\\bigg)=\\frac{\\var{twolcm2}}{\\var{lcm2}}.$

\n

We can now continue with the question.

\n

$\\displaystyle\\frac{\\var{flcmhlcm}}{\\var{lcm2}}+\\frac{\\var{twolcm2}}{\\var{lcm2}}=\\frac{\\var{num2unsim}}{\\var{lcm2}}.$

\n

We can look to simplify by dividing by the greatest common divisor of $\\var{num2unsim}$ and $\\var{lcm2}$ which is $\\var{gcd2}.$

\n

Simplifying by this value gives the final answer $\\displaystyle\\simplify{{num2unsim}/{lcm2}}.$

\n

Therefore, no further simplification is possible, and $\\displaystyle\\simplify{{num2unsim}/{lcm2}}$ is the final answer.

\n

\n

c)

\n

$\\displaystyle\\var{k}+\\frac{\\var{l_coprime}}{\\var{m_coprime}}-\\frac{\\var{n_coprime}}{\\var{o_coprime}}.$

\n

We need to convert the decimal into a fraction and to do this, we need to multiply it by $10$ for every decimal place.

\n

$\\displaystyle\\frac{\\var{k}}{1}\\times\\frac{100}{100}=\\frac{\\var{100k}}{100}.$

\n

We should look to simplify by dividing by the greatest common divisor which is $\\var{gcd_k100}.$

\n

Therefore, it is not possible to simplify any further, and the fraction stays as

\n

Simplifying by this value gives the fraction

\n

\\[\\simplify{{{100k}}/{100}}\\text{.}\\]

\n

The original expression is now $\\displaystyle\\frac{\\var{k_simp}}{\\var{simp}}+\\frac{\\var{l_coprime}}{\\var{m_coprime}}-\\frac{\\var{n_coprime}}{\\var{o_coprime}}.$

\n

We can multiply each fraction individually to achieve the common denominator $\\var{gcd3}$.

\n

\\[\\frac{\\var{k_simp}}{\\var{simp}}\\text{ becomes }\\frac{\\var{k_simp*term1}}{\\var{gcd3}}\\text{, }\\frac{\\var{l_coprime}}{\\var{m_coprime}}\\text{ becomes }\\frac{\\var{l_coprime*term2}}{\\var{gcd3}}\\text{ and }\\frac{\\var{n_coprime}}{\\var{o_coprime}}\\text{ becomes }\\frac{\\var{n_coprime*term3}}{\\var{gcd3}}\\text{.}\\]

\n

We can now complete the addition. 

\n

\\[\\frac{\\var{k_simp*term1}}{\\var{gcd3}}+\\frac{\\var{l_coprime*term2}}{\\var{gcd3}}-\\frac{\\var{n_coprime*term3}}{\\var{gcd3}}=\\frac{\\var{(k_simp*term1)+(l_coprime*term2)-(n_coprime*term3)}}{\\var{gcd3}}\\text{.}\\]

\n

We should look to simplify this fraction by dividing by the highest common divisor, $\\var{gcd_numgcd3}.$

\n

Simplifying by this value gives the final answer 

\n

Therefore, it is not possible to simplify the fraction any further and the final answer is

\n

\\[\\simplify{{num1}/{gcd3}}\\text{.}\\]

", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}]}