// Numbas version: exam_results_page_options {"name": "Equation of a straight line", "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"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(b1=d,b1+random(1..3),b1)", "description": "", "name": "b"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a+Random(1..4)*s1", "description": "", "name": "c"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(b-d)/(a-c)", "description": "", "name": "f"}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9)", "description": "", "name": "b1"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9)", "description": "", "name": "d"}, "g": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(b*c-a*d)/(c-a)", "description": "", "name": "g"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)*random(1..4)", "description": "", "name": "a"}}, "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "s1", "b1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Equation of a straight line", "functions": {}, "showQuestionGroupNames": false, "parts": [{"stepsPenalty": 1, "scripts": {}, "gaps": [{"answer": "({b-d}/{a-c})x+{b*c-a*d}/{c-a}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "showCorrectAnswer": true, "expectedvariablenames": [], "notallowed": {"message": "

Input all numbers as fractions or integers as appropriate and not as decimals.

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "std", "marks": 2, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

$y=\\;\\phantom{{}}$[[0]]

", "steps": [{"type": "information", "prompt": "

The equation of the line is of the form $y=mx+c$.

\n

You are given the gradient $m$ and you can calculate the constant term $c$ by noting that $y=\\var{b}$ when $x=\\var{a}$.

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

Find the equation of the straight line which:

\n \n

 

\n \n

 

\n

Input your answer in the form $mx+c$ for suitable values of $m$ and $c$.

\n

Input $m$ and $c$ as fractions or integers as appropriate and not as decimals.

\n

Click on Show steps if you need help, you will lose 1 mark if you do so.

", "tags": ["checked2015", "diagram", "equation of a straight line", "gradient of a line", "mas1601", "MAS1601", "Steps", "steps"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

5/08/2012:

\n

Added tags.

\n

Added description.

\n

Checked calculation.OK.

\n

Improved display in content areas. Corrected some minor typos.

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

Find the equation of a straight line which has a given gradient $m$ and passes through the given point $(a,b)$.

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

The equation of the line is of the form $y=mx+c$.

\n

You are given the gradient $\\displaystyle m= \\simplify{{b-d}/{a-c}}$ and we can calculate the constant term $c$ by noting that $y=\\var{b}$ when $x=\\var{a}$.

\n

Using this we get:
\\[ \\begin{eqnarray} \\var{b}&=&\\simplify[std]{({b-d}/{a-c}){a}+c} \\Rightarrow\\\\ c&=&\\simplify[std]{{b}-({b-d}/{a-c}){a}={(b*c-a*d)}/{(c-a)}} \\end{eqnarray} \\]

\n

Hence the equation of the line is
\\[y = \\simplify[std]{({b-d}/{a-c})x+{b*c-a*d}/{c-a}}\\]

", "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/"}]}