// Numbas version: exam_results_page_options {"name": "Katherine's copy of Straight lines: one point gradient", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"point_x": {"templateType": "anything", "name": "point_x", "definition": "run*scale", "description": "", "group": "Ungrouped variables"}, "bscale": {"templateType": "anything", "name": "bscale", "definition": "random(-2..2 except [0,scale])", "description": "", "group": "Ungrouped variables"}, "scale": {"templateType": "anything", "name": "scale", "definition": "random(-1,1,2,-2)", "description": "", "group": "Ungrouped variables"}, "bpoint_y": {"templateType": "anything", "name": "bpoint_y", "definition": "bb+brise*bscale", "description": "", "group": "Ungrouped variables"}, "brise": {"templateType": "anything", "name": "brise", "definition": "-if(brun=2,random(1,3,5,7),if(brun=3,random(1,2,4,5,7),if(brun=5,random(1,2,3,4,6,7),if(brun=7,random(1,2,3,4,5,6)))))", "description": "", "group": "Ungrouped variables"}, "rise": {"templateType": "anything", "name": "rise", "definition": "if(run=2,random(1,3,5,7),if(run=3,random(1,2,4,5,7),if(run=5,random(1,2,3,4,6,7),if(run=7,random(1,2,3,4,5,6)))))", "description": "", "group": "Ungrouped variables"}, "brun": {"templateType": "anything", "name": "brun", "definition": "random(2,3,5,7)", "description": "", "group": "Ungrouped variables"}, "run": {"templateType": "anything", "name": "run", "definition": "random(2,3,5,7)", "description": "", "group": "Ungrouped variables"}, "bpoint_x": {"templateType": "anything", "name": "bpoint_x", "definition": "brun*bscale", "description": "", "group": "Ungrouped variables"}, "point_y": {"templateType": "anything", "name": "point_y", "definition": "b+rise*scale", "description": "", "group": "Ungrouped variables"}, "bb": {"templateType": "anything", "name": "bb", "definition": "random(-5..12 except 0)", "description": "", "group": "Ungrouped variables"}, "b": {"templateType": "anything", "name": "b", "definition": "random(-12..5 except 0)", "description": "", "group": "Ungrouped variables"}}, "ungrouped_variables": ["b", "run", "rise", "point_y", "point_x", "scale", "bb", "brun", "brise", "bscale", "bpoint_y", "bpoint_x"], "advice": "", "tags": [], "extensions": ["jsxgraph"], "statement": "", "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"steps": [{"showFeedbackIcon": true, "type": "information", "showCorrectAnswer": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 0, "scripts": {}, "prompt": "

There are two common ways to approach these questions:

\n
    \n
  1. Use the one point gradient formula $y-y_1=m(x-x_1)$. Or,

  2. \n
  3. Substitute the $x$ and $y$ values of the point and the value for $m$ into the gradient intercept form of a line $y=mx+b$ to determine $b$. Now you have $m$ and $b$ so you can write the equation of the line in the form $y=mx+b$.
  4. \n
\n

\n
\n

\n

For example, suppose we had to find the equation of the line through $(2,3)$ with a gradient of $\\frac{1}{4}$. The following are examples of using the above approaches:

\n
    \n
  1. Substitute $m=\\frac{1}{4}$ and $(x_1,y_1)=(2,3)$ into the equation $y-y_1=m(x-x_1)$. This gives $y-3=\\frac{1}{4}(x-2)$. Expanding the brackets we have $y-3=\\frac{x}{4}-\\frac{1}{2}$. Making $y$ the subject gives $y=\\frac{x}{4}+\\frac{5}{2}$.

  2. \n
  3. Take the point $(2,3)$ as $(x,y)$ and substitute this and the gradient into the equation $y=mx+b$. This gives $3=\\frac{1}{4}(2)+b$. Solving for $b$ gives $b=\\frac{5}{2}$. Therefore the equation of the line is $y=\\frac{x}{4}+\\frac{5}{2}$.
  4. \n
\n

\n
\n

\n

Recall $\\frac{x}{4}$ is the same as $\\frac{1}{4}x$.

"}], "gaps": [{"answersimplification": "all", "showFeedbackIcon": true, "type": "jme", "vsetrangepoints": 5, "answer": "{rise}/{run}*x+{b}", "notallowed": {"strings": ["="], "partialCredit": 0, "message": "", "showStrings": false}, "marks": "2", "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": true, "checkingaccuracy": 0.001, "showpreview": true, "showCorrectAnswer": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "vsetrange": [0, 1], "expectedvariablenames": ["x"]}], "showFeedbackIcon": true, "type": "gapfill", "showCorrectAnswer": true, "stepsPenalty": "1", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 0, "scripts": {}, "prompt": "

The equation (in the form y=mx+c) of the line that passes through the point ({point_x},{point_y}) with a gradient of $\\simplify{{rise}/{run}}$ is $y=$ [[0]].

"}, {"steps": [{"showFeedbackIcon": true, "type": "information", "showCorrectAnswer": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 0, "scripts": {}, "prompt": "

There are two common ways to approach these questions:

\n
    \n
  1. Use the one point gradient formula $y-y_1=m(x-x_1)$. Or,

  2. \n
  3. Substitute the $x$ and $y$ values of the point and the value for $m$ into the gradient intercept form of a line $y=mx+b$ to determine $b$. Now you have $m$ and $b$ so you can write the equation of the line in the form $y=mx+b$.
  4. \n
\n

\n
\n

\n

For example, suppose we had to find the equation of the line through $(2,3)$ with a gradient of $-\\frac{1}{4}$. The following are examples of using the above approaches:

\n
    \n
  1. Substitute $m=-\\frac{1}{4}$ and $(x_1,y_1)=(2,3)$ into the equation $y-y_1=m(x-x_1)$. This gives $y-3=-\\frac{1}{4}(x-2)$. Expanding the brackets we have $y-3=-\\frac{x}{4}+\\frac{1}{2}$. Making $y$ the subject gives $y=-\\frac{x}{4}+\\frac{7}{2}$.

  2. \n
  3. Take the point $(2,3)$ as $(x,y)$ and substitute this and the gradient into the equation $y=mx+b$. This gives $3=-\\frac{1}{4}(2)+b$. Solving for $b$ gives $b=\\frac{7}{2}$. Therefore the equation of the line is $y=-\\frac{x}{4}+\\frac{7}{2}$.
  4. \n
\n

\n
\n

\n

Recall $-\\frac{x}{4}$ is the same as $-\\frac{1}{4}x$.

"}], "gaps": [{"answersimplification": "all", "showFeedbackIcon": true, "type": "jme", "vsetrangepoints": 5, "answer": "{brise}/{brun}*x+{bb}", "notallowed": {"strings": ["="], "partialCredit": 0, "message": "", "showStrings": false}, "marks": "2", "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": true, "checkingaccuracy": 0.001, "showpreview": true, "showCorrectAnswer": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "vsetrange": [0, 1], "expectedvariablenames": ["x"]}], "showFeedbackIcon": true, "type": "gapfill", "showCorrectAnswer": true, "stepsPenalty": "1", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 0, "scripts": {}, "prompt": "

The equation (in the form y=mx+c) of the line that passes through the point ({bpoint_x},{bpoint_y}) with a gradient of $\\simplify{{brise}/{brun}}$ is $y=$ [[0]].

"}], "metadata": {"description": "

Given one point and the gradient determine the equation of the line.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "rulesets": {}, "preamble": {"css": "", "js": ""}, "name": "Katherine's copy of Straight lines: one point gradient", "variable_groups": [], "functions": {}, "type": "question", "contributors": [{"name": "Katherine Tomlinson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1652/"}]}]}], "contributors": [{"name": "Katherine Tomlinson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1652/"}]}