// Numbas version: finer_feedback_settings {"name": "MA100 MT Week 3", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "MA100 MT Week 3", "statement": "
Week 3 (lectures 5 and 6): In this question, you will look at stationary points of functions, classifying the stationary points via the first derivative test and the second derivative test, and global maximum points.
\nIf you have not provided an answer to every input gap of a question or part of the question, and you try to submit your answers to the question or part, then you will see the message \"Can not submit answer - check for errors\". In reality your answer has been submitted, but the system is just concerned that you have not submitted an answer to every input gap. For this reason, please ensure that you provide an answer to every input gap in the question or part before submitting. Even if you are unsure of the answer, write down what you think is most likely to be correct; you can always change your answer or retry the question.
\nAs with all questions, there may be parts where you can choose to \"Show steps\". This may give a hint, or it may present sub-parts which will help you to solve that part of the question. Furthermore, remember to always press the \"Show feedback\" button at the end of each part. Sometimes, helpful feedback will be given here, and often it will depend on how correctly you have answered and will link to other parts of the question. Hence, always retry the parts until you obtain full marks, and then look at the feedback again.
Keep in mind that in order to see the feedback for a particular part of a question, you must provide a full (but not necessarily correct) answer to that part. Do not worry though, as you can look at the feedback and then ammend your answer accordingly.
Furthermore, as with all questions, choosing to reveal the answers will only show you the answers which change every time the question is loaded (i.e. answers to randomised questions); the fixed answers will not be revealed.
We want to find the stationary points of the function $f:\\mathbb{R} \\longrightarrow \\mathbb{R}$ defined by $\\simplify[all, !noLeadingMinus]{f(x) = ({PolynomialScalarMult}/3)* x^3 - (({PolynomialScalarMult}/2)*({StationaryPoint1} + {StationaryPoint2})) *x^2 + ({PolynomialScalarMult}* {StationaryPoint1} * {StationaryPoint2})* x + {ConstantTerm}}$.
\ni) First find the derivative of $f$.
(As usual, please use * for multiplication. For example, if you want to express $2x^2$ then write 2*x^2, and not 2x^2, as the latter may not be interpreted correctly by the system.)
$f'(x) =$ [[0]]
ii) We can now use this to calculate the stationary points of $f$. Recall that these occur when $f'(x)=0$. In this case, there will be two stationary points which we will call $s_1$ and $s_2$, with $s_1 < s_2$.
$s_1 =$ [[1]]
$s_2 =$ [[2]]
Don't forget that $s_1 < s_2$.
In this case, the sign of $f'(x)$ will change only when it passes a stationary point. This is because $f'(x)$ is a continuous function here.
\nThis means that it is sufficent to simply choose any $x_1 , x_2 , x_3$ with $x_1 < s_1 , \\; s_1 < x_2 < s_2$, and $s_2 < x_3$; evaluate $f(x_1) , \\; f(x_2)$, and $f(x_3)$; and make note of the signs. That is, there is no need to calculate the sign of $f'(x)$ for every $x \\in \\mathbb{R}$.
\nWhen you try to classify the stationary points, keep in mind that if the sign of $f'(x)$ is positive before the stationary point and negative after, then the stationary point is a maximum point. If $f'(x)$ is negative before and positive after, then we have a minimum point. If the sign is the same before and after, then we have a point of inflection.
", "extendBaseMarkingAlgorithm": true}], "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "stepsPenalty": 0, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "prompt": "Now we wish to classify the stationary points. We will use the first derivative test for this. This test is described in chapter 5 of the lecture notes.
\nComplete the table below to show how the sign of $f'(x)$ changes as $x$ passes the stationary points. (By sign, we mean either positive or negative. For example, the sign of $3$ is $+$ and the sign of $-1$ is $-$.)
\nRange of $x$ | \n$- \\infty < x < s_1$ | \n$x=s_1$ | \n$s_1 < x < s_2$ | \n$x=s_2$ | \n$s_2 < x < \\infty$ | \n
Sign of $f'(x)$ | \n[[0]] | \n0 | \n[[1]] | \n0 | \n[[2]] | \n
Hence we can see that $s_1$ is a/an [[3]] point, and $s_2$ is a/an [[4]] point.
", "gaps": [{"scripts": {}, "marks": 0, "type": "1_n_2", "showCorrectAnswer": true, "distractors": ["", ""], "maxMarks": 0, "matrix": ["1", 0], "minMarks": 0, "variableReplacements": [], "displayType": "dropdownlist", "unitTests": [], "showFeedbackIcon": false, "choices": ["{if(PolynomialScalarMult>0, \"+\",\"-\")}
", "{if(PolynomialScalarMult>0, \"-\",\"+\")}
"], "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "displayColumns": "0", "shuffleChoices": true, "extendBaseMarkingAlgorithm": true}, {"scripts": {}, "marks": 0, "type": "1_n_2", "showCorrectAnswer": true, "distractors": ["", ""], "maxMarks": 0, "matrix": ["1", "0"], "minMarks": 0, "variableReplacements": [], "displayType": "dropdownlist", "unitTests": [], "showFeedbackIcon": false, "choices": ["{if(PolynomialScalarMult>0, \"-\",\"+\")}
", "{if(PolynomialScalarMult>0, \"+\",\"-\")}
"], "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "displayColumns": 0, "shuffleChoices": true, "extendBaseMarkingAlgorithm": true}, {"scripts": {}, "marks": 0, "type": "1_n_2", "showCorrectAnswer": true, "distractors": ["", ""], "maxMarks": 0, "matrix": ["1", 0], "minMarks": 0, "variableReplacements": [], "displayType": "dropdownlist", "unitTests": [], "showFeedbackIcon": true, "choices": ["{if(PolynomialScalarMult>0, \"+\",\"-\")}
", "{if(PolynomialScalarMult>0, \"-\",\"+\")}
"], "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "displayColumns": 0, "shuffleChoices": true, "extendBaseMarkingAlgorithm": true}, {"scripts": {}, "marks": 0, "type": "1_n_2", "showCorrectAnswer": true, "distractors": ["", "", ""], "maxMarks": 0, "matrix": ["1", 0, 0], "minMarks": 0, "variableReplacements": [], "displayType": "dropdownlist", "unitTests": [], "showFeedbackIcon": true, "choices": ["{if(PolynomialScalarMult>0, \"maximum\",\"minimum\")}
", "{if(PolynomialScalarMult>0, \"minimum\",\"maximum\")}
", "inflection
"], "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "displayColumns": 0, "shuffleChoices": true, "extendBaseMarkingAlgorithm": true}, {"scripts": {}, "marks": 0, "type": "1_n_2", "showCorrectAnswer": true, "distractors": ["", "", ""], "maxMarks": 0, "matrix": ["1", "0", 0], "minMarks": 0, "variableReplacements": [], "displayType": "dropdownlist", "unitTests": [], "showFeedbackIcon": true, "choices": ["{if(PolynomialScalarMult>0, \"minimum\",\"maximum\")}
", "{if(PolynomialScalarMult>0, \"maximum\",\"minimum\")}
", "inflection
"], "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "displayColumns": 0, "shuffleChoices": true, "extendBaseMarkingAlgorithm": true}], "extendBaseMarkingAlgorithm": true}, {"type": "gapfill", "showCorrectAnswer": true, "marks": 0, "sortAnswers": false, "variableReplacements": [], "unitTests": [], "showFeedbackIcon": true, "scripts": {"mark": {"order": "after", "script": "this.markingFeedback = [];\n//This clears the feedback that would normally be given automatically by the built in script. We just want to show our own feedback.\n\n//For the code below: \"this.credit tells us the proportion of the marks that the student got for this part of the question. For example, if the student scored 1 mark out of three, then \"this.credit\" would equal to 1/3.\nif (this.credit < 1){\n this.markingComment('Not quite. Try again and have a look at this feedback section once each gap has been answered correctly as there will be some useful feedback.');\n}else if (this.credit == 1){\n this.markingComment('Good! This agrees with our results from part b. Indeed, if the double derivative of a function takes a positive value at a stationary point, then that stationary point is a minimum point; and if it takes a negative value, then that stationary point is a maximum point.');\n}"}}, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "prompt": "Let us also confirm our classification of the stationary points by using the second derivative test.
$f''(s_1)=$ [[0]]
$f''(s_2)=$ [[1]]
Suppose $S \\subseteq \\mathbb{R}$ and we have a function $g: S \\longrightarrow \\mathbb{R}$. What does it mean to say that $a \\in S$ is a global maximum of $g$, and what does it mean to say that $a \\in S$ is a strict global maximum?
\n[[0]]
\n", "gaps": [{"type": "m_n_x", "extendBaseMarkingAlgorithm": true, "minAnswers": "0", "minMarks": 0, "maxMarks": 0, "displayType": "radiogroup", "unitTests": [], "shuffleAnswers": true, "scripts": {}, "choices": ["$a \\in S$ is a global maximum
", "$a \\in S$ is a strict global maximum
"], "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "marks": 0, "showCorrectAnswer": false, "layout": {"expression": "", "type": "all"}, "matrix": [["1", 0, 0, 0], [0, "1", 0, 0]], "variableReplacements": [], "maxAnswers": "0", "showFeedbackIcon": true, "warningType": "none", "answers": ["$f(a) \\geq f(x)$ for all $x \\in S$
", "$f(a) > f(x)$ for all $x \\in S \\backslash \\{ a \\}$ (i.e. for all $x \\in S$ with $x \\neq a$)
", "$f(a) \\geq f(x)$ for all $x$ sufficiently near to $a$
", "$f(a) > f(x)$ for all $x$ sufficiently near to $a$, but not equal to $a$
"], "shuffleChoices": false}], "extendBaseMarkingAlgorithm": true}, {"type": "gapfill", "showCorrectAnswer": true, "marks": 0, "sortAnswers": false, "variableReplacements": [], "unitTests": [], "showFeedbackIcon": true, "scripts": {"mark": {"order": "after", "script": "this.markingFeedback = [];\n//This clears the feedback that would normally be given automatically by the built in script. We just want to show our own feedback.\n\n//For the code below: \"this.credit tells us the proportion of the marks that the student got for this part of the question. For example, if the student scored 1 mark out of three, then \"this.credit\" would equal to 1/3.\nif (this.credit < 1){\n this.markingComment('Not quite. Try again and have a look at this feedback section once each gap has been answered correctly as there will be some useful feedback.');\n}else if (this.credit == 1){\n this.markingComment('Well done! In this question we calculated the value of $f$ at the endpoints of the domain and at the stationary points. In other questions where we try to find global extrema, we may not need to do all this. For example, sometimes our function will be concave of convex, and this can be used to more easly calculate the global extrema.');\n}"}}, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "prompt": "Consider the function $g: [0,35] \\longrightarrow \\mathbb{R}$ defined by $\\simplify[all,!noLeadingMinus]{g(x) = -2*x^3 + (3*({StationaryPointB1}+{StationaryPointB2}))*x^2 - (6*{StationaryPointB1}*{StationaryPointB2})*x + {YIntercept}}$. You may assume, without proof, that this function has a global maximum point. We wish to find this global maximum.
\nRecall what the lecture notes indicate at the start of section 6.4: Suppose we have a function defined on a closed interval, and that this function is differentiable in the interior of the interval. If a global maximum for this function exists, then it occurs at an endpoint of the interval or at a stationary point.
\nHence, let us first find the stationary points of $g$.
\nWhat is the derivative of $g(x)$?
(If you wish to express something like $10x^2$ then please write 10*x^2 and not 10x^2, as the system may not correctly interpret the latter.)
$g'(x)=$ [[0]]
We can now calculate the stationary points of $g$. In this case there will be two stationary points (which are both in the domain of the function) which we will call $x_1$ and $x_2$, with $x_1 < x_2$.
$x_1 =$ [[1]] and $x_2=$ [[2]]
Now complete the table below to show the values that $g$ takes at the endpoints of its doman and at its stationary points.
\n$x=$ | \n0 | \n[[1]] | \n[[2]] | \n35 | \n
$g(x)=$ | \n[[3]] | \n[[4]] | \n[[5]] | \n[[6]] | \n
Hence, we can see that the maximum value of $g$ occurs when $x=$ [[7]].
(The global maximum may not be strict, in that it may occur at two points. For example, the maximum value M could be attained at a stationary point AND at an end point. If this is the case above, then for the final answer please state the smaller point where the global maximum occurs.)
This is the question for week 3 of the MA100 course at the LSE. It looks at material from chapters 5 and 6. The following describes how two polynomials were defined in the question. This may be helpful for anyone who needs to edit this question.
\nIn part a we have a polynomial. We wanted it to have two stationary points. To create the polynomial we first created the two stationary points as variables, called StationaryPoint1 and StationaryPoint2 which we will simply write as s1 ans s2 here. s2 was defined to be larger than s1. This means that the derivative of our polynomial must be of the form a(x-s1)(x-s2) for some constant a. The constant \"a\" is a variable called PolynomialScalarMult, and it is defined to be a multiple of 6 so that when we integrate the derivative a(x-s1)(x-s2) we only have integer coefficients. Its possible values include positive and negative values, so that the first stationary point is not always a max (and the second always a min). Finally, we have a variable called ConstantTerm which is the constant term that we take when we integrate the derivative derivative a(x-s1)(x-s2). Hence, we can now create a randomised polynomial with integers coefficients, for which the stationary points are s1 and s2; namely (the integral of a(x-s1)(x-s2)) plus ConstantTerm.
\nIn part e we created a more complicated polynomial. It is defined as -2x^3 + 3(s1 + s2)x^2 -(6*s1*s2) x + YIntercept on the domain [0,35]. One can easily calculate that the stationary points of this polynomials are s1 and s2. Furthermore, they are chosen so that both are in the domain and so that s1 is smaller than s2. This means that s1 is a min and s2 is a max. Hence, the maximum point of the function will occur either at 0 or s2 (The function is descreasing after s2). Furthermore, one can see that when we evaluate the function at s2 we get (s2)^2 (s2 -3*s1) + YIntercept. In particular, this is larger than YIntercept if s2 > 3 *s1, and smaller otherwise. Possible values of s2 include values which are larger than 3*s1 and values which are smaller than 3*s1. Hence, the max of the function maybe be at 0 or at s2, dependent on s2. This gives the question a good amount of randomisation.
"}, "ungrouped_variables": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "rulesets": {}, "functions": {}, "tags": [], "variables": {"StationaryPointB2": {"description": "This is the second stationary point of our function which will appear in parts d and onwards. It is chosen to be larger than the first stationary point. Furthermore, if it is larger than three times the first stationary point, then this second stationary point will be larger than the y-intercept of the function. Otherwise, it will be smaller than the y-intercept.
\nSee the question description for full details.
", "name": "StationaryPointB2", "templateType": "anything", "definition": "random(3*StationaryPointB1 - 5..3*StationaryPointB1 + 5 except(StationaryPointB1))", "group": "Variables for parts d and onwards"}, "StationaryPointB1": {"description": "The first stationary point for our function which will appear in parts d and onwards.
\nSee the question description for full details.
", "name": "StationaryPointB1", "templateType": "anything", "definition": "random(5..9)", "group": "Variables for parts d and onwards"}, "EvalStationaryPointB1": {"description": "The value of f at the first stationary point.
", "name": "EvalStationaryPointB1", "templateType": "anything", "definition": "(StationaryPointB1)^2 * (StationaryPointB1 - 3*StationaryPointB2) + YIntercept", "group": "Variables for parts d and onwards"}, "DoubleDerivStatPoint2": {"description": "This is the vallue of the double derivative at the second stationary point.
", "name": "DoubleDerivStatPoint2", "templateType": "anything", "definition": "PolynomialScalarMult * (StationaryPoint2 - StationaryPoint1)", "group": "Variables for parts a to c."}, "MaxPoint": {"description": "The x-value where the function takes its largest value.
", "name": "MaxPoint", "templateType": "anything", "definition": "if(EvalStationaryPointB2 > YIntercept, StationaryPointB2, 0)", "group": "Variables for parts d and onwards"}, "YIntercept": {"description": "This is the y-intercept of the function that will be used in parts d and onwards.
", "name": "YIntercept", "templateType": "anything", "definition": "random(1..5)", "group": "Variables for parts d and onwards"}, "StationaryPoint2": {"description": "This is the second stationary point of the polynomial, which we want to be larger than the first stationary point.
", "name": "StationaryPoint2", "templateType": "anything", "definition": "random(StationaryPoint1 +1..StationaryPoint1 +5)", "group": "Variables for parts a to c."}, "StationaryPoint1": {"description": "This is the first stationary point of the polynomial.
", "name": "StationaryPoint1", "templateType": "anything", "definition": "random(-10..5)", "group": "Variables for parts a to c."}, "DoubleDerivStatPoint1": {"description": "This is the vallue of the double derivative at the first stationary point.
", "name": "DoubleDerivStatPoint1", "templateType": "anything", "definition": "PolynomialScalarMult * (StationaryPoint1 - StationaryPoint2)", "group": "Variables for parts a to c."}, "PolynomialScalarMult": {"description": "This is a scalar factor of the polynomial, introduced so that the polynomial has only integer coefficients. There are both negative and positive possibilities so that the classification of the staionary points will vary.
", "name": "PolynomialScalarMult", "templateType": "anything", "definition": "random(-18, -12, -6, 6,12,18)", "group": "Variables for parts a to c."}, "ConstantTerm": {"description": "This is the constant term of the polynomial for which the students must find and classify the stationary points.
", "name": "ConstantTerm", "templateType": "anything", "definition": "random(-10..10)", "group": "Variables for parts a to c."}, "EvalAt35": {"description": "The value of f at the end point of 35
", "name": "EvalAt35", "templateType": "anything", "definition": "-2*(35^3) + 3* (StationaryPointB1 +StationaryPointB2)*(35^2) -6*StationaryPointB1*StationaryPointB2*35 + YIntercept", "group": "Variables for parts d and onwards"}, "EvalStationaryPointB2": {"description": "The value of f at the second stationary point.
", "name": "EvalStationaryPointB2", "templateType": "anything", "definition": "(StationaryPointB2)^2 * (StationaryPointB2 - 3*StationaryPointB1) + YIntercept", "group": "Variables for parts d and onwards"}}, "variable_groups": [{"variables": ["StationaryPoint1", "StationaryPoint2", "PolynomialScalarMult", "ConstantTerm", "DoubleDerivStatPoint1", "DoubleDerivStatPoint2"], "name": "Variables for parts a to c."}, {"variables": ["StationaryPointB1", "StationaryPointB2", "YIntercept", "EvalStationaryPointB2", "EvalStationaryPointB1", "EvalAt35", "MaxPoint"], "name": "Variables for parts d and onwards"}], "advice": "", "extensions": [], "type": "question", "contributors": [{"name": "Michael Yiasemides", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1440/"}]}]}], "contributors": [{"name": "Michael Yiasemides", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1440/"}]}