// Numbas version: finer_feedback_settings {"navigation": {"allowregen": true, "reverse": true, "showresultspage": "oncompletion", "onleave": {"message": "", "action": "none"}, "browse": true, "showfrontpage": true, "preventleave": true}, "metadata": {"licence": "None specified", "description": ""}, "showQuestionGroupNames": false, "duration": 0, "name": "Initial maths test", "showstudentname": true, "feedback": {"feedbackmessages": [], "showanswerstate": true, "intro": "", "showactualmark": true, "allowrevealanswer": true, "advicethreshold": 0, "showtotalmark": true, "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "never"}, "question_groups": [{"pickQuestions": 1, "name": "Group", "pickingStrategy": "all-ordered", "questions": [{"name": "J. Richard's copy of Decimals to fractions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}, {"name": "J. Richard Snape", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1700/"}], "variable_groups": [{"name": "Part a", "variables": ["a", "b", "c", "d", "b_", "b_coprime", "d_coprime", "answer", "cround"]}, {"name": "Part b", "variables": ["f", "f2", "mygcd", "h", "j", "k", "f3", "f4", "f1000", "numerator", "g", "gcd1", "numerator_coprime", "g_coprime"]}], "tags": [], "variables": {"d": {"name": "d", "templateType": "anything", "group": "Part a", "definition": "random(0.2,0.4,0.6,0.8)", "description": ""}, "b_": {"name": "b_", "templateType": "anything", "group": "Part a", "definition": "gcd(100*b,100)", "description": ""}, "f3": {"name": "f3", "templateType": "anything", "group": "Part b", "definition": "f2/gcd(f2,f1000)", "description": ""}, "b_coprime": {"name": "b_coprime", "templateType": "anything", "group": "Part a", "definition": "100*b/b_", "description": ""}, "answer": {"name": "answer", "templateType": "anything", "group": "Part a", "definition": "round(10c-c)", "description": ""}, "g": {"name": "g", "templateType": "anything", "group": "Part b", "definition": "99", "description": ""}, "numerator_coprime": {"name": "numerator_coprime", "templateType": "anything", "group": "Part b", "definition": "numerator/gcd1", "description": ""}, "a": {"name": "a", "templateType": "anything", "group": "Part a", "definition": "random(0.1,0.3,0.7,0.9)", "description": ""}, "c": {"name": "c", "templateType": "anything", "group": "Part a", "definition": "random(3,6)", "description": ""}, "f": {"name": "f", "templateType": "anything", "group": "Part b", "definition": "random(0.1..0.8#0.002)", "description": ""}, "d_coprime": {"name": "d_coprime", "templateType": "anything", "group": "Part a", "definition": "10d/gcd(10d,10)", "description": ""}, "gcd1": {"name": "gcd1", "templateType": "anything", "group": "Part b", "definition": "gcd(numerator,g)", "description": ""}, "mygcd": {"name": "mygcd", "templateType": "anything", "group": "Part b", "definition": "gcd(f2,f1000)", "description": ""}, "f2": {"name": "f2", "templateType": "anything", "group": "Part b", "definition": "precround(f1000*f,0)", "description": ""}, "k": {"name": "k", "templateType": "anything", "group": "Part b", "definition": "random(h..9 except j except h)", "description": ""}, "f1000": {"name": "f1000", "templateType": "anything", "group": "Part b", "definition": "1000", "description": ""}, "numerator": {"name": "numerator", "templateType": "anything", "group": "Part b", "definition": "h*100+j*10+k - h", "description": ""}, "f4": {"name": "f4", "templateType": "anything", "group": "Part b", "definition": "f1000/gcd(f2,f1000)", "description": ""}, "h": {"name": "h", "templateType": "anything", "group": "Part b", "definition": "random(1..5)", "description": ""}, "j": {"name": "j", "templateType": "anything", "group": "Part b", "definition": "random(1..9)", "description": ""}, "cround": {"name": "cround", "templateType": "anything", "group": "Part a", "definition": "c/3", "description": ""}, "g_coprime": {"name": "g_coprime", "templateType": "anything", "group": "Part b", "definition": "g/gcd1", "description": ""}, "b": {"name": "b", "templateType": "anything", "group": "Part a", "definition": "random(0.25,0.75)", "description": ""}}, "variablesTest": {"maxRuns": 100, "condition": ""}, "rulesets": {}, "preamble": {"js": "", "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"}, "statement": "

Fractions can be equivalently represented as decimals and vice versa. One form may be more useful in a context than another and it is useful to practise how to change between them.

\n

Have a go at these questions involving fractions and decimals, remembering to write your answer in its simplest form.  

", "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Identify well-known fractional equivalents of decimals. Convert obscure decimals and recurring decimals into fractions.

"}, "parts": [{"extendBaseMarkingAlgorithm": true, "scripts": {}, "variableReplacements": [], "marks": 0, "showFeedbackIcon": true, "prompt": "

Express these common decimals as their fraction equivalent.

\n

i)

\n

$\\var{a}=$  [[0]] [[1]]

\n

ii)

\n

$\\var{b}=$  [[2]] [[3]]

\n

iii)

\n

$\\var{d}=$  [[6]] [[7]]

\n

iv)

\n

$0.\\dot{\\var{c}}=$  [[4]] [[5]]

", "unitTests": [], "type": "gapfill", "customMarkingAlgorithm": "", "gaps": [{"correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "scripts": {}, "variableReplacements": [], "marks": "0.5", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "type": "numberentry", "customMarkingAlgorithm": "", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "minValue": "a*10", "maxValue": "a*10", "showCorrectAnswer": true, "mustBeReducedPC": 0, "mustBeReduced": false}, {"correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "scripts": {}, "variableReplacements": [], "marks": "0.5", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "type": "numberentry", "customMarkingAlgorithm": "", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "minValue": "10", "maxValue": "10", "showCorrectAnswer": true, "mustBeReducedPC": 0, "mustBeReduced": false}, {"correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "scripts": {}, "variableReplacements": [], "marks": "0.5", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "type": "numberentry", "customMarkingAlgorithm": "", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "minValue": "b_coprime", "maxValue": "b_coprime", "showCorrectAnswer": true, "mustBeReducedPC": 0, "mustBeReduced": false}, {"correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "scripts": {}, "variableReplacements": [], "marks": "0.5", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "type": "numberentry", "customMarkingAlgorithm": "", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "minValue": "4", "maxValue": "4", "showCorrectAnswer": true, "mustBeReducedPC": 0, "mustBeReduced": false}, {"correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "scripts": {}, "variableReplacements": [], "marks": "0.5", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "type": "numberentry", "customMarkingAlgorithm": "", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "minValue": "cround", "maxValue": "cround", "showCorrectAnswer": true, "mustBeReducedPC": 0, "mustBeReduced": false}, {"correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "scripts": {}, "variableReplacements": [], "marks": "0.5", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "type": "numberentry", "customMarkingAlgorithm": "", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "minValue": "3", "maxValue": "3", "showCorrectAnswer": true, "mustBeReducedPC": 0, "mustBeReduced": false}, {"correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "scripts": {}, "variableReplacements": [], "marks": "0.5", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "type": "numberentry", "customMarkingAlgorithm": "", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "minValue": "d_coprime", "maxValue": "d_coprime", "showCorrectAnswer": true, "mustBeReducedPC": 0, "mustBeReduced": false}, {"correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "scripts": {}, "variableReplacements": [], "marks": "0.5", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "type": "numberentry", "customMarkingAlgorithm": "", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "minValue": "5", "maxValue": "5", "showCorrectAnswer": true, "mustBeReducedPC": 0, "mustBeReduced": false}], "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "showCorrectAnswer": true}, {"extendBaseMarkingAlgorithm": true, "scripts": {}, "variableReplacements": [], "marks": 0, "showFeedbackIcon": true, "prompt": "

Convert this decimal to a fraction, giving your answer in its simplest form. 

\n

$\\displaystyle\\var{f} = $  [[0]] [[1]]

\n

", "unitTests": [], "type": "gapfill", "customMarkingAlgorithm": "", "gaps": [{"correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "scripts": {}, "variableReplacements": [], "marks": "2", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "type": "numberentry", "customMarkingAlgorithm": "", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "minValue": "f3", "maxValue": "f3", "showCorrectAnswer": true, "mustBeReducedPC": 0, "mustBeReduced": false}, {"correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "scripts": {}, "variableReplacements": [], "marks": "2", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "type": "numberentry", "customMarkingAlgorithm": "", "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "minValue": "f4", "maxValue": "f4", "showCorrectAnswer": true, "mustBeReducedPC": 0, "mustBeReduced": false}], "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "showCorrectAnswer": true}], "functions": {}, "ungrouped_variables": [], "advice": "

a)

\n

To convert a decimal into a fraction, firstly place the decimal over $1$ as a fraction, and then multiply both the numerator and denominator by $10$ for however many decimal places the decimal has. For example, if the decimal was $0.1$, you would multiply the fraction by $10$ as there is one decimal place. If the decimal was $0.01$, you would multiply it by $100$, as there are two decimal places.  

\n

i)

\n

$\\var{a}$

\n

\\[
\\frac{\\var{a}}{1}\\times\\frac{10}{10}=\\frac{\\var{10a}}{10}\\text{.}
\\]

\n

ii)

\n

$\\var{b}$

\n

\\[
\\frac{\\var{b}}{1}\\times\\frac{100}{100}=\\frac{\\var{100b}}{100}=\\simplify{{100b}/{100}}\\text{.}
\\]

\n

iii)

\n

\n

$\\var{d}$

\n

\\[
\\frac{\\var{d}}{1}\\times\\frac{10}{10}=\\frac{\\var{10d}}{10}=\\simplify{{10d}/{10}}\\text{.}
\\]

\n

iv)

\n

\n

$0.\\dot{\\var{c}}$

\n

To convert a recurring decimal to a fraction, the first step is to set up a simple equation where

\n

\\[
x=0.\\dot{\\var{c}}\\text{.}
\\]

\n

By multiplying both sides by $10$, we can gain another simple equation where

\n

\\[
10x=\\var{c}.\\dot{\\var{c}}\\text{.}
\\]

\n

By subtracting one equation from the other, we can find the fraction equivalent of the recurring decimal. 

\n

\\[
\\begin{align}
&&\\var{c}.\\dot{\\var{c}}&={10}x\\\\
-&&{0.\\dot{\\var{c}}}&=x\\\\
&&\\overline{\\qquad} & \\overline{\\qquad}\\\\
&&{\\var{c}}&=9x\\\\
\\\\
&&\\frac{\\var{c}}{9}&=x
\\end{align}
\\]

\n

$\\displaystyle\\frac{\\var{c}}{9}$ simplifies to $\\simplify{{{c}}/{9}}$ by dividing by $3$ and therefore, $0.\\dot{\\var{c}}=\\simplify{{{c}}/{9}}$ in its fractional form.}

\n

\n

b)

\n

$\\displaystyle\\var{f}$

\n

\\[
\\var{f}\\times\\frac{\\var{f1000}}{\\var{f1000}}=\\frac{\\var{f2}}{\\var{f1000}}\\text{.}
\\]

\n

From this, we can look to see if we can cancel down the fraction by finding the highest common divisor between the numerator and denominator. This is $\\var{mygcd}$.

\n

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

\n

Simplifying by this amount gives the final answer

\n

\\[\\frac{\\var{f3}}{\\var{f4}}.\\]

\n

c)

\n

$\\var{h}.\\dot{\\var{j}}\\dot{\\var{k}}.$

\n

To convert a recurring decimal to a fraction, the first step is to set up a simple equation where,

\n

$x=\\var{h}.\\dot{\\var{j}}\\dot{\\var{k}}.$

\n


By multiplying both sides by $100$ to isolate the recurring section on the left hand side of the decimal point, we can gain another simple equation

\n

$100x=\\var{h}\\var{j}\\var{k}.\\dot{\\var{j}}\\dot{\\var{k}}.$

\n

\n

Now that we have two equations in terms of $x$, we can subtract one from the other and solve to get a value of $x$.

\n

\\[
\\begin{align}
&&\\var{h}\\var{j}\\var{k}.\\dot{\\var{j}}\\dot{\\var{k}}&=100x\\\\
-&&\\var{h}.\\dot{\\var{j}}\\dot{\\var{k}}&=x\\\\
&&\\overline{\\qquad} & \\overline{\\qquad} 
\\\\
&&{{\\var{h}}\\var{j}\\var{k-h}}&=99x\\\\
\\\\
&&\\frac{\\var{numerator}}{\\var{g}}&=x\\text{.}\\\\
\\end{align}
\\]

\n

From this, we should look to see if it is possible to simplify by finding the greatest common divisor of the numerator and the denominator. The greatest common divisor is $\\var{gcd1 }.$

\n

Therefore, it is not possible to simplify and so

\n

Simplifying by this value gives the fraction $\\displaystyle\\simplify{{{numerator}}/{g}}$ and so  

\n

\\[
\\begin{align}
\\var{h}.\\dot{\\var{j}}\\dot{\\var{k}}=\\simplify{{{numerator}}/{g}}\\text{ in its fractional form.}\\\\
\\end{align}
\\]

"}, {"name": "Fraction multiplication", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "advice": "

a)

\n

To multiply $\\displaystyle\\frac{\\var{a_coprime}}{\\var{c_coprime}}\\times\\frac{\\var{b_coprime}}{\\var{d_coprime}}$, address the numerators and denominators separately.

\n

Multiply the numerators across both fractions.

\n

$\\var{a_coprime}\\times\\var{b_coprime}=\\var{ab}$,

\n

and then multiply the denominators across both fractions.

\n

$\\var{c_coprime}\\times\\var{d_coprime}=\\var{cd}$.

\n

The values of the multiplied numerators and denominators will be the numerator and denominator of the new fraction: $\\displaystyle\\frac{\\var{ab}}{\\var{cd}}$.

\n

This answer may need simplifying down, and to do this, find the greatest common divisor in both the numerator and denominator and divide by this number.

\n

The greatest common divisor of $\\var{ab}$ and $\\var{cd}$ is $\\var{gcd}$.

\n

By using $\\var{gcd}$ to cancel down the fraction, the final answer is $\\displaystyle\\simplify{{ab}/{cd}}$.

\n

\n

b)

\n

To multiply $\\displaystyle\\simplify{{k_coprime}/{j_coprime}}\\times\\var{f}\\frac{\\var{g_coprime}}{\\var{h_coprime}}$, we first need to change the mixed number term into an improper fraction. 

\n

To do this, we need to multiply $(\\var{f}\\times\\var{h_coprime}=\\var{fh})$ and add it to what was already on the numerator of the fraction, $\\var{g_coprime}$.

\n

$\\displaystyle\\frac{(\\var{fh}+\\var{g_coprime})}{\\var{h_coprime}}= \\displaystyle\\frac{\\var{numif}}{\\var{h_coprime}}$.

\n

Next, we multiply the numerators and denominators across both fractions separately, as done in part a)

\n

$\\var{k_coprime}\\times\\var{numif} = \\var{num}$,

\n

$\\var{j_coprime}\\times\\var{h_coprime}=\\var{denom}$.

\n

This gives the unsimplified version of the new fraction $\\displaystyle\\frac{\\var{num}}{\\var{denom}}$.

\n

To simplify, find the greatest common divisor in both the numerator and denominator and divide by this number. 

\n

The greatest common divisor of $\\var{num}$ and $\\var{denom}$ is $\\var{gcdb}$.

\n

By using $\\var{gcdb}$ to cancel down the fraction, the final answer is $\\displaystyle\\simplify{{num}/{denom}}$.

\n

\n

\n

c)

\n

To square a fraction means to multiply the fraction by itself. To do this, multiply the numerators and denominators across individually.

\n

$\\displaystyle\\bigg(\\frac{\\var{l_coprime}}{\\var{m_coprime}}\\bigg)^2=\\frac{\\var{l_coprime}}{\\var{m_coprime}}\\times\\frac{\\var{l_coprime}}{\\var{m_coprime}}=\\frac{\\var{l_coprime^2}}{\\var{m_coprime^2}}.$

\n

From this, we should look if it is possible to simplify by finding the highest common divisor of $\\var{l_coprime^2}$ and $\\var{m_coprime^2}.$

\n

The greatest common divisor is $\\var{gcd_lcmc}$.

\n

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

\n

By simplifying with this value, the final answer is

\n

$\\displaystyle\\frac{\\var{l_coprime2}}{\\var{m_coprime2}}$.

\n

\n

d)

\n

Helen was on holiday for $28$ days and spent $\\displaystyle\\frac{\\var{aa}}{7}$ of her time in Spain. 

\n

$\\displaystyle\\frac{\\var{aa}}{7}\\times\\frac{28}{1}=\\frac{\\var{bb}}{7}=\\var{cc}$ days in Spain. 

\n

Whilst in Spain, she spends $\\displaystyle\\frac{\\var{dd}}{4}$ of her time in Barcelona.

\n

$\\displaystyle\\frac{\\var{dd}}{4}\\times\\frac{\\var{cc}}{1}=\\frac{\\var{ddcc}}{4}=\\var{ee}$ days in Barcelona. 

\n

", "statement": "

Evaluate the following multiplications, giving each fraction in its simplest form.

", "variables": {"k": {"name": "k", "group": "Part b", "templateType": "anything", "description": "

Random number between 1 and 20

", "definition": "random(1..7 except j)"}, "bb": {"name": "bb", "group": "Part d", "templateType": "anything", "description": "", "definition": "28*aa"}, "cc": {"name": "cc", "group": "Part d", "templateType": "anything", "description": "", "definition": "bb/7"}, "g": {"name": "g", "group": "Part b", "templateType": "randrange", "description": "

Random number between 1 and 20.

", "definition": "random(1..7#1)"}, "cd": {"name": "cd", "group": "Part a", "templateType": "anything", "description": "

Variable c times variable d.

", "definition": "c_coprime*d_coprime"}, "a": {"name": "a", "group": "Part a", "templateType": "anything", "description": "

Random number from 1 to 12.

", "definition": "random(2..12 except c)"}, "d": {"name": "d", "group": "Part a", "templateType": "randrange", "description": "

Random number from 1 to 12.

", "definition": "random(2..12#1)"}, "l": {"name": "l", "group": "Part c", "templateType": "anything", "description": "", "definition": "random(1..12)"}, "numif": {"name": "numif", "group": "Part b", "templateType": "anything", "description": "

Numerator of the improper fraction converted from a mixed number.

", "definition": "(f*h_coprime)+g_coprime"}, "gcd_gh": {"name": "gcd_gh", "group": "Part b", "templateType": "anything", "description": "", "definition": "gcd(g,h)"}, "fh": {"name": "fh", "group": "Part b", "templateType": "anything", "description": "

Variable f times variable h

", "definition": "f*h_coprime"}, "g_coprime": {"name": "g_coprime", "group": "Part b", "templateType": "anything", "description": "", "definition": "g/gcd_gh"}, "j_coprime": {"name": "j_coprime", "group": "Part b", "templateType": "anything", "description": "", "definition": "j/gcd_kj"}, "gcd_kj": {"name": "gcd_kj", "group": "Part b", "templateType": "anything", "description": "", "definition": "gcd(k,j)"}, "f": {"name": "f", "group": "Part b", "templateType": "randrange", "description": "

Random number between 1 and 4 - integer part of the mixed number.

", "definition": "random(1..4#1)"}, "c_coprime": {"name": "c_coprime", "group": "Part a", "templateType": "anything", "description": "", "definition": "c/gcd_ac"}, "gcd": {"name": "gcd", "group": "Part a", "templateType": "anything", "description": "", "definition": "gcd(ab,cd)"}, "b": {"name": "b", "group": "Part a", "templateType": "randrange", "description": "

Random number from 1 to 12.

", "definition": "random(2..12#1)"}, "d_coprime": {"name": "d_coprime", "group": "Part a", "templateType": "anything", "description": "", "definition": "d/gcd_bd"}, "ddcc": {"name": "ddcc", "group": "Part d", "templateType": "anything", "description": "", "definition": "dd*cc"}, "gcdb": {"name": "gcdb", "group": "Part b", "templateType": "anything", "description": "", "definition": "gcd(num,denom)"}, "gcd_ac": {"name": "gcd_ac", "group": "Part a", "templateType": "anything", "description": "

PART A

", "definition": "gcd(a,c)"}, "denom": {"name": "denom", "group": "Part b", "templateType": "anything", "description": "

Denominator of new fraction.

", "definition": "j_coprime*(h_coprime/gcda)"}, "l_coprime": {"name": "l_coprime", "group": "Part c", "templateType": "anything", "description": "", "definition": "l/gcd_lm"}, "m": {"name": "m", "group": "Part c", "templateType": "anything", "description": "", "definition": "random(1..12 except l)"}, "a_coprime": {"name": "a_coprime", "group": "Part a", "templateType": "anything", "description": "", "definition": "a/gcd_ac"}, "h": {"name": "h", "group": "Part b", "templateType": "randrange", "description": "

Random number between 1 and 20.

", "definition": "random(7..10#1)"}, "num": {"name": "num", "group": "Part b", "templateType": "anything", "description": "

Numerator of gap 0

", "definition": "k_coprime*{numif/gcda}"}, "m_coprime": {"name": "m_coprime", "group": "Part c", "templateType": "anything", "description": "", "definition": "m/gcd_lm"}, "aa": {"name": "aa", "group": "Part d", "templateType": "anything", "description": "", "definition": "random(1..6)"}, "gcda": {"name": "gcda", "group": "Part b", "templateType": "anything", "description": "

gcd of the numerator of the improper fraction

", "definition": "gcd({numif},{h_coprime})"}, "h_coprime": {"name": "h_coprime", "group": "Part b", "templateType": "anything", "description": "", "definition": "h/gcd_gh"}, "ee": {"name": "ee", "group": "Part d", "templateType": "anything", "description": "", "definition": "ddcc/4"}, "c": {"name": "c", "group": "Part a", "templateType": "anything", "description": "

Random number from 1 to 12.

", "definition": "random(3,5,7,11)"}, "b_coprime": {"name": "b_coprime", "group": "Part a", "templateType": "anything", "description": "", "definition": "b/gcd_bd"}, "l_coprime2": {"name": "l_coprime2", "group": "Part c", "templateType": "anything", "description": "", "definition": "l_coprime^2/gcd_lcmc"}, "k_coprime": {"name": "k_coprime", "group": "Part b", "templateType": "anything", "description": "", "definition": "k/gcd_kj"}, "j": {"name": "j", "group": "Part b", "templateType": "anything", "description": "

Random number between 1 and 20

", "definition": "Random(3,5,7,11,13,17)"}, "dd": {"name": "dd", "group": "Part d", "templateType": "anything", "description": "", "definition": "random(1..3)"}, "gcd_lcmc": {"name": "gcd_lcmc", "group": "Part c", "templateType": "anything", "description": "", "definition": "gcd((l_coprime)^2,(m_coprime)^2)"}, "m_coprime2": {"name": "m_coprime2", "group": "Part c", "templateType": "anything", "description": "", "definition": "m_coprime^2/gcd_lcmc"}, "gcd_lm": {"name": "gcd_lm", "group": "Part c", "templateType": "anything", "description": "", "definition": "gcd(l,m)"}, "ab": {"name": "ab", "group": "Part a", "templateType": "anything", "description": "

Variable a times variable b

", "definition": "a_coprime*b_coprime"}, "gcd_bd": {"name": "gcd_bd", "group": "Part a", "templateType": "anything", "description": "", "definition": "gcd(b,d)"}, "gcd2": {"name": "gcd2", "group": "Part b", "templateType": "anything", "description": "", "definition": "gcd(num,denom)"}}, "tags": ["improper fractions", "mixed numbers", "multiplication of fractions", "multiplying fractions", "squared fraction", "taxonomy"], "ungrouped_variables": [], "functions": {}, "preamble": {"js": "", "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"}, "type": "question", "variable_groups": [{"variables": ["a", "b", "c", "d", "a_coprime", "b_coprime", "c_coprime", "d_coprime", "gcd_ac", "gcd_bd", "ab", "cd", "gcd"], "name": "Part a"}, {"variables": ["f", "g", "g_coprime", "h", "h_coprime", "gcd_gh", "k", "k_coprime", "j", "j_coprime", "gcd_kj", "fh", "numif", "num", "denom", "gcda", "gcdb", "gcd2"], "name": "Part b"}, {"variables": ["aa", "bb", "cc", "dd", "ddcc", "ee"], "name": "Part d"}, {"variables": ["l", "m", "gcd_lm", "l_coprime", "m_coprime", "gcd_lcmc", "l_coprime2", "m_coprime2"], "name": "Part c"}], "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "metadata": {"description": "

Several problems involving the multiplication of fractions, with increasingly difficult examples, including a mixed fraction and a squared fraction. The final part is a word problem. 

", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"scripts": {}, "showCorrectAnswer": true, "gaps": [{"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "{ab}/{gcd}", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "{ab}/{gcd}", "showCorrectAnswer": true, "type": "numberentry", "marks": 1, "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "{cd}/{gcd}", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "{cd}/{gcd}", "showCorrectAnswer": true, "type": "numberentry", "marks": 1, "showFeedbackIcon": true}], "type": "gapfill", "prompt": "

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

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

$\\displaystyle\\simplify{{k}/{j}}\\times\\var{f}\\frac{\\var{g}}{\\var{h}}$ =  [[0]] [[1]]

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

$\\displaystyle\\bigg(\\frac{\\var{l_coprime}}{\\var{m_coprime}}\\bigg)^2= $ [[0]] [[1]]

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

Helen went on holiday in Europe. She spent $\\displaystyle\\frac{\\var{aa}}{7}$ of her time on holiday in Spain. Whilst in Spain, she spent $\\displaystyle\\frac{\\var{dd}}{4}$ of her time in Barcelona. 

\n

If her holiday lasted for $28$ days, how many days was she in Barcelona? 

\n

Helen was in Barcelona for [[0]] days.

", "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst"}]}, {"name": "Division of fractions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "metadata": {"description": "

Several problems involving dividing fractions, with increasingly difficult examples, including mixed numbers and complex fractions. 

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}, "type": "question", "ungrouped_variables": [], "advice": "

a)

\n

When faced with dividing fractions, it much easier to switch one of the fractions around and multiply them together instead of divide them.

\n

\\[ \\left( \\frac{\\var{f_coprime}}{\\var{g_coprime}}\\div\\frac{\\var{h_coprime}}{\\var{j_coprime}} \\right) \\equiv \\left( \\frac{\\var{f_coprime}}{\\var{g_coprime}}\\times\\frac{\\var{j_coprime}}{\\var{h_coprime}} \\right) = \\frac{\\var{fj}}{\\var{gh}} \\]

\n

Then, simplify by finding the highest common divisor in the numerator and denominator which in this case is $\\var{gcd1}$. 

\n

This gives a final answer of $\\displaystyle\\simplify{{fj}/{gh}}$.

\n

\n

b)

\n

\\[ \\frac{\\var{f1_coprime}}{\\var{g1_coprime}}\\div\\frac{\\var{h1_coprime}}{\\var{j1_coprime}} \\equiv \\left( \\frac{\\var{f1_coprime}}{\\var{g1_coprime}}\\times\\frac{\\var{j1_coprime}}{\\var{h1_coprime}} \\right)=\\frac{\\var{f1j1}}{\\var{g1h1}} \\]

\n

Then, simplify by finding the highest common divisor in the numerator and denominator which in this case is $\\var{gcd2}$.

\n

This gives a final answer of $\\displaystyle\\simplify{{f1j1}/{g1h1}}$.

\n

\n

c)

\n

\\[ {\\var{f3}\\frac{\\var{g3_coprime}}{\\var{h3_coprime}}}\\div{\\var{f4}\\frac{\\var{g4_coprime}}{\\var{h4_coprime}}} \\]

\n

The first thing to do is to change the mixed numbers into improper fractions.

\n

An improper fraction is a fraction where the numerator is greater than the denominator. To change a mixed fraction to an improper fraction, multiply the integer part of the mixed number by the denominator, and add it to the existing numerator to make the new numerator of the improper fraction. The denominator will stay the same. 

\n

\\[ {\\var{f3}\\frac{\\var{g3_coprime}}{\\var{h3_coprime}}}\\equiv\\frac{(\\var{f3}\\times\\var{h3_coprime})+\\var{g3_coprime}}{\\var{h3_coprime}}=\\frac{\\var{f3h3}+\\var{g3_coprime}}{\\var{h3_coprime}}=\\frac{\\var{f3h3+g3_coprime}}{\\var{h3_coprime}} \\]

\n

\\[ {\\var{f4}\\frac{\\var{g4_coprime}}{\\var{h4_coprime}}}\\equiv\\frac{(\\var{f4}\\times\\var{h4_coprime})+\\var{g4_coprime}}{\\var{h4_coprime}}=\\frac{\\var{f4h4}+\\var{g4_coprime}}{\\var{h4_coprime}}=\\frac{\\var{f4h4+g4_coprime}}{\\var{h4_coprime}} \\]

\n

We now have our mixed numbers as improper fractions.

\n

\\[ \\frac{\\var{f3h3+g3_coprime}}{\\var{h3_coprime}}\\div\\frac{\\var{f4h4+g4_coprime}}{\\var{h4_coprime}} \\]

\n

Now, use the same method as in parts a) and b) to divide by switching around one fraction and changing the division symbol to multiplication.

\n

\\[ \\frac{\\var{f3h3+g3_coprime}}{\\var{h3_coprime}}\\div\\frac{\\var{f4h4+g4_coprime}}{\\var{h4_coprime}}\\equiv\\frac{\\var{f3h3+g3_coprime}}{\\var{h3_coprime}}\\times\\frac{\\var{h4_coprime}}{\\var{f4h4+g4_coprime}}=\\frac{\\var{num}}{\\var{denom}} \\]

\n

Finally, the last thing to do is to simplify your answer down by finding the highest common divisor in the numerator and denominator, which in this case is $\\var{gcd3}$.

\n

By doing this, you will get a final answer of

\n

\\[ \\simplify{{num}/{denom}} \\]

\n

d)

\n

\\[ \\frac{\\var{a}}{(\\simplify[all,!collectNumbers]{{b}-{c}/{d}})} \\]

\n

Consider the denominator first, as following the rules of BODMAS, you should address brackets first.

\n

You need to get a common denominator for both terms on the denominator, like this:

\n

\\[ \\var{b}\\times\\frac{\\var{d}}{\\var{d}} = \\frac{\\var{bd}}{\\var{d}} \\]

\n

This now allows you to complete the addition or subtraction as both terms have a common denominator. 

\n

\\[ {\\simplify[all,!collectNumbers]{{bd}/{d}-{c}/{d}}} = \\frac{\\var{bd_c}}{\\var{d}} \\]

\n

This means that the expression is now:

\n

\\[ \\frac{\\var{a}}{\\frac{\\var{bd_c}}{\\var{d}}} \\]

\n

Dealing with this requires a bit of manipulation. You have to change the divisor of the denominator to be a mulitplier of the numerator. The denominator, ${\\var{bd_c}}$ was being divided by ${\\var{d}}$ but by flipping it around, the numerator, ${\\var{a}}$ will be mulitplied by ${\\var{d}}$. The value of the expression remains the same.

\n

\\[ \\frac{\\var{a}}{\\frac{\\var{bd_c}}{\\var{d}}}\\equiv \\frac{(\\var{a})\\times(\\var{d})}{\\var{bd_c}}= \\frac{\\var{ad}}{\\var{bd_c}} \\]

\n

From this, you can try to cancel the expression down by finding the highest common factor of the numerator and denominator, to give a final answer of

\n

\\[ \\simplify{{ad}/{bd_c}} \\]

", "variable_groups": [{"name": "part d", "variables": ["a", "b", "c", "d", "bd", "ad", "gcd", "ad_gcd", "bcd_gcd", "bd_c"]}, {"name": "part a", "variables": ["f", "g", "f_coprime", "g_coprime", "h", "j", "h_coprime", "j_coprime", "fj", "gh", "gcd1"]}, {"name": "part b", "variables": ["f1", "g1", "f1_coprime", "g1_coprime", "h1", "j1", "h1_coprime", "j1_coprime", "f1j1", "g1h1", "gcd2"]}, {"name": "part c", "variables": ["f3", "g3", "h3", "g3_coprime", "h3_coprime", "f4", "g4", "h4", "g4_coprime", "h4_coprime", "f3h3", "f4h4", "num", "denom", "gcd3"]}], "statement": "

Evaluate the following sums involving division of fractions. Simplify your answers where possible. 

", "parts": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showCorrectAnswer": true, "prompt": "

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

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

$\\displaystyle\\frac{\\var{f1_coprime}}{\\var{g1_coprime}}\\div\\frac{\\var{h1_coprime}}{\\var{j1_coprime}}=$  [[0]] [[1]]

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

$\\displaystyle{\\var{f3}\\frac{\\var{g3_coprime}}{\\var{h3_coprime}}}\\div{\\var{f4}\\frac{\\var{g4_coprime}}{\\var{h4_coprime}}}=$  [[0]] [[1]]

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

$\\displaystyle\\frac{\\var{a}}{(\\simplify[all,!collectNumbers]{{b}-{c}/{d}})} =$  [[0]] [[1]]

", "variableReplacements": [], "showFeedbackIcon": true, "marks": 0, "gaps": [{"correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "showFeedbackIcon": true, "marks": 1, "minValue": "ad_gcd", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "ad_gcd", "mustBeReduced": false, "allowFractions": false, "variableReplacements": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "showFeedbackIcon": true, "marks": 1, "minValue": "bcd_gcd", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "bcd_gcd", "mustBeReduced": false, "allowFractions": false, "variableReplacements": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true}]}], "tags": ["dividing fractions", "division of fractions", "fractions", "Fractions", "mixed numbers", "taxonomy"], "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": ""}, "functions": {}, "variables": {"f4h4": {"description": "

variable f4 times h4.

\n

Used in part c)

", "group": "part c", "definition": "f4*h4_coprime", "name": "f4h4", "templateType": "anything"}, "g4_coprime": {"description": "

PART C

", "group": "part c", "definition": "g4/gcd(g4,h4)", "name": "g4_coprime", "templateType": "anything"}, "h4": {"description": "

Random number but not the same number as variable g4.

\n

Used in part c.

", "group": "part c", "definition": "random(5..8 except g4)", "name": "h4", "templateType": "anything"}, "g": {"description": "

Random number between 2 and 10 and not the same number as variable f.

\n

Used in part a).

", "group": "part a", "definition": "random(f..12 except f) ", "name": "g", "templateType": "anything"}, "a": {"description": "

Random number between 1 and 20

\n

Used by part d)

", "group": "part d", "definition": "random(1..10#1)", "name": "a", "templateType": "randrange"}, "bd_c": {"description": "

Unsimplified denominator for part d).

", "group": "part d", "definition": "(bd-c)", "name": "bd_c", "templateType": "anything"}, "h3_coprime": {"description": "

PART C

", "group": "part c", "definition": "h3/gcd(g3,h3)", "name": "h3_coprime", "templateType": "anything"}, "f_coprime": {"description": "

PART A

", "group": "part a", "definition": "f/gcd(f,g)", "name": "f_coprime", "templateType": "anything"}, "g_coprime": {"description": "

PART A

", "group": "part a", "definition": "g/gcd(f,g)", "name": "g_coprime", "templateType": "anything"}, "j1_coprime": {"description": "

PART B

", "group": "part b", "definition": "j1/gcd(h1,j1)", "name": "j1_coprime", "templateType": "anything"}, "gcd2": {"description": "

greatest common divisor of variables f1j1 and g1h1.

\n

Used in part b).

", "group": "part b", "definition": "gcd(f1j1,g1h1)", "name": "gcd2", "templateType": "anything"}, "c": {"description": "

Random prime number between -10 and 10.

\n

Used by part d).

", "group": "part d", "definition": "random([-7,-5,-3,-2,-1,1,2,3,5,7] except d)", "name": "c", "templateType": "anything"}, "ad_gcd": {"description": "

Correct answer for the numerator in part d)

", "group": "part d", "definition": "ad/gcd", "name": "ad_gcd", "templateType": "anything"}, "g1_coprime": {"description": "

PART B

", "group": "part b", "definition": "g1/gcd(f1,g1)", "name": "g1_coprime", "templateType": "anything"}, "h1_coprime": {"description": "

PART B

", "group": "part b", "definition": "h1/gcd(h1,j1)", "name": "h1_coprime", "templateType": "anything"}, "gcd3": {"description": "

greatest common denominator for part c. 

", "group": "part c", "definition": "gcd(num,denom)", "name": "gcd3", "templateType": "anything"}, "bd": {"description": "

Variable b times variable d.

\n

Used in part d)

", "group": "part d", "definition": "b*d", "name": "bd", "templateType": "anything"}, "j1": {"description": "

Random number between 2 and 20 and not the same value as variable h1.

\n

Used in part b).

", "group": "part b", "definition": "random(h1..11 except h1)", "name": "j1", "templateType": "anything"}, "g1h1": {"description": "

variable g1 times h1. 

\n

Used in part b).

", "group": "part b", "definition": "g1_coprime*h1_coprime", "name": "g1h1", "templateType": "anything"}, "f": {"description": "

Random number between 2 and 10.

\n

Used in part a).

", "group": "part a", "definition": "random(2..10)", "name": "f", "templateType": "anything"}, "b": {"description": "

Random number between 1 and 10.

\n

Used by part d)

", "group": "part d", "definition": "random(1..10#1)", "name": "b", "templateType": "randrange"}, "bcd_gcd": {"description": "

Correct answer for the denominator in part d).

", "group": "part d", "definition": "{bd_c}/gcd", "name": "bcd_gcd", "templateType": "anything"}, "f4": {"description": "

Random number.

\n

Used in part c).

", "group": "part c", "definition": "random(1..3)", "name": "f4", "templateType": "anything"}, "f1": {"description": "

Random number between 2 and 20.

\n

Used in part b)

", "group": "part b", "definition": "random(2..10)", "name": "f1", "templateType": "anything"}, "d": {"description": "

Random prime number between 10 and 20.

\n

Used in part d).

", "group": "part d", "definition": "random(7,11,13,17)", "name": "d", "templateType": "anything"}, "g3": {"description": "

Random number.

\n

Used in part c).

", "group": "part c", "definition": "random(1..3)", "name": "g3", "templateType": "anything"}, "f3h3": {"description": "

variable f3 times h3.

", "group": "part c", "definition": "f3*h3_coprime", "name": "f3h3", "templateType": "anything"}, "h": {"description": "

Random number from 2 to 10.

\n

Used in part a).

", "group": "part a", "definition": "random(2..10)", "name": "h", "templateType": "anything"}, "gh": {"description": "

variable g times variable h.

\n

Used in part a).

", "group": "part a", "definition": "g_coprime*h_coprime", "name": "gh", "templateType": "anything"}, "j_coprime": {"description": "

PART A

", "group": "part a", "definition": "j/gcd(h,j)", "name": "j_coprime", "templateType": "anything"}, "denom": {"description": "

Unsimplified denominator of part c.

", "group": "part c", "definition": "h3_coprime*(f4h4+g4_coprime)", "name": "denom", "templateType": "anything"}, "j": {"description": "

Random number between 2 and 10 and not the same value as h.

\n

Used in part a).

", "group": "part a", "definition": "random(h..12 except h)", "name": "j", "templateType": "anything"}, "f1j1": {"description": "

variable f1 times j1.

\n

Used in part b).

", "group": "part b", "definition": "f1_coprime*j1_coprime", "name": "f1j1", "templateType": "anything"}, "h4_coprime": {"description": "

PART C

", "group": "part c", "definition": "h4/gcd(g4,h4)", "name": "h4_coprime", "templateType": "anything"}, "g1": {"description": "

Random number between 2 and 30 and not the same value as variable f1.

\n

Used in part b).

", "group": "part b", "definition": "random(f1..11 except f1) ", "name": "g1", "templateType": "anything"}, "fj": {"description": "

variable f times variable j.

\n

Used in part a).

", "group": "part a", "definition": "f_coprime*j_coprime", "name": "fj", "templateType": "anything"}, "gcd": {"description": "

Greatest common divisor of ad and bd_c. 

\n

Used in part d). 

", "group": "part d", "definition": "gcd(ad,bd_c)", "name": "gcd", "templateType": "anything"}, "f3": {"description": "

Random number between 2 and 6.

\n

Used in part c).

", "group": "part c", "definition": "random(1..3#1)", "name": "f3", "templateType": "randrange"}, "f1_coprime": {"description": "

PART B

", "group": "part b", "definition": "f1/gcd(f1,g1)", "name": "f1_coprime", "templateType": "anything"}, "h3": {"description": "

Random number and not the same value as variable g3. 

\n

Used in part c).

", "group": "part c", "definition": "random(5..8)", "name": "h3", "templateType": "anything"}, "gcd1": {"description": "

greatest common divisor of variable fj and gh.

\n

Used in part a).

", "group": "part a", "definition": "gcd(fj,gh)", "name": "gcd1", "templateType": "anything"}, "g3_coprime": {"description": "

PART C

", "group": "part c", "definition": "g3/gcd(g3,h3)", "name": "g3_coprime", "templateType": "anything"}, "h_coprime": {"description": "

PART A

", "group": "part a", "definition": "h/gcd(h,j)", "name": "h_coprime", "templateType": "anything"}, "g4": {"description": "

Random number.

\n

Used in part c).

", "group": "part c", "definition": "random(1..5)", "name": "g4", "templateType": "anything"}, "h1": {"description": "

Random number between 2 and 20. 

\n

Used in part b).

", "group": "part b", "definition": "random(2..10)", "name": "h1", "templateType": "anything"}, "num": {"description": "

numerator of the improper fraction in part c. Unsimplified. 

", "group": "part c", "definition": "h4_coprime*(f3h3+g3_coprime)", "name": "num", "templateType": "anything"}, "ad": {"description": "

Variable a times variable d.

\n

Used in part d).

", "group": "part d", "definition": "a*d", "name": "ad", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Addition and subtraction of fractions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "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"}}, "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{.}\\]

"}, {"name": "Expansion of brackets", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}], "tags": ["brackets", "expanding brackets", "expansion of brackets", "simplifying algebraic expressions", "simplifying expressions", "taxonomy"], "metadata": {"description": "

This question is made up of 10 exercises to practice the multiplication of brackets by a single term.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Expand the expressions below by multiplying each of the terms inside the brackets by the term outside. Give each answer in its simplest form.

", "advice": "

Expand brackets using the general formula $\\displaystyle a(x+c)=ax+ac$. This means we multiply each term inside the brackets by the term outside the brackets.

\n

It is easy to forget that the sign outside the brackets also needs to be involved in the multiplication so remember that when two of the same sign are multiplied, the resultant term is positive and when opposite signs are multiplied, the result is negative.

\n

a)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[1]}({a[2]}x+{a[3]})}&=
\\simplify[!collectNumbers]{({a[1]}{a[2]})x+({a[1]}{a[3]})}\\\\&
=\\simplify{{a[1]}*{a[2]}x+{a[1]}{a[3]}}\\text{.}
\\end{align}
\\]

\n

b)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[4]}({a[5]}x+{a[6]})}&=
\\simplify[!collectNumbers]{{a[4]}{a[5]}x+{a[4]}{a[6]}}\\\\&=
\\simplify{{a[4]}*{a[5]}x+{a[4]}{a[6]}}\\text{.}
\\end{align}
\\]

\n

c)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[7]}({a[8]}x^2+{a[9]}y)}&=
\\simplify[!collectNumbers]{{a[7]}{a[8]}x^2+{a[7]}{a[9]}y}\\\\&=
\\simplify{{a[7]}*{a[8]}x^2+{a[7]}*{a[9]}y}\\text{.}
\\end{align}
\\]

\n

d)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[10]}({a[11]}x^2+{a[12]}y)}&=
\\simplify[!collectNumbers]{{a[10]}{a[11]}x^2+{a[10]}{a[12]}y}\\\\&=
\\simplify{{a[10]}*{a[11]}x^2+{a[10]}*{a[12]}y}\\text{.}
\\end{align}
\\]

\n

e)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[13]}x({a[14]}x^2+{a[15]}x+{a[16]})}&=
\\simplify[!collectNumbers]{{a[13]}x{a[14]}x^2+{a[13]}x{a[15]}x+{a[13]}x{a[16]}}\\\\&=
\\simplify{{a[13]}{a[14]}x^3+{a[13]}{a[15]}x^2+{a[13]}{a[16]}x}\\text{.}
\\end{align}
\\]

\n

f)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[17]}x({a[18]}x^2+{a[19]}x+{a[20]})}&=
\\simplify[!collectNumbers]{{a[17]}x{a[18]}x^2+{a[17]}x{a[19]}x+{a[17]}x{a[20]}}\\\\&=
\\simplify{{a[17]}{a[18]}x^3+{a[17]}{a[19]}x^2+{a[17]}{a[20]}x}\\text{.}
\\end{align}
\\]

\n


g)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[21]}x({a[22]}x^2+{a[23]}x)+{a[24]}x^2+{a[25]}x^3}&=
\\simplify[!collectNumbers]{x^2({a[21]}{a[23]})+x^2{a[24]}+x^3({a[21]}{a[22]})+x^3{a[25]}}\\\\&=
\\simplify[!collectNumbers]{x^2({a[21]}{a[23]}+{a[24]})+x^3({a[21]}{a[22]}+{a[25]})}\\\\&=
\\simplify{x^2({a[21]}{a[23]}+{a[24]})+x^3({a[21]}{a[22]}+{a[25]})}\\text{.}
\\end{align}
\\]

\n

h)

\n

\\[
\\begin{align}
\\simplify[terms]{({a[26]}x^2+{a[27]}x^3)+{a[28]}x({a[29]}x^2+{a[30]}x)}&=
\\simplify[!collectNumbers]{x^2({a[26]})+x^2({a[28]}{a[30]})+x^3({a[28]}{a[29]})+x^3({a[27]})}\\\\&=
\\simplify[!collectNumbers]{x^2({a[26]}+{a[28]}{a[30]})+x^3({a[28]}{a[29]}+{a[27]})}\\\\&=
\\simplify{x^2({a[26]}+{a[28]}{a[30]})+x^3({a[28]}{a[29]}+{a[27]})}\\text{.}
\\end{align}
\\]

\n

i)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[31]}({a[32]}x+{a[33]}y)+{a[34]}x({a[42]}+{a[35]}y)}&=
\\simplify[!collectNumbers]{({a[31]}{a[32]})x+({a[34]}{a[42]})x+{a[31]}{a[33]}y+{a[34]}{a[35]}x*y}\\\\&=
\\simplify[!collectNumbers]{({a[31]}{a[32]}+{a[34]}{a[42]})x+{a[31]}{a[33]}y+{a[34]}{a[35]}x*y}\\\\&=
\\simplify{({a[31]}{a[32]}+{a[34]}{a[42]})x+{a[31]}{a[33]}y+{a[34]}{a[35]}x*y}\\text{.}
\\end{align}
\\]

\n

j)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[36]}a^2({a[37]}+{a[38]}b)+{a[39]}b^2({a[40]}a+{a[41]}b)}&=
\\simplify[!collectNumbers]{{a[37]}{a[36]}a^2+{a[38]}{a[36]}a^2b+{a[40]}{a[39]}a*b^2+{a[39]}{a[41]}b^3}\\\\&=
\\simplify{{a[37]}{a[36]}a^2+{a[38]}{a[36]}a^2b+{a[40]}{a[39]}a*b^2+{a[39]}{a[41]}b^3}\\text{.}
\\end{align}
\\]

", "rulesets": {"terms": ["all", "!collectNumbers", "!unitFactor", "!noLeadingMinus"]}, "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "repeat(random(-10..10 except [-1,0,1] ),50)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[1]}({a[2]}x+{a[3]})}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[1]*a[2]}x+{a[1]*a[3]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "x*(`+-$n) + `+-$n", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[4]}({a[5]}x+{a[6]})}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[4]*a[5]}x+{a[4]*a[6]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n*x + `+-$n", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[7]}({a[8]}x^2+{a[9]}y)}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[7]*a[8]}x^2+{a[7]*a[9]}y", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n*x^2 + `+-$n*y", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[10]}({a[11]}x^2+{a[12]}y)}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[10]*a[11]}x^2+{a[10]*a[12]}y", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n*x^2 + `+-$n*y", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[13]}x({a[14]}x^2+{a[15]}x+{a[16]})}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[13]*a[14]}x^3+{a[13]*a[15]}x^2+{a[13]*a[16]}x", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n*x^3 + `+-$n*x^2 + `+-$n*x", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[17]}x({a[18]}x^2+{a[19]}x+{a[20]})}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[17]*a[18]}x^3+{a[17]*a[19]}x^2+{a[17]*a[20]}x", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n`?*x^3 + `+-$n`?*x^2 + `+-$n`?*x", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[21]}x({a[22]}x^2+{a[23]}x)+{a[24]}x^2+{a[25]}x^3}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "x^2*{a[21]*a[23]+a[24]}+x^3*{a[21]*a[22]+a[25]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "x^2*`+-$n`? + x^3*`+-$n`?", "partialCredit": 0, "message": "It doesn't look like you've expanded - make sure you don't use any brackets in your answer.", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{({a[26]}x^2+{a[27]}x^3)+{a[28]}x({a[29]}x^2+{a[30]}x)}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "x^2*{a[26]+a[28]*a[30]} + x^3*{a[28]*a[29]+a[27]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "x^2*`+-$n`? + x^3*`+-$n`?", "partialCredit": 0, "message": "It doesn't look like you've expanded - make sure you don't use any brackets in your answer.", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[31]}({a[32]}x+{a[33]}y)+{a[34]}x({a[42]}+{a[35]}y)}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[31]*a[32]+a[34]*a[42]}x+{a[31]*a[33]}y+{a[34]*a[35]}x*y", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "x*(`+-$n) + y*(`+-$n) + x*y*(`+-$n)", "partialCredit": 0, "message": "", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[36]}a^2({a[37]}+{a[38]}b)+{a[39]}b^2({a[40]}a+{a[41]}b)}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[37]*a[36]}a^2+{a[38]*a[36]}a^2b+{a[40]*a[39]}a*b^2+{a[39]*a[41]}b^3", "answerSimplification": "basic", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n`?*a^2 + `+-$n`?*a^2*b + `+-$n`?*a*b^2 + `+-$n`?*b^3", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}, {"name": "b", "value": ""}]}], "sortAnswers": false}], "type": "question"}, {"name": "Expand brackets and collect like terms", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Aiden McCall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1592/"}], "variable_groups": [{"variables": ["a1", "b1", "c1"], "name": "B group"}, {"variables": ["a", "b", "c", "d", "f", "g", "h", "j"], "name": "Part a"}], "variables": {"c": {"templateType": "anything", "description": "", "definition": "repeat(random(2..10),5)", "name": "c", "group": "Part a"}, "c1": {"templateType": "anything", "description": "", "definition": "random(2..5)*2", "name": "c1", "group": "B group"}, "b1": {"templateType": "anything", "description": "", "definition": "random(2..10 except a1)", "name": "b1", "group": "B group"}, "d": {"templateType": "anything", "description": "", "definition": "repeat(random(2..33),6)", "name": "d", "group": "Part a"}, "f": {"templateType": "anything", "description": "", "definition": "repeat(random(2..20),7)", "name": "f", "group": "Part a"}, "j": {"templateType": "anything", "description": "", "definition": "repeat(random(2..20),9)", "name": "j", "group": "Part a"}, "h": {"templateType": "anything", "description": "", "definition": "repeat(random(2..20),7)", "name": "h", "group": "Part a"}, "a1": {"templateType": "anything", "description": "", "definition": "random(5..10)", "name": "a1", "group": "B group"}, "a": {"templateType": "anything", "description": "

random variables for part 1

", "definition": "repeat(random(5..15),5)", "name": "a", "group": "Part a"}, "b": {"templateType": "anything", "description": "", "definition": "repeat(random(2..10),5)", "name": "b", "group": "Part a"}, "g": {"templateType": "anything", "description": "", "definition": "repeat(random(2..15),7)", "name": "g", "group": "Part a"}}, "type": "question", "parts": [{"extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "useCustomName": false, "showFeedbackIcon": true, "gaps": [{"showCorrectAnswer": true, "checkVariableNames": false, "useCustomName": false, "mustmatchpattern": {"nameToCompare": "", "partialCredit": 0, "pattern": "$n*x", "message": "You haven't simplified: you still have two or more like terms that should be collected together."}, "unitTests": [], "answerSimplification": "all", "showFeedbackIcon": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "failureRate": 1, "variableReplacements": [], "vsetRange": [0, 1], "maxlength": {"partialCredit": 0, "message": "

You must collect like terms to fully simplify.

", "length": "0"}, "customMarkingAlgorithm": "", "vsetRangePoints": 5, "valuegenerators": [{"value": "", "name": "x"}], "customName": "", "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001, "answer": "({c[1]}+{c[0]}+{c[2]})x", "checkingType": "absdiff", "scripts": {}, "showPreview": true, "marks": 1}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "scripts": {}, "customMarkingAlgorithm": "", "marks": 0, "variableReplacements": [], "prompt": "

$\\var{c[0]}x+\\var{c[1]}x+\\var{c[2]}x=$ [[0]]

", "unitTests": [], "customName": ""}, {"extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "useCustomName": false, "showFeedbackIcon": true, "gaps": [{"showCorrectAnswer": true, "checkVariableNames": false, "useCustomName": false, "mustmatchpattern": {"nameToCompare": "", "partialCredit": 0, "pattern": "$n*x^2 + $n*x + $n", "message": "You haven't simplified: you still have two or more like terms that should be collected together."}, "unitTests": [], "answerSimplification": "all", "showFeedbackIcon": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "failureRate": 1, "vsetRange": [0, 1], "variableReplacements": [], "customMarkingAlgorithm": "", "vsetRangePoints": 5, "valuegenerators": [{"value": "", "name": "x"}], "customName": "", "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001, "answer": "({a[1]}+{a[2]})x^2+({a[3]}+{a[4]})x+{a[0]}", "checkingType": "absdiff", "scripts": {}, "showPreview": true, "marks": 1}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "scripts": {}, "customMarkingAlgorithm": "", "marks": 0, "variableReplacements": [], "prompt": "


$\\var{a[1]}x^2+\\var{a[2]}x^2+\\var{a[3]}x+\\var{a[4]}x +\\var{a[0]}=$ [[0]]

", "unitTests": [], "customName": ""}, {"extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "useCustomName": false, "showFeedbackIcon": true, "gaps": [{"showCorrectAnswer": true, "checkVariableNames": false, "useCustomName": false, "mustmatchpattern": {"nameToCompare": "", "partialCredit": 0, "pattern": "$n*y^5", "message": "You haven't simplified: you still have two or more like terms that should be collected together."}, "unitTests": [], "answerSimplification": "all", "showFeedbackIcon": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "failureRate": 1, "variableReplacements": [], "vsetRange": [0, 1], "maxlength": {"partialCredit": 0, "message": "

You must condense your answer to fully simplify.

", "length": "0"}, "customMarkingAlgorithm": "", "vsetRangePoints": 5, "valuegenerators": [{"value": "", "name": "y"}], "customName": "", "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001, "answer": "({b[1]}+{b[2]}+{b[3]}+{b[4]}+{b[0]})y^5", "checkingType": "absdiff", "scripts": {}, "showPreview": true, "marks": 1}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "scripts": {}, "customMarkingAlgorithm": "", "marks": 0, "variableReplacements": [], "prompt": "

$\\var{b[0]}y^5+\\var{b[1]}y^5+\\var{b[2]}y^5+\\var{b[4]}y^5+\\var{b[3]}y^5=$ [[0]]

", "unitTests": [], "customName": ""}, {"extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "useCustomName": false, "showFeedbackIcon": true, "gaps": [{"showCorrectAnswer": true, "checkVariableNames": true, "useCustomName": false, "mustmatchpattern": {"nameToCompare": "", "partialCredit": 0, "pattern": "$n*a*b*c + $n*a*b + $n*a + $n*b + $n*c", "message": "You haven't simplified: you still have two or more like terms that should be collected together."}, "unitTests": [], "showFeedbackIcon": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "failureRate": 1, "variableReplacements": [], "vsetRange": [0, 1], "maxlength": {"partialCredit": 0, "message": "

You must condense your answer to fully simplify. 

", "length": "0"}, "customMarkingAlgorithm": "", "vsetRangePoints": 5, "valuegenerators": [{"value": "", "name": "a"}, {"value": "", "name": "b"}, {"value": "", "name": "c"}], "customName": "", "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001, "answer": "{d[0]}a*b+{d[1]+d[5]}*a*b*c+{d[2]}a+{d[3]}b+{d[4]}c", "checkingType": "absdiff", "scripts": {}, "showPreview": true, "marks": 1}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "scripts": {}, "customMarkingAlgorithm": "", "marks": 0, "variableReplacements": [], "prompt": "

$\\var{d[0]}ab+\\var{d[1]}abc+\\var{d[2]}a+\\var{d[3]}b+\\var{d[4]}c+\\var{d[5]}abc=$ [[0]]

", "unitTests": [], "customName": ""}, {"extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "useCustomName": false, "showFeedbackIcon": true, "gaps": [{"showCorrectAnswer": true, "checkVariableNames": true, "useCustomName": false, "mustmatchpattern": {"nameToCompare": "", "partialCredit": 0, "pattern": "$n*a^2*b + $n*a*b^2 + $n*a*b", "message": "You haven't simplified: you still have two or more like terms that should be collected together."}, "unitTests": [], "answerSimplification": "all", "showFeedbackIcon": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "failureRate": 1, "variableReplacements": [], "vsetRange": [0, 1], "maxlength": {"partialCredit": 0, "message": "

You must condense your answer to fully simplify. 

", "length": "0"}, "customMarkingAlgorithm": "", "vsetRangePoints": 5, "valuegenerators": [{"value": "", "name": "a"}, {"value": "", "name": "b"}], "customName": "", "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001, "answer": "({f[0]}+{f[3]})a^2b+({f[1]}+{f[4]})a*b^2+({f[2]})a*b", "checkingType": "absdiff", "scripts": {}, "showPreview": true, "marks": 1}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "scripts": {}, "customMarkingAlgorithm": "", "marks": 0, "variableReplacements": [], "prompt": "

$\\var{f[0]}a^2b+\\var{f[1]}ab^2+\\var{f[2]}ab+\\var{f[3]}a^2b+\\var{f[4]}ab^2=$ [[0]]

", "unitTests": [], "customName": ""}, {"extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "useCustomName": false, "showFeedbackIcon": true, "gaps": [{"showCorrectAnswer": true, "checkVariableNames": false, "useCustomName": false, "mustmatchpattern": {"nameToCompare": "", "partialCredit": 0, "pattern": "$n*x+$n*y", "message": "You haven't simplified: you still have two or more like terms that should be collected together."}, "unitTests": [], "answerSimplification": "all", "showFeedbackIcon": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "failureRate": 1, "variableReplacements": [], "vsetRange": [0, 1], "maxlength": {"partialCredit": 0, "message": "

You must condense your answer to fully simplify. *'s are not needed to indicate multiplication here.

", "length": "0"}, "customMarkingAlgorithm": "", "vsetRangePoints": 5, "valuegenerators": [{"value": "", "name": "x"}, {"value": "", "name": "y"}], "customName": "", "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001, "answer": "({g[0]}{g[1]}+{g[4]})x+({g[0]}{g[2]}+{g[5]})y", "checkingType": "absdiff", "scripts": {}, "showPreview": true, "marks": 1}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "scripts": {}, "customMarkingAlgorithm": "", "marks": 0, "variableReplacements": [], "prompt": "

$\\var{g[0]}(\\var{g[1]}x+\\var{g[2]}y)+\\var{g[4]}x+\\var{g[5]}y=$ [[0]]

\n

", "unitTests": [], "customName": ""}, {"extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "useCustomName": false, "showFeedbackIcon": true, "gaps": [{"showCorrectAnswer": true, "checkVariableNames": true, "useCustomName": false, "mustmatchpattern": {"nameToCompare": "", "partialCredit": 0, "pattern": "$n*x*z + $n*x^2 + $n*x + $n*z + $n*z^2", "message": "You haven't simplified: you still have two or more like terms that should be collected together."}, "unitTests": [], "answerSimplification": "all", "showFeedbackIcon": true, "type": "jme", "musthave": {"partialCredit": 0, "message": "", "strings": ["*"], "showStrings": false}, "variableReplacementStrategy": "originalfirst", "failureRate": 1, "notallowed": {"partialCredit": 0, "message": "

9You should not have brackets in your answer.

", "strings": ["(", ")"], "showStrings": true}, "variableReplacements": [], "vsetRange": [0, 1], "maxlength": {"partialCredit": 0, "message": "

You must condense your answer to fully simplify. 

", "length": "0"}, "customMarkingAlgorithm": "", "vsetRangePoints": 5, "valuegenerators": [{"value": "", "name": "x"}, {"value": "", "name": "z"}], "customName": "", "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001, "answer": "({h[0]}{h[1]}+{h[4]})x^2+({h[0]}{h[2]})z*x+{h[3]}x+{h[5]}z^2+{h[6]}z", "checkingType": "absdiff", "scripts": {}, "showPreview": true, "marks": 1}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "scripts": {}, "customMarkingAlgorithm": "", "marks": 0, "variableReplacements": [], "prompt": "

$\\var{h[0]}x(\\var{h[1]}x+\\var{h[2]}z)+\\var{h[3]}x+\\var{h[6]}z+\\var{h[4]}x^2+\\var{h[5]}z^2=$ [[0]]

", "unitTests": [], "customName": ""}, {"extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "useCustomName": false, "showFeedbackIcon": true, "gaps": [{"showCorrectAnswer": true, "checkVariableNames": true, "useCustomName": false, "mustmatchpattern": {"nameToCompare": "", "partialCredit": 0, "pattern": "$n*x + `+-$n*y", "message": "You haven't simplified: you still have two or more like terms that should be collected together."}, "unitTests": [], "answerSimplification": "all", "showFeedbackIcon": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "failureRate": 1, "variableReplacements": [], "vsetRange": [0, 1], "maxlength": {"partialCredit": 0, "message": "

You must condense your answer to fully simplify. 

", "length": "0"}, "customMarkingAlgorithm": "", "vsetRangePoints": 5, "valuegenerators": [{"value": "", "name": "x"}, {"value": "", "name": "y"}], "customName": "", "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001, "answer": "({j[0]}{j[1]}+{j[4]}{j[3]}+{j[6]}{j[7]})x-({j[0]}{j[2]}+{j[5]}{j[3]}+{j[6]}{j[8]})y", "checkingType": "absdiff", "scripts": {}, "showPreview": true, "marks": 1}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "scripts": {}, "customMarkingAlgorithm": "", "marks": 0, "variableReplacements": [], "prompt": "

$\\var{j[0]}(\\var{j[1]}x-\\var{j[2]}y)+\\var{j[3]}(\\var{j[4]}x-\\var{j[5]}y)+\\var{j[6]}(\\var{j[7]}x-\\var{j[8]}y)=$ [[0]]

", "unitTests": [], "customName": ""}], "advice": "

When simplifying expressions, only terms of the same type or like terms can be added together.

\n

Algebraic symbols or letters can be added together provided that they are raised to the same power. For example, we can add $x^2+x^2=2x^2$, but we cannot collect both $x^2$ and $x$ into one term.

\n

a)

\n

\\[ 
\\begin{align}
\\var{c[0]}x+\\var{c[1]}x+\\var{c[2]}x&=(\\var{c[0]}+\\var{c[1]}+\\var{c[2]})x\\\\
&=\\simplify{({c[0]}+{c[1]}+{c[2]})}x
\\end{align}
\\]

\n

b)

\n

\\[ 
\\begin{align}
\\var{a[1]}x^2+\\var{a[2]}x^2+\\var{a[3]}x+\\var{a[4]}x +\\var{a[0]}&=(\\var{a[1]}+\\var{a[2]})x^2+(\\var{a[3]}+\\var{a[4]})x +\\var{a[0]}\\\\
&=\\simplify{({a[1]}+{a[2]})}x^2+\\simplify{({a[3]}+{a[4]})}x+\\var{a[0]}
\\end{align}
\\]

\n

c)

\n

\\[ 
\\begin{align}
\\var{b[0]}y^5+\\var{b[1]}y^5+\\var{b[2]}y^5+\\var{b[4]}y^5+\\var{b[3]}y^5&=(\\var{b[0]}+\\var{b[1]}+\\var{b[2]}+\\var{b[4]}+\\var{b[3]})y^5\\\\
&=\\simplify{({b[1]}+{b[2]}+{b[3]}+{b[4]}+{b[0]})}y^5
\\end{align}
\\]

\n

d)

\n

\\[ 
\\begin{align}
\\var{d[0]}ab+\\var{d[1]}abc+\\var{d[2]}a+\\var{d[3]}b+\\var{d[4]}c+\\var{d[5]}abc
&=(\\var{d[1]}+\\var{d[5]})abc+\\var{d[0]}ab+\\var{d[2]}a+\\var{d[3]}b+\\var{d[4]}c\\\\
&=\\simplify{{d[1]}+{d[5]}}abc+\\var{d[0]}ab+\\var{d[2]}a+\\var{d[3]}b+\\var{d[4]}c
\\end{align}
\\]

\n

e)

\n

\\[ 
\\begin{align}
\\var{f[0]}a^2b+\\var{f[1]}ab^2+\\var{f[2]}ab+\\var{f[3]}a^2b+\\var{f[4]}ab^2
&=(\\var{f[0]}+\\var{f[3]})a^2b+(\\var{f[1]}+\\var{f[4]})ab^2+\\var{f[2]}ab\\\\
&=\\simplify{{f[0]}+{f[3]}}a^2b+\\simplify{{f[1]}+{f[4]}}ab^2+\\var{f[2]}ab
\\end{align}
\\]

\n

f)

\n

\\[
\\begin{align}
\\var{g[0]}(\\var{g[1]}x+\\var{g[2]}y)+\\var{g[4]}x+\\var{g[5]}y
&=(\\var{g[0]}\\times \\var{g[1]}+\\var{g[4]})x+(\\var{g[0]} \\times\\var{g[2]}+\\var{g[5]})y\\\\
&=(\\simplify{{g[0]}*{g[1]}}+\\var{g[4]})x+(\\simplify{{g[0]}*{g[2]}}+\\var{g[5]})y\\\\
&=\\simplify{{g[0]}*{g[1]}+{g[4]}}x+\\simplify{{g[0]}*{g[2]}+{g[5]}}y
\\end{align}
\\]

\n

g)

\n

\\[ 
\\begin{align}
\\var{h[0]}x(\\var{h[1]}x+\\var{h[2]}z)+\\var{h[3]}x+\\var{h[6]}z+\\var{h[4]}x^2+\\var{h[5]}z^2
&=(\\simplify[]{{h[0]}{h[1]}}+\\var{h[4]})x^2+(\\simplify[]{{h[0]}{h[2]}})zx+\\var{h[3]}x+\\var{h[5]}z^2+\\var{h[6]}z\\\\
&=(\\simplify{{h[0]}{h[1]}}+\\var{h[4]})x^2+(\\simplify[]{{h[0]}{h[2]}})zx+\\var{h[3]}x+\\var{h[5]}z^2+\\var{h[6]}z\\\\
&=\\simplify{{h[0]}*{h[1]}+{h[4]}}x^2+\\simplify{{h[0]}*{h[2]}}zx+\\simplify{{h[3]}x+{h[5]}}z^2+\\var{h[6]}z
\\end{align}
\\]

\n

h)

\n

\\[ 
\\begin{align}
\\var{j[0]}(\\var{j[1]}x-\\var{j[2]}y)+\\var{j[3]}(\\var{j[4]}x-\\var{j[5]}y)+\\var{j[6]}(\\var{j[7]}x-\\var{j[8]}y)
&= (\\simplify[]{{j[0]}{j[1]}}+\\simplify[]{{j[3]}{j[4]}}+\\simplify[]{{j[6]}{j[7]}})x-(\\simplify[]{{j[0]}{j[2]}}+\\simplify[]{{j[3]}{j[5]}}+\\simplify[]{{j[6]}{j[8]}})y\\\\
&= (\\simplify{{j[0]}{j[1]}}+\\simplify{{j[3]}{j[4]}}+\\simplify{{j[6]}{j[7]}})x-(\\simplify{{j[0]}{j[2]}}+\\simplify{{j[3]}{j[5]}}+\\simplify{{j[6]}{j[8]}})y\\\\
&= \\simplify{({j[0]}*{j[1]}+{j[4]*j[3]}+{j[6]}*{j[7]})x}-\\simplify{({j[0]}*{j[2]}+{j[5]}{j[3]}+{j[6]}*{j[8]})y}
\\end{align}
\\]

\n

", "tags": ["collecting terms", "expanding brackets", "simplifying algebraic expressions", "simplifying expressions", "taxonomy"], "preamble": {"js": "", "css": ""}, "rulesets": {}, "functions": {}, "ungrouped_variables": [], "statement": "

For each expression below, collect like terms and expand brackets.

\n

The * symbol is required between algebraic symbols, e.g. $5ab^2$ should be written 5*a*b^2.

", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Eight expressions, of increasing complexity. The student must simplify them by expanding brackets and collecting like terms.

"}, "variablesTest": {"condition": "", "maxRuns": 100}}, {"name": "Extract common factors of polynomials", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}], "advice": "

In order to factorise the expressions, the factors that make up each term in the expression need to be identified and, where these factors are the same for all terms in the expression, those factors can be taken outside the brackets. Stop when the remaining terms have no more common factors.

\n

a)

\n

Both terms have a common factor of $2$.

\n

\\begin{align}
\\simplify{2{a[0]}x+2{b[0]}}&=
(\\simplify[]{2{a[0]}})x+2\\times\\var{b[0]}\\\\
&=\\simplify[]{2({a[0]}x+{b[0]})}
\\end{align}

\n

b)

\n

Both terms have common factors of $6$ and $y$.

\n

\\begin{align}
\\simplify{6{a[1]}y+6{b[1]}y^2}&= 6 \\times \\var{a[1]} y + 6 \\times \\var{b[1]} y^2 \\\\
&= 6 \\times (\\simplify{{a[1]}y + {b[1]}y^2}) \\\\
&=6y(\\simplify[]{{a[1]}+{b[1]}y})
\\end{align}

\n

c)

\n

Both terms have common factors of $x$, $y$ and $z$.

\n

\\begin{align}
\\simplify{{a[2]}x*y*z+{b[2]}x^2y^2z^2}&=\\var{a[2]} \\times xyz + \\var{b[2]} \\times xyz \\times xyz\\\\
&=xyz(\\var{a[2]} + \\var{b[2]} xyz)
\\end{align}

\n

d)

\n

All three terms have a common factor of $5$.

\n

\\begin{align}
\\simplify{5{a[3]}d+5{b[3]}r+5m}&= 5 \\times \\var{a[3]} d+5 \\times \\var{b[3]} r + 5 m \\\\
&=\\simplify[]{5({a[3]}d+{b[3]}r+m)}
\\end{align}

\n

e)

\n

All the terms have common factors of $6$, $c$ and $d$.

\n

\\begin{align}
\\simplify{6{a[4]}cd^2+6{b[4]}c^2d+6{c[1]}c^2d^2} &= 6 \\times \\var{a[4]} c d^2 \\;+\\; 6 \\times \\var{b[4]} c^2 d \\;+\\; 6 \\times \\var{c[1]} c^2 d^2 \\\\
&= 6(\\var{a[4]} c d^2 + \\var{b[4]} c^2 d + \\var{c[1]} c^2 d^2) \\\\
&=6cd(\\var{a[4]}d+\\var{b[4]}c+\\var{c[1]}cd)
\\end{align}

\n

", "statement": "

An expression can be factorised by finding common factors of each term in the expression.

\n

Completely factorise the following expressions by finding their common factors.

\n

Make sure that you include a multiplication symbol * between each algebraic variable, and before brackets, e.g. a*b*(x+1) instead of ab(x+1). Otherwise, the system might not accept your answer.

", "preamble": {"js": "question.mark_factorised = function(part) {\n var match = Numbas.jme.display.matchExpression;\n var unwrap = Numbas.jme.unwrapValue;\n var getCommutingTerms = Numbas.jme.display.getCommutingTerms;\n var matchTree = Numbas.jme.display.matchTree;\n\n var expr = part.studentAnswer;\n\n // is the student's answer in the form `factors*(terms)`?\n var m = match('m_all(m_any(m_number,m_type(name),m_type(name)^m_number))*(m_all(??)+m_nothing);rest', expr, true);\n if(!m) {\n part.multCredit(0,\"You don't seem to have extracted a common factor.\");\n return;\n }\n \n var terms = getCommutingTerms(m.rest,'+').terms;\n \n var gcd; // greatest common divisor of the coefficients of each term\n var min_degrees = {}; // minimum degree of each variable across the terms - if greater than 0, that variable is a common factor\n \n // for each term, collect the scalar part and the degree of each of the variables\n terms.map(function(t,i) { \n var factors = getCommutingTerms(t,'*').terms;\n var degrees = {};\n var n = 1;\n factors.forEach(function(f) {\n var tok = f.tok;\n var scalar = 1;\n var name = null;\n var degree = 0;\n var m = Numbas.jme.display.matchTree(Numbas.jme.compile('m_any(m_number;n, m_type(name);name, m_number;n*m_type(name);name, m_type(name);name^(m_number;degree), m_number;n*m_type(name);name^m_number;degree )'),f,true)\n\n console.log(Numbas.jme.display.treeToJME(f));\n\n if(!m) {\n console.log(' no match');\n return;\n }\n console.log(' match',m.n,m.name,m.degree);\n if(m.n) {\n n *= unwrap(m.n.tok);\n }\n if(m.name) {\n name = m.name.tok.name;\n if(m.degree) {\n degree = unwrap(m.degree.tok);\n } else {\n degree = 1;\n }\n degrees[name] = (degrees[name] || 0) + degree;\n }\n });\n console.log(Numbas.jme.display.treeToJME(t), degrees, n);\n \n if(i==0) {\n gcd = n;\n } else {\n gcd = Numbas.math.gcd(gcd,n);\n }\n \n Object.keys(degrees).forEach(function(k) {\n if(i==0) {\n min_degrees[k] = degrees[k];\n } else {\n min_degrees[k] = Math.min(min_degrees[k] || 0, degrees[k]);\n }\n });\n Object.keys(min_degrees).forEach(function(k) {\n if(degrees[k]===undefined) {\n min_degrees[k] = 0;\n }\n });\n \n });\n \n var common_factors = [];\n if(gcd>1) {\n common_factors.push(gcd);\n }\n Object.keys(min_degrees).filter(function(k){return min_degrees[k]>0}).forEach(function(k) {\n common_factors.push(k+'^'+min_degrees[k])\n });\n \n if(common_factors.length==0) {\n return true;\n } else {\n part.multCredit(0,\"Your terms still have a common factor of $\"+Numbas.jme.display.exprToLaTeX(common_factors.join('*'),'all',Numbas.jme.builtinScope)+\"$.\");\n }\n};", "css": ""}, "variables": {"x7": {"templateType": "anything", "name": "x7", "description": "", "group": "Ungrouped variables", "definition": "random(1..5)"}, "a": {"templateType": "anything", "name": "a", "description": "

Vector of every other random prime number

", "group": "Ungrouped variables", "definition": "repeat(random([3, 11, 17, 29, 37, 43] except b),50)"}, "x2": {"templateType": "anything", "name": "x2", "description": "", "group": "Ungrouped variables", "definition": "random(1..5)"}, "x3": {"templateType": "anything", "name": "x3", "description": "", "group": "Ungrouped variables", "definition": "random(1..5 except [x2])"}, "b": {"templateType": "anything", "name": "b", "description": "

Vector of the other every other random prime number

", "group": "Ungrouped variables", "definition": "repeat(random(2, 7, 13, 23, 31, 41, 53),50)"}, "c": {"templateType": "anything", "name": "c", "description": "

extra primes for when you need a third constant

", "group": "Ungrouped variables", "definition": "repeat(random([ 5, 19, 47] ),50)"}, "x1": {"templateType": "anything", "name": "x1", "description": "", "group": "Ungrouped variables", "definition": "random(1..5)"}, "x4": {"templateType": "anything", "name": "x4", "description": "", "group": "Ungrouped variables", "definition": "random(-5..-1)\n\n"}, "x5": {"templateType": "anything", "name": "x5", "description": "", "group": "Ungrouped variables", "definition": "random(1..5)"}, "x6": {"templateType": "anything", "name": "x6", "description": "", "group": "Ungrouped variables", "definition": "random(1..5)"}}, "tags": ["common factors", "common factors of linear algebraic equations", "common factors of quadratic equations", "finding common factors", "Linear equations", "linear equations", "quadratic equations", "Quadratic Equations", "Quadratic equations", "taxonomy"], "ungrouped_variables": ["a", "b", "c", "x1", "x2", "x3", "x4", "x5", "x6", "x7"], "functions": {}, "metadata": {"description": "

Factorise polynomials by identifying common factors. The first expression has a constant common factor; the rest have common factors involving variables.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "variable_groups": [], "parts": [{"sortAnswers": false, "variableReplacements": [], "gaps": [{"variableReplacements": [], "answer": "2({a[0]}x+{b[0]})", "showPreview": true, "expectedVariableNames": [], "unitTests": [], "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "scripts": {"mark": {"order": "after", "script": "question.mark_factorised(this);"}}, "showCorrectAnswer": true, "failureRate": 1, "type": "jme", "checkVariableNames": false, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "marks": 1, "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "vsetRangePoints": 5}], "unitTests": [], "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "prompt": "

$\\simplify{{2*a[0]}x+{2*b[0]}}=$ [[0]]

", "customMarkingAlgorithm": "", "marks": 0, "variableReplacementStrategy": "originalfirst"}, {"sortAnswers": false, "variableReplacements": [], "gaps": [{"variableReplacements": [], "answer": "6*y*({a[1]}+{b[1]}*y)", "showPreview": true, "expectedVariableNames": [], "unitTests": [], "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "scripts": {"mark": {"order": "after", "script": "question.mark_factorised(this);"}}, "showCorrectAnswer": true, "failureRate": 1, "type": "jme", "checkVariableNames": false, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "marks": 1, "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "vsetRangePoints": 5}], "unitTests": [], "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "prompt": "

$\\simplify{6{a[1]}y+6{b[1]}y^2}=$ [[0]]

", "customMarkingAlgorithm": "", "marks": 0, "variableReplacementStrategy": "originalfirst"}, {"sortAnswers": false, "variableReplacements": [], "gaps": [{"variableReplacements": [], "answer": "x*y*z*({a[2]}+{b[2]}x*y*z)", "showPreview": true, "expectedVariableNames": [], "unitTests": [], "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "scripts": {"mark": {"order": "after", "script": "question.mark_factorised(this);"}}, "showCorrectAnswer": true, "failureRate": 1, "type": "jme", "checkVariableNames": false, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "marks": 1, "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "vsetRangePoints": 5}], "unitTests": [], "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "prompt": "

$\\simplify{{a[2]}x*y*z+{b[2]}x^2y^2z^2}=$ [[0]]

", "customMarkingAlgorithm": "", "marks": 0, "variableReplacementStrategy": "originalfirst"}, {"sortAnswers": false, "variableReplacements": [], "gaps": [{"variableReplacements": [], "answer": "5({a[3]}d+{b[3]}r+m)", "showPreview": true, "expectedVariableNames": [], "unitTests": [], "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "scripts": {"mark": {"order": "after", "script": "question.mark_factorised(this);"}}, "showCorrectAnswer": true, "failureRate": 1, "type": "jme", "checkVariableNames": false, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "marks": 1, "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "vsetRangePoints": 5}], "unitTests": [], "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "prompt": "

$\\simplify{5{a[3]}d+5{b[3]}r+5m}=$ [[0]]

", "customMarkingAlgorithm": "", "marks": 0, "variableReplacementStrategy": "originalfirst"}, {"sortAnswers": false, "variableReplacements": [], "gaps": [{"variableReplacements": [], "answer": "6c*d*({a[4]}d+{b[4]}c+{c[1]}c*d)", "showPreview": true, "expectedVariableNames": [], "unitTests": [], "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "scripts": {"mark": {"order": "after", "script": "question.mark_factorised(this);"}}, "showCorrectAnswer": true, "failureRate": 1, "type": "jme", "checkVariableNames": false, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "marks": 1, "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "vsetRangePoints": 5}], "unitTests": [], "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "prompt": "

$\\simplify{6{a[4]}c*d^2+6{b[4]}c^2d+6{c[1]}c^2d^2}=$ [[0]]

", "customMarkingAlgorithm": "", "marks": 0, "variableReplacementStrategy": "originalfirst"}], "variablesTest": {"condition": "", "maxRuns": "1000"}, "rulesets": {}}, {"name": "Solve a linear equation $ax+b = cx+d$", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "metadata": {"description": "

Solve a simple linear equation algebraically. The unknown appears on both sides of the equation.

", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["d", "f", "g", "h", "x", "gcd_hfdg", "hf_coprime", "dg_coprime", "finalb"], "type": "question", "rulesets": {}, "variable_groups": [], "statement": "", "advice": "

We are asked to solve the equation

\n

\\[ \\var{d}x-\\var{f}=\\var{g}x+\\var{h} \\]

\n

In this equation, there are $x$ terms and constant terms on both sides of the equals sign.

\n

To solve this equation, we must rearrange it to get $x$ on its own.

\n

\\begin{align}
\\var{d}x-\\var{f} &= \\var{g}x+\\var{h} \\\\[0.5em]
\\var{d}x-\\var{g}x &= \\var{h}+\\var{f} & \\text{Move } x \\text{ terms to the left, and constant terms to the right.}\\\\[0.5em]
\\simplify{{d-g}*x} &= {\\var{h+f}} & \\text{Collect like terms together.}\\\\[0.5em]
x &=\\frac{\\var{h+f}}{\\var{d-g}} & \\text{Divide both sides by } \\var{d-g} \\text{.} \\\\[0.5em]
x &= \\simplify{{h+f}/{d-g}}
\\end{align}

", "parts": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

$\\var{d}x-\\var{f}=\\var{g}x+\\var{h}$

\n

What is the value of $x$?

\n

$x = $ [[0]]

", "gaps": [{"correctAnswerFraction": false, "showCorrectAnswer": true, "mustBeReducedPC": 0, "showFeedbackIcon": true, "marks": "2", "minValue": "finalb", "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "finalb", "mustBeReduced": false, "allowFractions": false, "variableReplacements": [], "correctAnswerStyle": "plain"}], "showFeedbackIcon": true, "marks": 0}], "tags": ["taxonomy"], "preamble": {"js": "", "css": ""}, "functions": {}, "variables": {"dg_coprime": {"description": "", "group": "Ungrouped variables", "definition": "(d-g)/gcd_hfdg", "name": "dg_coprime", "templateType": "anything"}, "x": {"description": "", "group": "Ungrouped variables", "definition": "random(2..6)", "name": "x", "templateType": "anything"}, "gcd_hfdg": {"description": "", "group": "Ungrouped variables", "definition": "gcd((h+f),(d-g))", "name": "gcd_hfdg", "templateType": "anything"}, "hf_coprime": {"description": "", "group": "Ungrouped variables", "definition": "(h+f)/gcd_hfdg", "name": "hf_coprime", "templateType": "anything"}, "f": {"description": "", "group": "Ungrouped variables", "definition": "random(2..6)", "name": "f", "templateType": "anything"}, "h": {"description": "", "group": "Ungrouped variables", "definition": "(x*(d-g))-f", "name": "h", "templateType": "anything"}, "g": {"description": "", "group": "Ungrouped variables", "definition": "random(2..5)", "name": "g", "templateType": "anything"}, "finalb": {"description": "", "group": "Ungrouped variables", "definition": "hf_coprime/dg_coprime", "name": "finalb", "templateType": "anything"}, "d": {"description": "", "group": "Ungrouped variables", "definition": "random(g+2..8)", "name": "d", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Substitute values into formulas", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Aiden McCall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1592/"}], "metadata": {"description": "

Substitute given values into formulas.

", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["r", "x1", "n", "x2", "const", "sales"], "type": "question", "advice": "

When inserting numbers into your calculator make sure you place brackets correctly.

\n

a) 

\n

As $x = \\var{n+2}$,

\n

substitute $\\var{n+2}$ into $\\var{x2}x^2 + \\var{x1}x + \\var{const}$.

\n

\\begin{align}
\\var{x2}x^2 + \\var{x1}x + \\var{const} &= \\var{x2} (\\var{n+2})^2 + \\var{x1}(\\var{n+2}) + \\var{const} \\\\
&=  \\simplify{{x2} ({n+2})^2 + {x1}({n+2}) + {const}}\\,.
\\end{align}

\n

b)

\n

As $y =  \\var{n}$,

\n

substitute $\\var{n}$ into $\\var{n+1}y^2-\\var{x2}y$.

\n

\\begin{align}
\\var{n+1}y^2-\\var{x2}y &=  \\var{n+1}(\\var{n})^2-\\var{x2}(\\var{n}) \\\\
&=  \\simplify{{n+1}({n})^2-{x2}({n})}\\,.
\\end{align}

\n

c)

\n

As we are given a temperature in degrees Celcius, $T_C = \\var{T_C}°C.$

\n

Substituting $T_C$ into $T_C = 1.8\\,T_C + 32$.

\n

\\begin{align}
T_F &=1.8\\, T_C+32 \\\\
&=1.8 (\\var{T_C}) + 32 \\\\
&= \\var{dpformat(1.8 {T_C} +32, 1)}\\,°F\\,.
\\end{align}

\n

\n

\n

", "variable_groups": [{"name": "Name variables", "variables": ["name", "name2", "pronoun"]}, {"name": "Temperature conversion", "variables": ["T_F", "T_C"]}], "rulesets": {}, "statement": "

Substitute the given values in the equations below.

", "parts": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "marks": 0, "gaps": [{"correctAnswerFraction": false, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "allowFractions": false, "minValue": "{x2}{n+2}^2+{x1}{n+2}+{const}", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "{x2}{n+2}^2+{x1}{n+2}+{const}", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true}], "showFeedbackIcon": true, "prompt": "

A curve is defined by a function $y=\\simplify{{x2}x^2 + {x1}x + {const}}$.

\n

What is the $y$ coordinate value of the point on the curve at $x=\\var{n+2}$?

\n

$y =$ [[0]]

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

{name[n]} sells luxury yachts.

\n

The predicted sales of the luxury yachts are defined by

\n

\\[S=\\simplify{{n+1}y^2-{x2}y},\\]

\n

where
$S$ is the number of sales predicted this year;
$y$ is the number of luxury yachts sold in the previous year.

\n

{pronoun} sold {n} yachts in the previous year.

\n

Calculate $S$, the number of sales predicted this year.

\n

$S =$ [[0]]

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

You can convert temperatures from degrees celsius to degrees fahrenheit by using the formula

\n

\\[T_F=1.8\\, T_C+32,\\]

\n

where
$T_F$ = Temperature in $°F$
$T_C$ = Temperature in $°C$.

\n

Convert $\\var{T_C}°C$ into degrees fahrenheit.

\n

$T_F =$ [[0]] $°F$  

"}], "tags": ["predicted value", "substitution", "Substitution", "taxonomy"], "preamble": {"css": "", "js": ""}, "functions": {}, "variables": {"pronoun": {"description": "

Defines the pronoun in the question.

", "definition": "if(mod(n,2)=0,\"He\",\"She\")", "group": "Name variables", "name": "pronoun", "templateType": "anything"}, "T_C": {"description": "

Creates a random integer value for the temperature in degrees celcius.

", "definition": "random(5..30#1)", "group": "Temperature conversion", "name": "T_C", "templateType": "anything"}, "name": {"description": "

List of names to randomise. Can change to any name inserted

", "definition": "[\"Andrew\",\"Susan\",\"Tom\",\"Geraldine\",\"Joshua\",\"Chantel\"]", "group": "Name variables", "name": "name", "templateType": "anything"}, "n": {"description": "

n is a random number between 0 and 4 that picks a name from {name} and then picks the next in the list for the other name such that there is always a male and a female in the question. 

", "definition": "random(0..4#1)", "group": "Ungrouped variables", "name": "n", "templateType": "anything"}, "sales": {"description": "", "definition": "(n+1)n^2-x2*n", "group": "Ungrouped variables", "name": "sales", "templateType": "anything"}, "const": {"description": "

The constant coefficient

", "definition": "random(1..100#1)", "group": "Ungrouped variables", "name": "const", "templateType": "anything"}, "T_F": {"description": "

Creates a value for Temperature in fahrenheit.

", "definition": "T_C*1.8+32", "group": "Temperature conversion", "name": "T_F", "templateType": "anything"}, "r": {"description": "

A random variable which will be inputted by the student.

", "definition": "random(1..50#0.1)", "group": "Ungrouped variables", "name": "r", "templateType": "anything"}, "x2": {"description": "

The x^2 coefficient

", "definition": "random(1..(n+1)*n)", "group": "Ungrouped variables", "name": "x2", "templateType": "anything"}, "name2": {"description": "

List of names to randomise. Can change to any name inserted

", "definition": "[\"Andrew\",\"Susan\",\"Tom\",\"Geraldine\",\"Joshua\",\"Chantel\"]", "group": "Name variables", "name": "name2", "templateType": "anything"}, "x1": {"description": "

The x coefficient

", "definition": "random(1..50)", "group": "Ungrouped variables", "name": "x1", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Laws of Indices", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "tags": ["indices", "laws of indices", "powers", "taxonomy"], "metadata": {"description": "

This question aims to test understanding and ability to use the laws of indices.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Using the laws of indices, simplify each expression down to its simplest form. Recall that $a^{0} = 1$ for any number $a$.

", "advice": "

a)

\n

Here we are using the rule of indices: $a^m \\times a^n = a^{m+n}$.

\n

Using this rule, 

\n

\\[
\\begin{align}
a^\\var{x} \\times a^\\var{y}\\ &= a^\\simplify[all, !collectNumbers]{{x}+{y}}\\\\
&= a^\\var{x+y}.
\\end{align}
\\]

\n

b)

\n

We are asked to find $\\var{c}a^\\var{p} \\times \\var{d}a^\\var{q}$.

\n

Notice there is a constant in front of each of the terms.

\n

To do this, write the product out explicitly, as

\n

\\[\\var{c}a^\\var{p} \\times \\var{d}a^\\var{q} = \\var{c} \\times \\var{d} \\times a^\\var{p} \\times a^\\var{q}.\\]

\n

We know that $\\var{c} \\times \\var{d} = \\var{c*d}$, and using the rule of indices: $a^\\var{p} \\times a^\\var{q} = a^\\var{p+q}$.

\n

Therefore:

\n

\\begin{align}
\\var{c}a^\\var{p} \\times \\var{d}a^\\var{q}&= \\var{c*d} \\times a^\\var{p+q} \\\\
&= \\simplify{{c*d}*a^{p+q}}.
\\end{align}

\n

c)

\n

Here we are using: $a^m \\div a^n = a^{m-n}$.

\n

We are asked to simplify the expression, $\\displaystyle\\simplify{{b}*a^{x}/({g}*a^{y})}$.

\n

To do this, we just have to use the previously mentioned rule of indices. We write this out explicity as

\n

\\[\\simplify{{b}*a^{x}/({g}*a^{y})} = \\simplify{{b}/{g}} \\times \\simplify{a^{x}/(a^{y})}.\\]

\n

Using rules of indices,

\n

\\begin{align}                                                                                                                                                                                                                                                                                           \\frac{a^\\var{x}}{a^\\var{y}} &= a^\\var{x} \\div a^\\var{y}\\\\
&= a^\\simplify[all, !collectNumbers]{{x}-{y}}\\\\
&= a^\\var{x-y}.
\\end{align}

\n

Therefore,

\n

\\begin{align}
\\frac{\\var{b}a^\\var{x}}{\\var{g}a^\\var{y}} &= \\simplify{{b}/{g}} \\times \\simplify{a^{{x}-{y}}}\\\\
&= \\simplify{{b}/{g}*a^{x-y}}.
\\end{align}

\n

Alternatively, 

\n

Using the rule of indices: $a^{-m}  = \\displaystyle\\frac{1}{a^{m}}$, we can rewrite the question as:

\n

\\begin{align}
\\frac{\\var{b}a^\\var{x}}{\\var{g}a^\\var{y}} &= \\simplify{{b}/{g}} \\times \\frac{a^\\var{x}}{a^\\var{y}}\\\\
&= \\simplify{{b}/{g}} \\times a^\\var{x} \\times a^{-\\var{y}}.
\\end{align}

\n

And then using the rule: $a^m \\times a^n = a^{m+n}$, this becomes:

\n

\\begin{align}
\\simplify{{b}/{g}} \\times a^\\var{x} \\times a^{-\\var{y}} &= \\simplify{{b}/{g}} \\times a^\\simplify[all,!collectNumbers]{{x}+(-{y})}\\\\
&= \\simplify{{b}/{g}*a^{x-y}}.
\\end{align}

\n

d)

\n

The question asks us to simplify $(\\simplify{{c}*a^{p}})^{\\var{q}}$.

\n

To do this we use the rules:

\n

\\[(a^{m})^{n} = a^{mn},\\]

\n

\\[(ab)^m = a^mb^m.\\]

\n

We can then expand the equation as

\n

\\[(\\simplify{{c}*a^{p}})^{\\var{q}}= \\var{c}^{\\var{q}} \\times (a^{\\var{p}})^{\\var{q}}.\\]

\n

Then using the rule of indices mentioned previously,

\n

\\[
\\begin{align}
(\\simplify{{c}*a^{p}})^{\\var{q}}&= \\simplify{{c}^{q}} \\times a^\\var{p*q}\\\\
&= \\simplify{{c}^{q}*a^{p*q}}.
\\end{align}
\\]

\n

e)

\n

The question asks us to simplify $\\sqrt[\\var{d}]{\\var{x}^\\var{d}a}$.

\n

To do this we use the rules:

\n

\\[a^\\frac{1}{m} = \\sqrt[m]{a},\\]

\n

\\[(ab)^m = a^mb^m.\\]

\n

We can expand the expression as follows:

\n

\\[
\\begin{align}
\\sqrt[\\var{d}]{a} &= (\\simplify{a})^\\frac{1}{\\var{d}}\\\\
&= a^\\frac{1}{\\var{d}}.
\\end{align}
\\]

\n

f)

\n

The question requires us to simplify $\\sqrt[\\var{c}]{a^\\var{q}}$.

\n

Here, we use the rule of indices: $a^\\frac{n}{m} = \\sqrt[m]{a^n}$, allowing us to expand the expression as follows:

\n

\\[
\\begin{align}
\\sqrt[\\var{c}]{\\simplify{a^{q}}} &= \\simplify[fractionnumbers,all]{(a^{q})^{{1}/{{c}}}}\\\\
&= \\simplify[fractionnumbers,all]{a^{{q}/{c}}}.
\\end{align}
\\]

", "rulesets": {}, "variables": {"g": {"name": "g", "group": "Ungrouped variables", "definition": "random(2..9 except b)", "description": "

Used in part c

", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(2,4)", "description": "

Used in parts b,d and f

", "templateType": "anything"}, "x": {"name": "x", "group": "Ungrouped variables", "definition": "random(2..9 except y)", "description": "

Used in parts a,c and e

", "templateType": "anything"}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(3..5)", "description": "

Used in parts b and e

", "templateType": "anything"}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "

Used in parts b and d

", "templateType": "anything"}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "random(3,5)", "description": "

Used in parts b,d and f

", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "

Used in part c

", "templateType": "anything"}, "y": {"name": "y", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "

\n

Used in parts a,c and f

", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["x", "y", "c", "d", "p", "q", "b", "g"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Write $a^{\\var{x}} \\times a^{\\var{y}}$ as a single power of $a$.

\n

\n

$a^{\\var{x}} \\times a^{\\var{y}} =$ [[0]].

", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Use the rule: $a^m \\times a^n = a^{m+n}$.

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "a^{x+y}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "mustmatchpattern": {"pattern": "a^?`?", "partialCredit": 0, "message": "You haven't simplified: your answer is not in the form $a^?$.", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Write $\\var{c}a^\\var{p} \\times \\var{d}a^\\var{q}$ as an integer multiplied by a single power of $a$.

\n

$\\var{c}a^\\var{p} \\times \\var{d}a^\\var{q} =$ [[0]].

\n

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{c*d}*a^{p+q}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "mustmatchpattern": {"pattern": "$n*a^?`?", "partialCredit": 0, "message": "You haven't simplified: your answer is not in the form $?a^?$.", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Write $\\displaystyle\\simplify{{b}*a^{x}/({g}*a^{y})}$ as a number multiplied by a single power of $a$.

\n

$\\displaystyle\\simplify{{b}*a^{x}/({g}*a^{y})} =$ [[0]].

\n

", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

You could use one of the following rules:

\n

$a^m \\div a^n = a^{m-n}$.

\n

$a^{-m} = \\displaystyle\\frac{1}{a^m}$.

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{b}/{g}a^{x-y}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "mustmatchpattern": {"pattern": "$n/$n`? * a^?`?", "partialCredit": 0, "message": "You haven't simplified: your answer is not in the form $\\frac{?}{?} \\cdot a^?$.", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Write $(\\simplify{{c}*a^{p}})^{\\var{q}}$ as an integer multiplied by a single power of $a$.

\n

$(\\simplify{{c}*a^{p}})^{\\var{q}} =$ [[0]].

\n

", "stepsPenalty": 0, "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Use the rules:

\n

$(ab)^m = a^mb^m$.

\n

$(a^m)^n = a^{mn}$.

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{c^{q}}*a^{p*q}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "mustmatchpattern": {"pattern": "$n`?*a^?`?", "partialCredit": 0, "message": "You must write your answer as an integer multiplied by a power of $a$.", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Write $\\sqrt[\\var{d}]{a}$ as a single power of $a$. 

\n

$\\sqrt[\\var{d}]{a} =$ [[0]].

", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Use the rule: $a^\\frac{1}{m} = \\sqrt[m]{a}$.

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "a^(1/{d})", "answerSimplification": "basic", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "mustmatchpattern": {"pattern": "a^?`?", "partialCredit": 0, "message": "

You must input your answer as a single power of a.

", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Write $\\sqrt[\\var{q}]{a^\\var{c}}$ as a single power of $a$.

\n

$\\sqrt[\\var{q}]{a^\\var{c}} =$ [[0]].

", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Use the rule: $a^\\frac{n}{m} = \\sqrt[m]{a^n}$.

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "a^({c}/{q})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "mustmatchpattern": {"pattern": "a^?`?", "partialCredit": 0, "message": "

You must input your answer as a single power of a.

", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}]}], "sortAnswers": false}], "type": "question"}, {"name": "Using Laws for Addition and Subtraction of Logarithms", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Aiden McCall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1592/"}, {"name": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "tags": ["addition and subtraction of logarithms", "Laws of logarithms", "laws of logarithms", "logarithms", "Logarithms", "logs", "Logs", "taxonomy"], "advice": "

a)

\n

We need to use the rule

\n

\\[\\log_a(x)+\\log_a(y)=\\log_a(xy)\\text{.}\\]

\n

Substituting in our values for $x$ and $y$ gives

\n

\\[\\begin{align}
\\log_a(\\var{x1[1]})+\\log_a(\\var{x1[0]})&=\\log_a(\\var{x1[1]}\\times \\var{x1[0]})\\\\
&=\\log_a(\\var{x1[1]*x1[0]})\\text{.}
\\end{align}\\]

\n

\n

b)

\n

We need to use the rule

\n

\\[\\log_a(x)-\\log_a(y)=\\log_a\\left(\\frac{x}{y}\\right)\\text{.}\\]

\n

Substituting in our values for $x$ and $y$ gives

\n

\\[\\begin{align}
\\log_a(\\var{x1[4]*y1})-\\log_a(\\var{x1[4]})&=\\log_a(\\var{x1[4]*y1}\\div \\var{x1[4]})\\\\
&=\\log_a(\\var{y1})\\text{.}
\\end{align}\\]

\n

", "variables": {"y1": {"description": "", "definition": "random(2..6)", "templateType": "anything", "name": "y1", "group": "Ungrouped variables"}, "x1": {"description": "", "definition": "repeat(random(2..20),8)", "templateType": "anything", "name": "x1", "group": "Ungrouped variables"}}, "statement": "

Simplify the expressions to fill in the gaps.

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

$\\log_a(\\var{x1[1]})+ \\log_a(\\var{x1[0]})=\\log_a($ [[0]]$)$

", "steps": [{"scripts": {}, "variableReplacements": [], "type": "information", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

When adding and subtracting logarithms we can simplify the expressions using some logarithm laws. These laws are

\n

\\[\\begin{align}
\\log_a(x)+\\log_a(y)&=\\log_a(xy)\\text{,}\\\\
\\log_a(x)-\\log_a(y)&=\\log_a\\left(\\frac{x}{y}\\right)\\text{.}
\\end{align}\\]

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

$\\log_a(\\var{(x1[4])*y1})-\\log_a(\\var{x1[4]})=\\log_a($ [[0]]$)$

", "steps": [{"scripts": {}, "variableReplacements": [], "type": "information", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

When adding and subtracting logarithms we can simplify the expressions using some logarithm laws. These laws are

\n

\\[\\begin{align}
\\log_a(x)+\\log_a(y)&=\\log_a(xy)\\text{,}\\\\
\\log_a(x)-\\log_a(y)&=\\log_a\\left(\\frac{x}{y}\\right)\\text{.}
\\end{align}\\]

", "marks": 0}], "marks": 0}], "ungrouped_variables": ["x1", "y1"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Use laws for addition and subtraction of logarithms to simplify a given logarithmic expression to an arbitrary base.

"}, "functions": {}}, {"name": "Rearranging Logarithms involving Indices", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "statement": "

When logarithms involve indices we can rearrange them using the rule,

\n

\\[\\log_a(x^y)=y\\log_a(x)\\text{.}\\]

\n

This can also be useful for removing integers from the front of logarithms.

", "advice": "

a)

\n

i)

\n

We need to use the rule

\n

\\[k\\log_a(x)=\\log_a(x^k)\\text{.}\\]

\n

Subsituting in our values for $x$ and $k$ gives

\n

\\[\\var{x1[3]}\\log_a(\\var{z1[0]})=\\log_a(\\var{z1[0]^x1[3]})\\text{.}\\]

\n

ii)

\n

We need to use the rule

\n

\\[k\\log_a(x)=\\log_a(x^k)\\text{.}\\]

\n

Subsituting in our values for $x$ and $k$ gives

\n

\\[\\var{x1[1]}\\log_a(\\var{z1[1]})=\\log_a(\\var{z1[1]^x1[1]})\\text{.}\\]

\n

b)

\n

i)

\n

The rule for indices in logarithms also works the other way around,

\n

\\[\\log_a(x^k)=k\\log_a(x)\\text{.}\\]

\n

We can use this to rearrange our expression by substituting in values for $x$ and $k$.

\n

\\[\\begin{align}
\\log_a(\\var{x1[3]^z1[5]})&=k\\log_a(\\var{x1[3]})\\\\
\\var{x1[3]^z1[5]}&=\\var{x1[3]}^k\\\\
\\var{x1[3]^z1[5]}&=\\var{x1[3]}^\\var{z1[5]}\\\\
k&=\\var{z1[5]}\\\\
\\log_a(\\var{x1[3]^z1[5]})&=\\var{z1[5]}\\log_a(\\var{x1[3]})
\\end{align}\\]

\n

ii)

\n

As with i) we can use the rule

\n

\\[\\log_a(x^k)=k\\log_a(x)\\text{.}\\]

\n

We can use this to rearrange our expression by substituting in values for $x$ and $k$.

\n

\\[\\begin{align}
\\log_a(\\var{x1[5]^z1[6]})&=k\\log_a(\\var{x1[5]})\\\\
\\var{x1[5]^z1[6]}&=\\var{x1[5]}^k\\\\
\\var{x1[5]^z1[6]}&=\\var{x1[5]}^\\var{z1[6]}\\\\
k&=\\var{z1[6]}\\\\
\\log_a(\\var{x1[5]^z1[6]})&=\\var{z1[6]}\\log_a(\\var{x1[5]})
\\end{align}\\]

\n

c)

\n

i)

\n

From the structure of this question we can tell that the answer can be written in the form $k\\log_a(\\var{x1[3]})$, meaning all of the values in the expression

\n

\\[\\log_a(\\var{x1[3]^z1[2]})+\\log_a(\\var{x1[3]})\\]

\n

can be written in the form $k\\log_a(\\var{x1[3]})$.

\n

If we look at each log individually we can make sure they all take this form.

\n

\\[\\begin{align}
\\log_a(\\var{x1[3]^z1[2]})&=k\\log_a(\\var{x1[3]})\\\\
\\var{x1[3]^z1[2]}&=\\var{x1[3]}^k\\\\
\\var{x1[3]^z1[2]}&=\\var{x1[3]}^\\var{z1[2]}\\\\
k&=\\var{z1[2]}\\\\
\\log_a(\\var{x1[3]^z1[2]})&=\\var{z1[2]}\\log_a(\\var{x1[3]})
\\end{align}\\]

\n

We can now write our expression as

\n

\\[\\begin{align}
\\log_a(\\var{x1[3]^z1[2]})+\\log_a(\\var{x1[3]})&=\\var{z1[2]}\\log_a(\\var{x1[3]})+\\log_a(\\var{x1[3]})\\\\
&=\\var{z1[2]+1}\\log_a(\\var{x1[3]})\\text{.}
\\end{align}\\]

\n

ii)

\n

From this question we know our answer is written in the form $k\\log_a(\\var{x1[4]})$, meaning all of the values in the expression

\n

\\[\\log_a(\\var{x1[4]^z1[1]})+\\log_a(\\var{x1[4]^z1[0]})\\]

\n

can be written in the form $k\\log_a(\\var{x1[4]})$.

\n

If we look at each log individually we can make sure they all take this form.

\n

\\[\\begin{align}
\\log_a(\\var{x1[4]^z1[1]})&=k\\log_a(\\var{x1[4]})\\\\
\\var{x1[4]^z1[1]}&=\\var{x1[4]}^k\\\\
\\var{x1[4]^z1[1]}&=\\var{x1[4]}^\\var{z1[1]}\\\\
k&=\\var{z1[1]}\\\\
\\log_a(\\var{x1[4]^z1[1]})&=\\var{z1[1]}\\log_a(\\var{x1[4]})
\\end{align}\\]

\n

\\[\\begin{align}
\\log_a(\\var{x1[4]^z1[0]})&=k\\log_a(\\var{x1[4]})\\\\
\\var{x1[4]^z1[0]}&=\\var{x1[4]}^k\\\\
\\var{x1[4]^z1[0]}&=\\var{x1[4]}^\\var{z1[0]}\\\\
k&=\\var{z1[0]}\\\\
\\log_a(\\var{x1[4]^z1[0]})&=\\var{z1[0]}\\log_a(\\var{x1[4]})
\\end{align}\\]

\n

We can now write our expression as

\n

\\[\\begin{align}
\\log_a(\\var{x1[4]^z1[1]})+\\log_a(\\var{x1[4]^z1[0]})&=\\var{z1[1]}\\log_a(\\var{x1[4]})+\\var{z1[0]}\\log_a(\\var{x1[4]})\\\\
&=\\var{z1[1]+z1[0]}\\log_a(\\var{x1[4]})\\text{.}
\\end{align}\\]

\n

iii)

\n

From this question we know our answer is written in the form $k\\log_a(\\var{x1[5]})$, meaning all of the values in the expression

\n

\\[\\log_a(\\var{x1[5]^z1[1]})+\\log_a(\\var{x1[5]^z1[2]})-\\log_a(\\var{x1[5]^z1[4]})\\]

\n

can be written in the form $k\\log_a(\\var{x1[5]})$.

\n

If we look at each log individually we can make sure they all take this form.

\n

\\[\\begin{align}
\\log_a(\\var{x1[5]^z1[1]})&=k\\log_a(\\var{x1[5]})\\\\
\\var{x1[5]^z1[1]}&=\\var{x1[5]}^k\\\\
\\var{x1[5]^z1[1]}&=\\var{x1[5]}^\\var{z1[1]}\\\\
k&=\\var{z1[1]}\\\\
\\log_a(\\var{x1[5]^z1[1]})&=\\var{z1[1]}\\log_a(\\var{x1[5]})
\\end{align}\\]

\n

\\[\\begin{align}
\\log_a(\\var{x1[5]^z1[2]})&=k\\log_a(\\var{x1[5]})\\\\
\\var{x1[5]^z1[2]}&=\\var{x1[5]}^k\\\\
\\var{x1[5]^z1[2]}&=\\var{x1[5]}^\\var{z1[2]}\\\\
k&=\\var{z1[2]}\\\\
\\log_a(\\var{x1[5]^z1[2]})&=\\var{z1[2]}\\log_a(\\var{x1[5]})
\\end{align}\\]

\n

\\[\\begin{align}
\\log_a(\\var{x1[5]^z1[4]})&=k\\log_a(\\var{x1[5]})\\\\
\\var{x1[5]^z1[4]}&=\\var{x1[5]}^k\\\\
\\var{x1[5]^z1[4]}&=\\var{x1[5]}^\\var{z1[4]}\\\\
k&=\\var{z1[4]}\\\\
\\log_a(\\var{x1[5]^z1[4]})&=\\var{z1[4]}\\log_a(\\var{x1[5]})
\\end{align}\\]

\n

We can now write our expression as

\n

\\[\\begin{align}
\\log_a(\\var{x1[5]^z1[1]})+\\log_a(\\var{x1[5]^z1[2]})-\\log_a(\\var{x1[5]^z1[4]})&=\\var{z1[1]}\\log_a(\\var{x1[5]})+\\var{z1[0]}\\log_a(\\var{x1[5]})-\\var{z1[4]}\\log_a(\\var{x1[5]})\\\\
&=\\var{z1[1]+z1[2]-z1[4]}\\log_a(\\var{x1[5]})\\text{.}
\\end{align}\\]

", "variables": {"v": {"description": "", "group": "part c", "templateType": "anything", "name": "v", "definition": "random(2..10)"}, "b4": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "b4", "definition": "random(2..4 except b1)"}, "c": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "c", "definition": "b1^b4"}, "m": {"description": "", "group": "part c", "templateType": "anything", "name": "m", "definition": "random(2..20)"}, "p": {"description": "", "group": "part c", "templateType": "anything", "name": "p", "definition": "random(3..6)"}, "x1": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "x1", "definition": "repeat(random(2..5),8)"}, "q": {"description": "", "group": "part c", "templateType": "anything", "name": "q", "definition": "v^p"}, "y1": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "y1", "definition": "random(2..6)"}, "b1": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "b1", "definition": "random(2..8 #2)"}, "b": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "b", "definition": "c/2"}, "b2": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "b2", "definition": "b-2"}, "z1": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "z1", "definition": "repeat(random(2..4),10)"}}, "tags": ["logarithm", "Logarithm", "Logs", "logs", "taxonomy"], "variable_groups": [{"name": "part c", "variables": ["p", "v", "q", "m"]}], "parts": [{"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answer": "{x1[3]}^{z1[0]}", "marks": 1, "variableReplacements": [], "checkvariablenames": false, "showpreview": true}, {"checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answer": "{x1[1]}^{z1[1]}", "marks": 1, "variableReplacements": [], "checkvariablenames": false, "showpreview": true}], "showCorrectAnswer": true, "prompt": "

Simplify the following expressions. 

\n

i)

\n

$\\var{z1[0]}\\log_a(\\var{x1[3]})=\\log_a($ [[0]]$)$

\n

ii)

\n

$\\var{z1[1]}\\log_a(\\var{x1[1]})=\\log_a($ [[1]]$)$

", "marks": 0}, {"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answer": "{z1[5]}", "marks": 1, "variableReplacements": [], "checkvariablenames": false, "showpreview": true}, {"checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answer": "{z1[6]}", "marks": 1, "variableReplacements": [], "checkvariablenames": false, "showpreview": true}], "showCorrectAnswer": true, "prompt": "

Simplify the following expressions. 

\n

i)

\n

$\\log_a(\\var{x1[3]^z1[5]})=$ [[0]] $\\log_a(\\var{x1[3]})$

\n

ii)

\n

$\\log_a(\\var{x1[5]^z1[6]})=$ [[1]] $\\log_a(\\var{x1[5]})$

", "marks": 0}, {"scripts": {}, "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answer": "{z1[2]+1}", "marks": 1, "variableReplacements": [], "checkvariablenames": false, "showpreview": true}, {"checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answer": "{z1[1]+z1[0]}", "marks": 1, "variableReplacements": [], "checkvariablenames": false, "showpreview": true}, {"checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answer": "{z1[1]+z1[2]-z1[4]}", "marks": 1, "variableReplacements": [], "checkvariablenames": false, "showpreview": true}], "showCorrectAnswer": true, "prompt": "

i)

\n

$\\log_a(\\var{x1[3]^z1[2]})+\\log_a(\\var{x1[3]})=$ [[0]]$\\log_a(\\var{x1[3]})$

\n

ii)

\n

$\\log_a(\\var{x1[4]^z1[1]})+\\log_a(\\var{x1[4]^z1[0]})=$ [[1]]$\\log_a(\\var{x1[4]})$

\n

iii)

\n

$\\log_a(\\var{x1[5]^z1[1]})+\\log_a(\\var{x1[5]^z1[2]})-\\log_a(\\var{x1[5]^z1[4]})=$ [[2]]$\\log_a(\\var{x1[5]})$

", "marks": 0}], "ungrouped_variables": ["x1", "y1", "z1", "b1", "c", "b4", "b", "b2"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Use the rule $\\log_a(n^b) = b\\log_a(n)$ to rearrange some expressions.

"}, "preamble": {"css": "", "js": ""}, "functions": {}}, {"name": "Combining Logarithm Rules to Solve Equations", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}], "metadata": {"description": "

Apply and combine logarithm laws in a given equation to find the value of $x$.

", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["x1", "y1", "z1", "b1", "c", "b4", "b", "b2"], "type": "question", "rulesets": {}, "advice": "

a)

\n

We can use the logarithm law

\n

\\[k\\log_a(x)=\\log_a(x^k)\\text{,}\\]

\n

to also give a more specific rule

\n

\\[\\begin{align}
\\log_a\\left(\\frac{1}{x}\\right)&=\\log_a(x^{-1})\\\\
&=-\\log_a(x)\\text{.}
\\end{align}\\]

\n

This means we can write our expression as

\n

\\[\\log_\\var{b1}(x-\\var{b2})+\\log_\\var{b1}({x})=\\var{b4}\\text{.}\\]

\n

Then using the rule

\n

\\[\\log_a(x)+\\log_a(y)=\\log_a(x\\times y)\\text{,}\\]

\n

we can write our equation as

\n

\\[\\begin{align}
\\log_\\var{b1}(x(x-\\var{b2}))&=\\var{b4}\\\\
\\log_\\var{b1}(x^2-\\var{b2}x)&=\\var{b4}\\text{.}\\\\
\\end{align}\\]

\n

We then rely on the definition of $\\log_a$

\n

\\[b=a^c \\Longleftrightarrow \\log_{a}b=c\\]

\n

to write our equation as

\n

\\[\\begin{align}
x^2-\\var{b2}x&=\\var{b1}^\\var{b4}\\\\
&=\\var{b1^b4}\\text{.}
\\end{align}\\]

\n

We can then write out our equation and solve either by factorising or using the quadratic formula;

\n

\\[\\begin{align}
x^2-\\var{b2}x-\\var{b1^{b4}}&=0\\\\
(x+2)(x-\\var{b})&=0\\text{.}
\\end{align}\\]

\n

As logarithms can only be applied to positive numbers, the only possible value for $x$ is $\\var{b}$.

\n

b)

\n

$\\ln(x)$ is a shorthand for $\\log_e(x)$, so we can apply the same laws of logarithms here.

\n

Therefore applying the rule

\n

\\[k\\log_a(x)=\\log_a(x^k)\\]

\n

we can write our equation as

\n

\\[\\ln(x^\\var{p})+\\ln(\\var{q})=\\var{m}\\text{.}\\]

\n

Then using the rule

\n

\\[\\log_a(x)+\\log_a(y)=\\log_a(x\\times y)\\]

\n

we can write our equation as

\n

\\[\\ln(\\var{q}x^\\var{p})=\\var{m}\\text{.}\\]

\n

As $\\ln=\\log_e$ we can use 

\n

\\[a=b^c \\Longleftrightarrow \\log_ba=c\\]

\n

to write our equation as

\n

\\[\\var{q}x^\\var{p}=e^\\var{m}\\text{.}\\]

\n

We then just need to rearrange our equation

\n

\\[\\begin{align}
\\var{q}x^\\var{p}&=e^\\var{m}\\\\[0.5em]
x^\\var{p}&=\\frac{e^\\var{m}}{\\var{q}}\\\\[0.5em]
x&=\\frac{e^{\\var{m}/\\var{p}}}{\\var{q^(1/{p})}}
\\end{align}\\]

", "variables": {"p": {"description": "", "definition": "random(3..6)", "group": "part c", "name": "p", "templateType": "anything"}, "c": {"description": "", "definition": "b1^b4", "group": "Ungrouped variables", "name": "c", "templateType": "anything"}, "v": {"description": "", "definition": "random(2..10)", "group": "part c", "name": "v", "templateType": "anything"}, "m": {"description": "", "definition": "random(2..20)", "group": "part c", "name": "m", "templateType": "anything"}, "b1": {"description": "", "definition": "random(2..8 #2)", "group": "Ungrouped variables", "name": "b1", "templateType": "anything"}, "y1": {"description": "", "definition": "random(2..6)", "group": "Ungrouped variables", "name": "y1", "templateType": "anything"}, "b2": {"description": "", "definition": "b-2", "group": "Ungrouped variables", "name": "b2", "templateType": "anything"}, "q": {"description": "", "definition": "v^p", "group": "part c", "name": "q", "templateType": "anything"}, "b": {"description": "", "definition": "c/2", "group": "Ungrouped variables", "name": "b", "templateType": "anything"}, "x1": {"description": "", "definition": "repeat(random(2..20),8)", "group": "Ungrouped variables", "name": "x1", "templateType": "anything"}, "b4": {"description": "", "definition": "random(2..4 except b1)", "group": "Ungrouped variables", "name": "b4", "templateType": "anything"}, "z1": {"description": "", "definition": "random(2..6 except y1)", "group": "Ungrouped variables", "name": "z1", "templateType": "anything"}}, "statement": "", "parts": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showCorrectAnswer": true, "prompt": "

Solve for $x$.

\n

$\\log_\\var{b1}(x-\\var{b2})-\\log_\\var{b1}\\left(\\displaystyle\\frac{1}{x}\\right)=\\var{b4}$

\n

$x=$ [[0]]

", "variableReplacements": [], "showFeedbackIcon": true, "marks": 0, "gaps": [{"scripts": {}, "vsetrangepoints": 5, "showCorrectAnswer": true, "checkingaccuracy": 0.001, "showFeedbackIcon": true, "marks": "2", "checkvariablenames": false, "type": "jme", "answer": "{b}", "showpreview": true, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "vsetrange": [0, 1], "variableReplacements": [], "expectedvariablenames": []}]}, {"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showCorrectAnswer": true, "steps": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "information", "showCorrectAnswer": true, "prompt": "

You may find the following conversion useful

\n

\\[\\ln(x)=\\log_e(x)\\]

", "variableReplacements": [], "showFeedbackIcon": true, "marks": 0}], "prompt": "

Solve for $x$ and leave your answer in the form  $x=\\displaystyle\\frac{e^{a}}{b}$.

\n

$\\var{p}\\ln(x)+\\ln(\\var{q})=\\var{m}$ 

\n

$x=$ [[0]]

", "variableReplacements": [], "showFeedbackIcon": true, "marks": 0, "gaps": [{"scripts": {}, "vsetrangepoints": 5, "showCorrectAnswer": true, "checkingaccuracy": 0.001, "showFeedbackIcon": true, "marks": "2", "checkvariablenames": false, "type": "jme", "answer": "e^({m}/{p})/{v}", "notallowed": {"partialCredit": 0, "showStrings": false, "message": "", "strings": ["*", ")^"]}, "showpreview": true, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "vsetrange": [0, 1], "variableReplacements": [], "expectedvariablenames": []}], "stepsPenalty": 0}], "tags": ["logarithm", "Logarithm", "logs", "Logs", "taxonomy"], "preamble": {"js": "", "css": ""}, "variable_groups": [{"name": "part c", "variables": ["p", "v", "q", "m"]}], "functions": {}, "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Using the Logarithm Equivalence $\\log_ba=c \\Longleftrightarrow a=b^c$", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}], "type": "question", "statement": "

Changing the subject of an equation involving logarithms often requires the use of the equivalence

\n

\\[\\log_ba=c \\Longleftrightarrow a=b^c\\text{.}\\]

", "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"h2": {"group": "part3", "description": "", "templateType": "anything", "name": "h2", "definition": "random(2..4)"}, "f3": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "f3", "definition": "random(3..8)"}, "h1": {"group": "part3", "description": "", "templateType": "anything", "name": "h1", "definition": "random(1..10 except h2)"}, "g2": {"group": "part 2", "description": "", "templateType": "anything", "name": "g2", "definition": "random(2..10except g1)"}, "f2": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "f2", "definition": "random(2..10 except f3 f)"}, "f5": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "f5", "definition": "random(2..6 except f1)"}, "f4": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "f4", "definition": "random(5..12 except f2 f)"}, "f1": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "f1", "definition": "random(2..5 except f)"}, "g1": {"group": "part 2", "description": "", "templateType": "anything", "name": "g1", "definition": "random(2..10)"}, "f": {"group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "f", "definition": "random(2..10)"}, "g3": {"group": "part 2", "description": "", "templateType": "anything", "name": "g3", "definition": "random(2..10except g1 g2)"}, "g4": {"group": "part 2", "description": "", "templateType": "anything", "name": "g4", "definition": "random(2..10except g1 g2 g3)"}}, "functions": {}, "tags": ["logarithm", "Logarithm", "Logarithm equivalence law", "logarithm laws", "Logs", "logs", "taxonomy"], "variable_groups": [{"name": "part 2", "variables": ["g3", "g2", "g4", "g1"]}, {"name": "part3", "variables": ["h1", "h2"]}], "parts": [{"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"checkingtype": "absdiff", "scripts": {}, "showpreview": true, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "expectedvariablenames": [], "marks": 1, "variableReplacements": [], "answer": "{f^f1}", "checkvariablenames": false, "type": "jme"}], "showCorrectAnswer": true, "prompt": "

Rearrange the equation to find $x$.

\n

$\\log_\\var{f}(x)=\\var{f1}$ 

\n

$x=$ [[0]]

", "type": "gapfill"}, {"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"checkingtype": "absdiff", "scripts": {}, "showpreview": true, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "expectedvariablenames": [], "marks": 1, "variableReplacements": [], "answer": "{g1}^(y+{g2})", "checkvariablenames": false, "type": "jme"}], "showCorrectAnswer": true, "prompt": "

Make $x$ the subject of the following equation.

\n

$\\log_\\var{g1}(x)=y+\\var{g2}$

\n

$x=$ [[0]]

", "type": "gapfill"}, {"scripts": {}, "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "gaps": [{"checkingtype": "absdiff", "scripts": {}, "showpreview": true, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showCorrectAnswer": true, "showFeedbackIcon": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "expectedvariablenames": [], "marks": 1, "variableReplacements": [], "answer": "(y+{h1})^(1/{h2})", "checkvariablenames": false, "type": "jme"}], "showCorrectAnswer": true, "prompt": "

Make $x$ the subject of the equation, leaving your answer in the form $a^{\\frac{1}{b}}$.

\n

$\\log_x(y+\\var{h1})=\\var{h2}$

\n

$x=$ [[0]]

", "type": "gapfill"}, {"maxAnswers": 0, "minMarks": 0, "distractors": ["", "", "", "", "", ""], "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "choices": ["

$\\log_a(a^x)$

", "

$a^{\\log_a(x)}$

", "

$e^{\\ln(x)}$

", "

$\\log_{10}(x)$

", "

$\\log_e(x)$

", "

$\\ln(e^x)$

"], "showFeedbackIcon": true, "prompt": "

Which of the following expressions are equivalent to $x$?

", "minAnswers": 0, "shuffleChoices": true, "matrix": ["1", "1", "1", "-5", "-5", "1"], "variableReplacements": [], "marks": 0, "displayColumns": 0, "scripts": {}, "warningType": "none", "showCorrectAnswer": true, "displayType": "checkbox", "type": "m_n_2"}], "ungrouped_variables": ["f", "f2", "f1", "f3", "f4", "f5"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Rearrange some expressions involving logarithms by applying the relation $\\log_b(a) = c \\iff a = b^c$.

"}, "preamble": {"css": "", "js": ""}, "advice": "

a)

\n

i)

\n

We can rearrange logarithms using indices. 

\n

\\[\\log_ba=c \\Longleftrightarrow a=b^c\\]

\n

Using this equivalence we can rewrite $\\log_\\var{f}x=\\var{f1}$.

\n

\\[\\begin{align}
x&= \\var{f}^\\var{f1} \\\\
&=\\var{f^f1}
\\end{align}\\]

\n

\n

b)

\n

i)

\n

We can use the equivalence to rewrite our equation.

\n

\\[\\log_ba=c \\Longleftrightarrow a=b^c\\]

\n

We can write out our values to makes it easier.

\n

\\[\\begin{align}
a&=x \\\\
b&=\\var{g1}\\\\
c&=y+\\var{g2}
\\end{align}\\]

\n

Then we can write out our equation in the required form.

\n

\\[x=\\var{g1}^{y+\\var{g2}}\\]

\n

\n

c)

\n

We can use the same equivalence as in part b)

\n

\\[\\log_ba=c \\Longleftrightarrow a=b^c\\]

\n

We have

\n

\\begin{align}
a&=y+\\var{h1} \\\\
b&=x\\\\
c&=\\var{h2}\\text{.} \\\\ \\\\
\\log_{x}(y+\\var{h1}) &= \\var{h2} \\\\
\\implies y+\\var{h1} &= x^{\\var{h2}} \\\\
x &= (y+\\var{h1})^{\\frac{1}{\\var{h2}}}
\\end{align}

\n

\n

d) 

\n

The two in this list that don't equal $x$ are $\\log_e(x)$ and $\\log_{10}(x)$.

\n

\\[\\begin{align}
\\log_e(x)&=\\ln(x)\\\\
\\log_{10}(x)&=\\log(x)\\text{.}
\\end{align}\\]

"}, {"name": "Using the Quadratic Formula to Solve Equations of the Form $ax^2 +bx+c=0$", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}], "metadata": {"description": "

Apply the quadratic formula to find the roots of a given equation. The quadratic formula is given in the steps if the student requires it.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "ungrouped_variables": ["a1", "a2", "a3", "a4", "b1", "b2", "b3", "b4", "x1", "p1", "p2", "x2", "a", "m"], "rulesets": {}, "advice": "

The quadratic formula is 

\n

\\[x={\\frac {-b\\pm\\sqrt{b^2-4\\times a\\times c}}{2a}}\\text{.}\\]

\n

a)

\n

From the equation, we can read off values for $a$, $b$ and $c$:

\n

\\[\\begin{align}
a&=1\\text{,}\\\\
b&=\\var{a+m}\\text{,}\\\\
c&=\\var{a*m} \\text{.}
\\end{align}\\]

\n

Substituting these values into the quadratic formula,

\n

\\[x = \\frac {-\\var{a+m}\\pm\\sqrt{\\var{a+m}^2-4\\times \\var{a*m}}}{2}\\text{.}\\]

\n

Note the $\\pm$ symbol in the formula. This means there are two solutions: one using $+$, the other using $-$.

\n

The two solutions are

\n

\\[\\begin{align}
x_1&=\\var{m}\\text{,}\\\\
x_2&=\\var{a}\\text{.}
\\end{align}\\]

\n

b)

\n

Note that the right-hand side of the given equation is not zero. We need to rewrite it in the form $ax^2+bx+c=0$:

\n

\\[\\begin{align}
\\simplify{{a1}x^2+{a2}x+{a3}}&=\\var{a4}\\\\
\\simplify{{a1}x^2+{a2}x+{a3-a4}}&=0\\text{.}
\\end{align}\\]

\n

Then we can read off values for $a$, $b$ and $c$:

\n

\\[\\begin{align}
a&=\\var{a1}\\\\
b&=\\var{a2}\\\\
c&=\\var{a3-a4} \\text{.}
\\end{align}\\]

\n

We can now substitute these values into the quadratic formula:

\n

\\[x = {\\frac {-\\var{a2}\\pm\\sqrt{\\var{a2}^2-4\\times \\var{a1}\\times \\var{a3-a4}}}{2\\times\\var{a1}}}\\text{.}\\]

\n

So the two solutions are

\n

\\[\\begin{align}
x_1&=\\var{dpformat(x1,2)}\\\\
x_2&=\\var{dpformat(x2,2)}\\text{.}
\\end{align}\\]

\n

c)

\n

We first rearrange our equation into the form $ax^2+bx+c=0$:

\n

\\[\\begin{align}
\\simplify{{b1}x^2+{b2}x+{b3}}&=0=\\var{b4}x\\\\
\\simplify{{b1}x^2+{b2-b4}x+{b3}}&=0\\text{.}
\\end{align}\\]

\n

We can then read off the values for $a, b$ and $c$, which are

\n

\\[\\begin{align}
a&=\\var{b1}\\text{,}\\\\
b&=\\var{b2-b4}\\text{,}\\\\
c&=\\var{b3}\\text{.}
\\end{align}\\]

\n

Substituting these values into the quadratic formula,

\n

\\[x = {\\frac {-\\var{b2-b4}\\pm\\sqrt{\\var{b2-b4}^2-4\\times \\var{b1}\\times \\var{b3}}}{2\\times\\var{b1}}},\\]

\n

we obtain solutions

\n

\\[\\begin{align}
x_1&=\\var{dpformat(p1,2)}\\text{,}\\\\
x_2&=\\var{dpformat(p2,2)}\\text{.}
\\end{align}\\]

", "variable_groups": [{"name": "part 2", "variables": ["b", "c"]}], "statement": "

When quadratic equations can't be factorised, or if equations are difficult to factorise (perhaps if the coefficients are large), we need to use the quadratic formula to solve the equations.

\n

Use the quadratic formula to calculate values for $x$ in these equations. Input the possible values as $x_1$ and $x_2$, where $x_1<x_2$.

", "parts": [{"scripts": {}, "variableReplacements": [], "type": "gapfill", "prompt": "

$\\simplify{x^2+{a+m}x+{a*m}=0}$

\n

$x_1=$ [[0]]

\n

$x_2=$ [[1]]

", "stepsPenalty": 0, "steps": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "information", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

An equation of the form

\n

\\[ax^2+bx+c=0\\text{,}\\]

\n

\n

can be solved using the quadratic formula

\n

\\[x={\\frac {-b\\pm\\sqrt{b^2-4\\times a\\times c}}{2a}}\\text{.}\\]

\n

"}], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "correctAnswerFraction": false, "precision": "2", "precisionPartialCredit": 0, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "precisionType": "dp", "minValue": "-a", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "-a", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "strictPrecision": false, "showPrecisionHint": true}, {"allowFractions": false, "correctAnswerFraction": false, "precision": "2", "precisionPartialCredit": 0, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "precisionType": "dp", "minValue": "-m", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "-m", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "strictPrecision": false, "showPrecisionHint": true}], "showFeedbackIcon": true, "marks": 0, "showCorrectAnswer": true}, {"scripts": {}, "variableReplacements": [], "type": "gapfill", "prompt": "

\n

$\\simplify{{a1}x^2+{a2}x+{a3}={a4}}$

\n

$x_1=$ [[0]]

\n

$x_2=$ [[1]]

\n

", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "correctAnswerFraction": false, "precision": "2", "precisionPartialCredit": 0, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "precisionType": "dp", "minValue": "x1", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "x1", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "strictPrecision": false, "showPrecisionHint": true}, {"allowFractions": false, "correctAnswerFraction": false, "precision": "2", "precisionPartialCredit": 0, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "precisionType": "dp", "minValue": "x2", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "x2", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "strictPrecision": false, "showPrecisionHint": true}], "showFeedbackIcon": true, "marks": 0}, {"scripts": {}, "variableReplacements": [], "type": "gapfill", "prompt": "

$\\simplify{{b1}x^2+{b2}x+{b3}={b4}x}$

\n

$x_1=$ [[0]]

\n

$x_2=$ [[1]]

", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "correctAnswerFraction": false, "precision": "2", "precisionPartialCredit": 0, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "precisionType": "dp", "minValue": "p1", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "p1", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "strictPrecision": false, "showPrecisionHint": true}, {"allowFractions": false, "correctAnswerFraction": false, "precision": "2", "precisionPartialCredit": 0, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "precisionType": "dp", "minValue": "p2", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "p2", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "strictPrecision": false, "showPrecisionHint": true}], "showFeedbackIcon": true, "marks": 0}], "tags": ["Quadratic formula", "quadratic formula", "solve quadratic equations", "taxonomy", "Using the quadratic formula", "using the quadratic formula"], "preamble": {"css": "", "js": ""}, "functions": {}, "variables": {"a3": {"description": "", "definition": "random(-30..4 except 0)", "group": "Ungrouped variables", "name": "a3", "templateType": "anything"}, "a": {"description": "", "definition": "random(15..20)", "group": "Ungrouped variables", "name": "a", "templateType": "anything"}, "a1": {"description": "", "definition": "random(2..9)", "group": "Ungrouped variables", "name": "a1", "templateType": "anything"}, "m": {"description": "", "definition": "random(9..a-1)", "group": "Ungrouped variables", "name": "m", "templateType": "anything"}, "b1": {"description": "", "definition": "random(2..10 except a1)", "group": "Ungrouped variables", "name": "b1", "templateType": "anything"}, "c": {"description": "", "definition": "random(-10..4 except 0)^2", "group": "part 2", "name": "c", "templateType": "anything"}, "b4": {"description": "", "definition": "random(-5..5)", "group": "Ungrouped variables", "name": "b4", "templateType": "anything"}, "p2": {"description": "", "definition": "(-(b2-b4)+((b2-b4)^2-4*b1*b3)^(1/2))/(2*b1)", "group": "Ungrouped variables", "name": "p2", "templateType": "anything"}, "b3": {"description": "", "definition": "random(-30..6 except a3)", "group": "Ungrouped variables", "name": "b3", "templateType": "anything"}, "a4": {"description": "", "definition": "random(1..15)", "group": "Ungrouped variables", "name": "a4", "templateType": "anything"}, "x1": {"description": "", "definition": "(-(a2)-((a2)^2-4*a1*(a3-a4))^(1/2))/(2*a1)", "group": "Ungrouped variables", "name": "x1", "templateType": "anything"}, "p1": {"description": "", "definition": "(-(b2-b4)-((b2-b4)^2-4*b1*b3)^(1/2))/(2*b1)", "group": "Ungrouped variables", "name": "p1", "templateType": "anything"}, "b": {"description": "", "definition": "2c^0.5+a1^2", "group": "part 2", "name": "b", "templateType": "anything"}, "b2": {"description": "", "definition": "random(20..35 except a2)", "group": "Ungrouped variables", "name": "b2", "templateType": "anything"}, "a2": {"description": "", "definition": "random(9..30 except a1)", "group": "Ungrouped variables", "name": "a2", "templateType": "anything"}, "x2": {"description": "", "definition": "(-(a2)+((a2)^2-4*a1*(a3-a4))^(1/2))/(2*a1)", "group": "Ungrouped variables", "name": "x2", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}}]}], "timing": {"allowPause": true, "timeout": {"message": "", "action": "none"}, "timedwarning": {"message": "", "action": "none"}}, "percentPass": 0, "type": "exam", "contributors": [{"name": "J. Richard Snape", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1700/"}], "extensions": ["geogebra", "stats"], "custom_part_types": [], "resources": []}