// 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\tThe equation of the line is of the form $y=mx+c$.
\n\t\t\t\t\tYou 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\tThe 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\tFind the equation of the straight line which:
\n\t\n\t
\n\t
Input your answer in the form $mx+c$ for suitable values of $m$ and $c$.
\n\tInput $m$ and $c$ as fractions or integers as appropriate and not as decimals.
\n\tClick on \"Show steps\" if you need help, you will lose 1 mark if you do so.
\n\tNote 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\t5/08/2012:
\n\t\t \t\t \t\t \t\t \t\t \t\tAdded tags.
\n\t\t \t\t \t\t \t\t \t\t \t\tAdded description.
\n\t\t \t\t \t\t \t\t \t\t \t\tChecked calculation.OK.
\n\t\t \t\t \t\t \t\t \t\t \t\tImproved 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\tFind 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\tThere 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\tThe equation of the line is of the form $y=mx+c$.
\n\tYou 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\tUsing 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} \\]
Hence the equation of the line is
\\[y = \\simplify[std]{({b-d}/{a-c})x+{b*c-a*d}/{c-a}}\\]