// Numbas version: finer_feedback_settings {"name": "Equation of a line parallel to a given 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)", "name": "s1", "description": ""}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(d1..11)", "name": "b", "description": ""}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a+Random(1..4)*s1", "name": "c", "description": ""}, "n1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "gcd(b-d,c-a)", "name": "n1", "description": ""}, "d1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "d+1", "name": "d1", "description": ""}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)*random(1..4)", "name": "a", "description": ""}, "n2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(b*c=a*d,1,gcd(n1,b*c-a*d))", "name": "n2", "description": ""}, "k1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(b*c-a*d-b*h+d*h)/(c-a)", "name": "k1", "description": ""}, "h": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9)", "name": "h", "description": ""}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9)", "name": "d", "description": ""}, "g": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(b*c-a*d)/(c-a)", "name": "g", "description": ""}, "k": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except k1)", "name": "k", "description": ""}, "f": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(b-d)/(a-c)", "name": "f", "description": ""}}, "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "h", "s1", "k1", "n1", "n2", "k", "d1"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "name": "Equation of a line parallel to a given line, ", "showQuestionGroupNames": false, "functions": {}, "parts": [{"stepsPenalty": 1, "scripts": {}, "gaps": [{"answer": "({b-d}/{a-c})x+{b*h-d*h+c*k-a*k}/{c-a}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "answersimplification": "std", "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "

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

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

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

", "steps": [{"type": "information", "showCorrectAnswer": true, "prompt": "\n

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

\n

The gradient $m$ will be the same as the gradient of the line $\\displaystyle \\simplify{{(b-d)/n2}x+{(c-a)/n2}y={(b*c-a*d)/n2}}$, so start by calculating the gradient of the second line. Having calculated $m$, calculate the constant term $c$ by noting that $y=\\var{k}$ when $x=\\var{h}$.

\n ", "marks": 0, "scripts": {}}], "showCorrectAnswer": true, "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "\n

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

If you input $m$ as a fraction, put brackets ( ) around the fraction. For example, if your answer for $m$ is $\\dfrac{-2}{3}$ and your answer for $c$ is $\\dfrac{7}{5}$, you should write $(-2/3)x+7/5$.

\n

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

\n \n ", "tags": ["MAS1602", "SFY0001", "checked2015", "equation of a straight line", "gradient of a line", "parallel line"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t\n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Find the equation of the straight line parallel to the given line that passes through the given point $(a,b)$.

"}, "advice": "\n

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

\n

The gradient $m$ will be the same as the gradient of the line $\\displaystyle \\simplify{{(b-d)/n2}x+{(c-a)/n2}y={(b*c-a*d)/n2}}$, which is $\\displaystyle m= \\simplify{{b-d}/{a-c}}$. We can calculate the constant term $c$ by noting that $y=\\var{k}$ when $x=\\var{h}$.

\n

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

\n

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

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