// Numbas version: exam_results_page_options {"name": "Rational functions: Quadratic over linear", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

Identifying some of the basic properties (intercepts, asymptotes, quadrants) of a rational function (quadratic over linear)

"}, "statement": "

You are given the equation  \$\\simplify[all]{y=({b}x^2-{a*b+c}x+{a*c+d})/(x-{a})}.\$

", "parts": [{"showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

The graph of this equation has a vertical asymptote at $x=$ [[0]].

", "scripts": {}, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "marks": 0, "gaps": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "variableReplacements": [], "correctAnswerFraction": false, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "maxValue": "{a}", "showFeedbackIcon": true, "type": "numberentry", "marks": 1, "minValue": "{a}", "mustBeReduced": false}], "variableReplacements": []}, {"showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

The graph of this equation has an oblique asymptote at $y=$ [[0]].

", "scripts": {}, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "marks": 0, "gaps": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "checkvariablenames": false, "checkingaccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "showpreview": true, "type": "jme", "answer": "{b}x-{c}", "vsetrange": [0, 1], "vsetrangepoints": 5, "marks": 1, "checkingtype": "absdiff"}], "variableReplacements": []}, {"scripts": {}, "variableReplacementStrategy": "originalfirst", "minAnswers": 0, "distractors": ["", "", "", ""], "maxMarks": 0, "showCorrectAnswer": true, "variableReplacements": [], "shuffleChoices": false, "maxAnswers": 0, "matrix": ["if(d<0, 1, 0)", "if(d>0, 1, 0)", "if(d>0, 1, 0)", "if(d<0, 1, 0)"], "showFeedbackIcon": true, "type": "m_n_2", "prompt": "

The two asymptotes break the plane up into four parts: top right, top left, bottom left and bottom right.

\n

\n

The graph is in which of these parts of the plane?

", "choices": ["

top left

", "

top right

", "

bottom left

", "

bottom right

"], "displayType": "checkbox", "marks": 0, "minMarks": 0, "warningType": "none", "displayColumns": "2"}, {"showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

The $y$-intercept is at $y=$[[0]].

", "scripts": {}, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "marks": 0, "gaps": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "allowFractions": true, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "variableReplacements": [], "correctAnswerFraction": true, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "maxValue": "{-c-d/a}", "showFeedbackIcon": true, "type": "numberentry", "marks": 1, "minValue": "{-c-d/a}", "mustBeReduced": false}], "variableReplacements": []}, {"showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

How many $x$-intercepts are there? [[0]]

\n

\n
\n

The $x$-intercept is $x=$ [[1]].

\n
\n
\n

The $x$-intercepts are $x=$ [[2]] and $x=$ [[3]] (in ascending order)

\n

Note: You could input $\\frac{1-\\sqrt{133}}{2}$ by typing (1-sqrt(133))/2

\n
", "scripts": {"constructor": {"order": "after", "script": "// override the default 'submit' method for the part\n// we only want to submit gap 1 if the answer to gap 0 is \"one\", and submit gaps 2 and 3 if the answer to gap 0 is \"two\"\nthis.submit = Numbas.util.extend(function() {\n this.gaps[0].submit();\n this.gaps[1].submit();\n this.gaps[2].submit();\n this.gaps[3].submit();\n if(this.gaps[0].one) {\n this.gaps[1].submit();\n } else {\n this.gaps[1].answered = true;\n }\n if(this.gaps[0].two) {\n this.gaps[2].submit();\n this.gaps[3].submit();\n } else {\n this.gaps[2].answered = true;\n this.gaps[3].answered = true;\n }\n},Part.prototype.submit);"}, "mark": {"order": "instead", "script": "var gaps = this.gaps;\n// if the student said \"yes\" to gap 2, then mark their factorisation\nif(gaps[0].zero) {\n this.setCredit(gaps[0].credit*credit*gaps[0].marks);\n// otherwise, work out the credit based on the amounts awarded for the first three gaps\n} else {\n if(gaps[0].one){\n this.setCredit((gaps[0].credit*gaps[0].marks+gaps[1].credit*credit*gaps[1].marks)/(gaps[0].marks+gaps[1].marks))\n } else {\n this.setCredit((gaps[0].credit*gaps[0].marks+gaps[2].credit*gaps[2].marks+gaps[3].credit*gaps[3].marks)/(gaps[0].marks+gaps[2].marks+gaps[3].marks));\n }}"}}, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "marks": 0, "gaps": [{"scripts": {"mark": {"order": "instead", "script": "// apply the normal marking algorithm for this part\nthis.__proto__.mark.apply(this);\n// store whether the student said \"yes\" in an attribute that's easier to access\nthis.zero = this.ticks[0][0];\nthis.one = this.ticks[0][1];\nthis.two = this.ticks[0][2];"}}, "variableReplacementStrategy": "originalfirst", "distractors": ["", "", ""], "maxMarks": 0, "showCorrectAnswer": true, "variableReplacements": [], "shuffleChoices": false, "matrix": ["if(des<0,1,0)", "if(des=0,1,0)", "if(des>0,1,0)"], "showFeedbackIcon": true, "type": "1_n_2", "displayType": "radiogroup", "marks": 0, "minMarks": 0, "choices": ["

0

", "

1

", "

2

"], "displayColumns": 0}, {"answersimplification": "simplifyFractions", "scripts": {}, "expectedvariablenames": [], "checkvariablenames": false, "checkingaccuracy": 0.001, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "showpreview": true, "type": "jme", "answer": "{a*b+c}/{2*b}", "vsetrange": [0, 1], "vsetrangepoints": 5, "marks": 1, "checkingtype": "absdiff", "variableReplacements": []}, {"scripts": {}, "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "checkvariablenames": false, "checkingaccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "showpreview": true, "type": "jme", "answer": "({a*b+c}-sqrt({des}))/{2*b}", "vsetrange": [0, 1], "vsetrangepoints": 5, "marks": 1, "checkingtype": "absdiff"}, {"scripts": {}, "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "checkvariablenames": false, "checkingaccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "showpreview": true, "type": "jme", "answer": "({a*b+c}+sqrt({des}))/{2*b}", "vsetrange": [0, 1], "vsetrangepoints": 5, "marks": 1, "checkingtype": "absdiff"}], "variableReplacements": []}], "variables": {"d": {"group": "Ungrouped variables", "definition": "random(-12..12 except 0)", "description": "", "name": "d", "templateType": "anything"}, "c": {"group": "Ungrouped variables", "definition": "random(-12..12 except 0)", "description": "", "name": "c", "templateType": "anything"}, "des": {"group": "Ungrouped variables", "definition": "a^2*b^2+c^2-2*a*b*c-4*b*d", "description": "", "name": "des", "templateType": "anything"}, "b": {"group": "Ungrouped variables", "definition": "random(-12..12 except 0)", "description": "", "name": "b", "templateType": "anything"}, "a": {"group": "Ungrouped variables", "definition": "random(-12..12 except 0)", "description": "", "name": "a", "templateType": "anything"}}, "extensions": [], "preamble": {"js": "", "css": ""}, "ungrouped_variables": ["a", "b", "c", "d", "des"], "variable_groups": [], "functions": {}, "advice": "

The vertical asymptote corresponds to the value of $x$ that results in attempting to divide by $0$. For the equation

\n

\$\\simplify[all]{y=({b}x^2-{a*b+c}x+{a*c+d})/(x-{a})}\$

\n

This means the equation of the vertical asymptote is $x=\\var{a}$.

\n

The oblique asymptote corresponds to the value of $y$ that results from $x$ approaching infinity. Let's look at two methods that determine this limit:

\n

Method 1 - Breaking up the fraction

\n

We can rewrite the numerator of $\\simplify[all]{({b}x^2-{a*b+c}x+{a*c+d})/(x-{a})}$ so that it includes multiples of the denominator. We do this term by term. We first write $\\simplify{{b}x^2}$ in terms of $\\simplify{x-{a}}$:

\n

$\\simplify{{b}x^2={b}x(x-{a})+{a*b}x}$

\n

and so the next term is now $\\simplify[!collectNumbers]{{a*b}x-{a*b+c}x=-{c}x}$. We now write this in terms of $\\simplify{x-{a}}$:

\n

$\\simplify{-{c}x=-{c}(x-{a})-{a*c}}$

\n

and so our next term is now $\\simplify[!collectNumbers]{-{a*c}+{a*c+d}={d}}$. Now we can rewrite the numerator and break up our fraction:

\n

\\begin{align}\\simplify[all]{({b}x^2-{a*b+c}x+{a*c+d})/(x-{a})}&=\\simplify{({b}x(x-{a})-{c}(x-{a})+{d})/(x-{a})}\\\\&=\\simplify{({b}x(x-{a}))/(x-{a})-({c}(x-{a}))/(x-{a})+{d}/(x-{a})}\\\\&=\\simplify{({b}x-{c})+{d}/(x-{a})}\\end{align}

\n

Now as $x$ gets very large $\\simplify{{d}/(x-{a})}$ gets very close to $0$ and so $y$ approaches $\\simplify{{b}x-{c}}$.

\n

\n

Method 2 - Polynomial long division

\n

There is a procedure called polynomial long division, if you are comfortable with long division of numbers then it isn't too different. You can see an example of the procedure here. The result of the division (in this case $\\simplify{{b}x-{c}}$) will be the oblique asymptote. The remainder will be $\\var{d}$, which 'remains' to be divided by $\\simplify{x-{a}}$. Just like in the method above, you will be able to say \$y=\\simplify[all]{({b}x^2-{a*b+c}x+{a*c+d})/(x-{a})}=\\simplify{({b}x-{c})+{d}/(x-{a})}\$
so as $x$ gets very large $\\simplify{{d}/(x-{a})}$ gets very close to $0$ and so $y$ approaches $\\simplify{{b}x-{c}}$.

\n

\n

This means the equation of the horizontal asymptote is $y=\\simplify{{b}x-{c}}$.

\n

Notice that from Method 1 and Method 2 above we found that our equation can be written as $\\simplify{{b}x-{c}+{d}/(x-{a})}$, and so we can see that $\\var{d}$ is multiplying the fraction $\\simplify{1/(x-{a})}$. It is a general fact that because $\\var{d}$ is positive the graph will be in the top right and bottom left parts of the plane.  negative the graph will be in the top left and bottom right parts of the plane. We can see this as follows:

\n
\n
• By substituting into the equation an $x$ value that is to the right of the vertical asymptote $x=\\var{a}$, we will find the resulting $y$ value is above below the oblique asymptote $y=\\simplify{{b}x-{c}+{d}}$.
• \n
• By substituting into the equation an $x$ value that is to the left of the vertical asymptote $x=\\var{a}$, we will find the resulting $y$ value is above below the oblique asymptote $y=\\simplify{{b}x-{c}+{d}}$.
• \n
\n

To find the $y$-intercept, let $x=0$ and solve for $y$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
 $y$ $=$ $\\displaystyle\\simplify[!collectNumbers]{({b}0^2-{a*b+c}0+{a*c+d})/(0-{a})}$ $=$ $\\displaystyle\\simplify[fractionNumbers]{{-c-d/a}}$
\n

To find the $x$-intercept, let $y=0$ and solve for $x$ (here we use the quadratic equation):

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
 $0$ $=$ $\\displaystyle\\simplify{({b}x^2-{a*b+c}x+{a*c+d})/(x-{a})}$ $0$ $=$ $\\displaystyle\\simplify{({b}x^2-{a*b+c}x+{a*c+d})}$ $x$ $=$ $\\displaystyle\\frac{-(\\var{-a*b-c})\\pm\\sqrt{(\\var{-a*b-c})^2-4(\\var{b})(\\var{a*c+d})}}{2(\\var{b})}$
\n

Since this includes the square root of a negative number there are no $x$-intercepts.

\n

Therefore, the $x$-intercept is $x=\\simplify[fractionNumbers,simplifyFractions,unitDenominator]{({a*b+c})/{2*b}}$.

\n

Therefore, the $x$-intercepts are $x=\\simplify{({a*b+c}-sqrt({des}))/{2*b}}$ and $x=\\simplify{({a*b+c}+sqrt({des}))/{2*b}}$.

", "rulesets": {}, "name": "Rational functions: Quadratic over linear", "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}