// Numbas version: finer_feedback_settings {"name": "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": [{"name": "Straight lines: one point gradient", "tags": ["graph", "linear", "linear equation", "Straight Line", "straight line", "y=mx+b"], "metadata": {"description": "

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

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "extensions": ["jsxgraph"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-12..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "brise": {"name": "brise", "group": "Ungrouped variables", "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),'er'))))", "description": "", "templateType": "anything", "can_override": false}, "bb": {"name": "bb", "group": "Ungrouped variables", "definition": "random(-5..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "rise": {"name": "rise", "group": "Ungrouped variables", "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),'er'))))", "description": "", "templateType": "anything", "can_override": false}, "brun": {"name": "brun", "group": "Ungrouped variables", "definition": "random(2,3,5,7)", "description": "", "templateType": "anything", "can_override": false}, "scale": {"name": "scale", "group": "Ungrouped variables", "definition": "random(-1,1,2,-2)", "description": "", "templateType": "anything", "can_override": false}, "bpoint_y": {"name": "bpoint_y", "group": "Ungrouped variables", "definition": "bb+brise*bscale", "description": "", "templateType": "anything", "can_override": false}, "point_y": {"name": "point_y", "group": "Ungrouped variables", "definition": "b+rise*scale", "description": "", "templateType": "anything", "can_override": false}, "run": {"name": "run", "group": "Ungrouped variables", "definition": "random(2,3,5,7)", "description": "", "templateType": "anything", "can_override": false}, "bscale": {"name": "bscale", "group": "Ungrouped variables", "definition": "random(-2..2 except [0,scale])", "description": "", "templateType": "anything", "can_override": false}, "point_x": {"name": "point_x", "group": "Ungrouped variables", "definition": "run*scale", "description": "", "templateType": "anything", "can_override": false}, "bpoint_x": {"name": "bpoint_x", "group": "Ungrouped variables", "definition": "brun*bscale", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["b", "run", "rise", "point_y", "point_x", "scale", "bb", "brun", "brise", "bscale", "bpoint_y", "bpoint_x"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

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

", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "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

In particular, to find the equation of the line through $(\\var{point_x},\\var{point_y})$ with a gradient of $\\simplify{{rise}/{run}}$ we can do one of the following:

\n
    \n
  1. Substitute $\\simplify{{rise}/{run}}$ and $(x_1,y_1)=(\\var{point_x},\\var{point_y})$ into the equation $y-y_1=m(x-x_1)$. This gives $\\simplify{y-{point_y}={rise}/{run}(x-{point_x})}$. Expanding the brackets we have $\\simplify[fractionnumbers]{y-{point_y}={rise}/{run}x-{rise*point_x/run}}$. Making $y$ the subject gives $y=\\simplify[fractionnumbers]{{rise/run}*x+{b}}$. Or, 

  2. \n
  3. Take the point $(\\var{point_x},\\var{point_y})$ as $(x,y)$ and substitute this and the gradient $m=\\simplify{{rise}/{run}}$ into the equation $y=mx+b$. This gives $\\simplify[!collectnumbers]{{point_y}={rise}/{run}*{point_x}+b}$. Solving for $b$ gives $b=\\var{b}$. Now we know both $m$ and $b$ and we can write the equation of the line $y=mx+b$ as $y=\\simplify[fractionnumbers]{{rise/run}*x+{b}}$.
  4. \n
"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{rise}/{run}*x+{b}", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": ["="], "showStrings": false, "partialCredit": 0, "message": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

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

", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "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

In particular, to find the equation of the line through $(\\var{bpoint_x},\\var{bpoint_y})$ with a gradient of $\\simplify{{brise}/{brun}}$ we can do one of the following:

\n
    \n
  1. Substitute $\\simplify{{brise}/{brun}}$ and $(x_1,y_1)=(\\var{bpoint_x},\\var{bpoint_y})$ into the equation $y-y_1=m(x-x_1)$. This gives $\\simplify{y-{bpoint_y}={brise}/{brun}(x-{bpoint_x})}$. Expanding the brackets we have $\\simplify[fractionnumbers]{y-{bpoint_y}={brise}/{brun}x-{brise*bpoint_x/brun}}$. Making $y$ the subject gives $y=\\simplify[fractionnumbers]{{brise/brun}*x+{bb}}$. Or, 

  2. \n
  3. Take the point $(\\var{bpoint_x},\\var{bpoint_y})$ as $(x,y)$ and substitute this and the gradient $m=\\simplify{{brise}/{brun}}$ into the equation $y=mx+b$. This gives $\\simplify[!collectnumbers]{{bpoint_y}={brise}/{brun}*{bpoint_x}+b}$. Solving for $b$ gives $b=\\var{bb}$. Now we know both $m$ and $b$ and we can write the equation of the line $y=mx+b$ as $y=\\simplify[fractionnumbers]{{brise/brun}*x+{bb}}$.
  4. \n
"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{brise}/{brun}*x+{bb}", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": ["="], "showStrings": false, "partialCredit": 0, "message": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "resources": []}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}