// Numbas version: exam_results_page_options {"name": "Expand brackets and solve an equation", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"s1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s1"}, "td": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..20)", "description": "", "name": "td"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s2*random(1..12)", "description": "", "name": "b"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(a*g=tc*f,tc+1,tc)", "description": "", "name": "c"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "name": "f"}, "s3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s3"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(b=td,td+1,td)", "description": "", "name": "d"}, "g": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(f=1,random(2..5),f=2, random(3..5),f=3, random(2,4,5),f=4,random(3,5),random(2,3,4))", "description": "", "name": "g"}, "tc": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s3*random(2..20)", "description": "", "name": "tc"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-12..12)", "description": "", "name": "a"}, "s2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s2"}}, "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "s3", "s2", "s1", "td", "tc"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Expand brackets and solve an equation", "functions": {}, "showQuestionGroupNames": false, "parts": [{"stepsPenalty": 0, "scripts": {}, "gaps": [{"answer": "{f*d-b*g}/{g*a-f*c}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "showCorrectAnswer": true, "expectedvariablenames": [], "notallowed": {"message": "

Input your answer as a fraction or an integer. Do not input the answer as a decimal. 

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "all", "marks": 3, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "\n\t\t\t

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

\n\t\t\t

$x =$ [[0]]

\n\t\t\t

Click on \"Show steps\" to see a video of a solution of a similar problem.

\n\t\t\t", "steps": [{"type": "information", "prompt": "\n\t\t\t\t\t

A video example worked through. The method in the video is slightly different from the method in the solution.

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

 

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

\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t", "showCorrectAnswer": true, "scripts": {}, "marks": 0}], "showCorrectAnswer": true, "marks": 0}], "statement": "\n\t

Solve the following linear equation for $x$.

\n\t

Input your answer as a fraction or an integer. Do NOT input the answer as a decimal.

\n\t

 

\n\t", "tags": ["ACC1012", "checked2015", "equations", "linear equation", "solving a linear equation in one variable", "solving equations", "Solving equations", "solving linear equations", "video"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n\t\t \t\t \t\t \t\t \t\t \t\t \t\t

5/08/2012:

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

Added more tags.

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

Added description.

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

Checked calculation. OK.

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

Solve $\\displaystyle ax + b =\\frac{f}{g}( cx + d)$ for $x$.

\n

A video is included in Show steps which goes through a similar example.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

Given the equation \\[\\simplify[std]{{a} * x + {b} = {f}/{g}({c} * x + {d})}\\] we first multiply both sides by $\\var{g}$ to get

\n

\\[\\simplify[std]{{g}*({a} * x + {b} )= {f}*({c} * x + {d})}.\\]

\n

Then expand both sides of this equation to get:

\n

\\[\\simplify[std]{{g*a} x + {g*b} = {f*c}x + {f*d}}.\\]

\n

and then collect together all the constant terms on the right hand-side, and collect together all the terms in $x$ on the left-hand side of the equation.

\n

The equation can then be written as:
\\[\\simplify[std]{({g*a}-{f*c})x=({f*d}+{-g*b})}\\] i.e.
\\[\\simplify{{g*a-f*c}x={f*d-b*g}}\\]
which gives \\[x =\\simplify[std]{{(f*d-b*g)}/{(g*a-f*c)}}\\] as the solution.

\n

Check the answer

\n

You can check that this is the correct solution by inputting this solution back into the equation to see if it satisfies the equation. 

\n

 

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