// Numbas version: finer_feedback_settings {"name": "Luis's copy of 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": [{"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"], "functions": {}, "question_groups": [{"name": "", "pickQuestions": 0, "pickingStrategy": "all-ordered", "questions": []}], "variables": {"d": {"group": "Ungrouped variables", "definition": "random(-9..9)", "templateType": "anything", "description": "", "name": "d"}, "c": {"group": "Ungrouped variables", "definition": "a+Random(1..4)*s1", "templateType": "anything", "description": "", "name": "c"}, "b": {"group": "Ungrouped variables", "definition": "if(b1=d,b1+random(1..3),b1)", "templateType": "anything", "description": "", "name": "b"}, "a": {"group": "Ungrouped variables", "definition": "random(1,-1)*random(1..4)", "templateType": "anything", "description": "", "name": "a"}, "b1": {"group": "Ungrouped variables", "definition": "random(-9..9)", "templateType": "anything", "description": "", "name": "b1"}, "g": {"group": "Ungrouped variables", "definition": "(b*c-a*d)/(c-a)", "templateType": "anything", "description": "", "name": "g"}, "f": {"group": "Ungrouped variables", "definition": "(b-d)/(a-c)", "templateType": "anything", "description": "", "name": "f"}, "s1": {"group": "Ungrouped variables", "definition": "random(-1,1)", "templateType": "anything", "description": "", "name": "s1"}}, "name": "Luis's copy of Equation of a straight line", "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "s1", "b1"], "variable_groups": [], "type": "question", "preamble": {"css": "", "js": ""}, "variablesTest": {"maxRuns": 100, "condition": ""}, "metadata": {"description": "

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

", "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"}, "showQuestionGroupNames": false, "parts": [{"stepsPenalty": 1, "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}$.

", "scripts": {}, "showCorrectAnswer": true, "marks": 0}], "gaps": [{"checkvariablenames": false, "type": "jme", "showCorrectAnswer": true, "expectedvariablenames": [], "notallowed": {"strings": ["."], "message": "

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

", "partialCredit": 0, "showStrings": false}, "marks": 2, "checkingaccuracy": 0.001, "vsetrangepoints": 5, "showpreview": true, "vsetrange": [0, 1], "scripts": {}, "answersimplification": "std", "answer": "({b-d}/{a-c})x+{b*c-a*d}/{c-a}", "checkingtype": "absdiff"}], "scripts": {}, "type": "gapfill", "showCorrectAnswer": true, "marks": 0}], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "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/"}, {"name": "Luis Hernandez", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2870/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Luis Hernandez", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2870/"}]}