// Numbas version: finer_feedback_settings {"name": "Luis's copy of 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": [{"name": "Luis's copy of Equation of a line parallel to a given line,", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variablesTest": {"condition": "", "maxRuns": 100}, "tags": ["MAS1602", "SFY0001", "checked2015", "equation of a straight line", "gradient of a line", "parallel line"], "preamble": {"js": "", "css": ""}, "type": "question", "variables": {"d": {"name": "d", "templateType": "anything", "description": "", "definition": "random(-9..9)", "group": "Ungrouped variables"}, "s1": {"name": "s1", "templateType": "anything", "description": "", "definition": "random(-1,1)", "group": "Ungrouped variables"}, "b": {"name": "b", "templateType": "anything", "description": "", "definition": "random(d1..11)", "group": "Ungrouped variables"}, "d1": {"name": "d1", "templateType": "anything", "description": "", "definition": "d+1", "group": "Ungrouped variables"}, "f": {"name": "f", "templateType": "anything", "description": "", "definition": "(b-d)/(a-c)", "group": "Ungrouped variables"}, "h": {"name": "h", "templateType": "anything", "description": "", "definition": "random(-9..9)", "group": "Ungrouped variables"}, "k1": {"name": "k1", "templateType": "anything", "description": "", "definition": "(b*c-a*d-b*h+d*h)/(c-a)", "group": "Ungrouped variables"}, "k": {"name": "k", "templateType": "anything", "description": "", "definition": "random(-9..9 except k1)", "group": "Ungrouped variables"}, "c": {"name": "c", "templateType": "anything", "description": "", "definition": "a+Random(1..4)*s1", "group": "Ungrouped variables"}, "g": {"name": "g", "templateType": "anything", "description": "", "definition": "(b*c-a*d)/(c-a)", "group": "Ungrouped variables"}, "n1": {"name": "n1", "templateType": "anything", "description": "", "definition": "gcd(b-d,c-a)", "group": "Ungrouped variables"}, "a": {"name": "a", "templateType": "anything", "description": "", "definition": "random(1,-1)*random(1..4)", "group": "Ungrouped variables"}, "n2": {"name": "n2", "templateType": "anything", "description": "", "definition": "if(b*c=a*d,1,gcd(n1,b*c-a*d))", "group": "Ungrouped variables"}}, "variable_groups": [], "metadata": {"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)$.

", "notes": "\n \t\t\n \t\t"}, "question_groups": [{"name": "", "pickQuestions": 0, "pickingStrategy": "all-ordered", "questions": []}], "showQuestionGroupNames": false, "parts": [{"prompt": "

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

", "gaps": [{"checkvariablenames": false, "showpreview": true, "vsetrangepoints": 5, "answersimplification": "std", "type": "jme", "expectedvariablenames": [], "scripts": {}, "marks": 2, "checkingaccuracy": 0.001, "checkingtype": "absdiff", "answer": "({b-d}/{a-c})x+{b*h-d*h+c*k-a*k}/{c-a}", "showCorrectAnswer": true, "vsetrange": [0, 1], "notallowed": {"message": "

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

", "strings": ["."], "showStrings": false, "partialCredit": 0}}], "steps": [{"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 ", "scripts": {}, "marks": 0, "type": "information"}], "showCorrectAnswer": true, "type": "gapfill", "scripts": {}, "stepsPenalty": 1, "marks": 0}], "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 ", "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 ", "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "h", "s1", "k1", "n1", "n2", "k", "d1"], "functions": {}, "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/"}]}