// Numbas version: finer_feedback_settings {"name": "Max and Min (6 parts) 24/11", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "c", "b", "d", "gma", "k", "m", "xma", "l", "valend", "gmi", "valbegin", "third2", "third1", "s1"], "name": "Max and Min (6 parts) 24/11", "tags": ["Calculus", "calculus", "classifying stationary points", "finding global maxima and minima", "finding local mamima and minima", "finding the stationary points", "optimisation", "optimising functions", "third derivative test for maximum or minimum"], "advice": "
Differentiating we have:
\n\\[\\begin{eqnarray*} g'(x)&=&\\simplify{(x-{b})^3+3*(x-{a})*(x-{b})^2}\\\\ &=&\\simplify{(x-{b})^2(3*(x-{a})+x-{b})}\\\\ &=&\\simplify{4*(x-{k})*(x-{b})^2} \\end{eqnarray*} \\] and we have factorised the expression.
\nThese are given by solving $g'(x)=0 \\Rightarrow x=\\var{k},\\;\\;\\mbox{or }x=\\var{b}$
\nTherefore the least stationary point is $x=\\var{k}$ and the greatest is $x=\\var{b}$ and we see that both stationary points are in $I$.
\nThe second derivative is given by:
\\[\\begin{eqnarray*} g''(x)&=&\\simplify{4*(x-{b})^2+8*(x-{k})(x-{b})}\\\\ &=&\\simplify{4*(x-{b})(3*x-{2*k+b})} \\end{eqnarray*} \\]
At the stationary point $x=\\var{k}$ we have $g''(\\var{k})=\\var{4*(k-b)^2} \\gt 0$.
\nHence $x=\\var{k}$ is a local minimum.
\nThe value at $x=\\var{b}$ is $g(\\var{b})= 0$.
\nHence this test fails at this point and we proceed to use the third derivative to see in more information can be gained.
\nWe see that $g'''(x)=\\simplify{8*(3*x-{k+2*b})}$.
\nTesting the stationary point using the third derivative gives:
\n$g'''(\\var{b})=\\var{8*(b-k)} \\neq 0$.
\nTherefore there cannot be an extremum point at $x=\\var{b}$.
\nFirst we find the values at the endpoints of the interval $I=[\\var{l},\\var{m}]$ are:
\n$g(\\var{l})=\\var{valbegin}$.
\n$g(\\var{m})=\\var{valend}$.
\nTo find the global maximum note that we are only concerned with the values of $g$ on the interval $I$ and since $g$ does not have a local maximum on $I$ it must take its maximum value at one of the end points of $I$.
\nWe see from the values at the end points obtained above that the global maximum value on $I$ is at $x=\\var{xma}$.
\nWe have $g(\\var{xma})=\\var{gma}$.
\n$g$ has only one local minimum on $I$ at $x=\\var{k}$ and so this must be the global minimum on $I$.
\nWe have $g(\\var{k})=\\var{(k-a)*(k-b)^3}$.
\n\nMore information on maxima and minima is chapter 3 of your Mathematical Physics book, sections 3.2 and 3.3, pages 51-53.
", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "Input the first derivative of $g$ here, factorised into a product of two factors in the form $g'(x)=c(x-a)(x-b)^2$for suitable integers $a$, $b$ and $c$ (these can be zero):
\n$g'(x)=\\;\\;$[[0]]
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "Factorise the expression
", "showStrings": false, "strings": ["x^2", "x^3"], "partialCredit": 0}, "variableReplacements": [], "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "4*(x + {-k}) * (x + {-b})^2", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1], "musthave": {"message": "Factorise the expression
", "showStrings": false, "strings": ["(", ")"], "partialCredit": 0}}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "Find the stationary points of $g$,
\nLeast stationary point is at $x$ =[[0]]
\nGreatest stationary point is at $x$ = [[1]]
\nDo both these stationary points lie in the interval $I$ ? [[2]]
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{k}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{b}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"matrix": [1, 0], "shuffleChoices": true, "marks": 0, "variableReplacements": [], "choices": ["Yes
", "No
"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": 0, "scripts": {}, "distractors": ["", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "\nInput the second derivative of $g$:
\n \n$g''(x)=\\;\\;$ [[0]]
\n \nUsing $g''(x)$, determine more information about the stationary points:
\n \nLeast stationary point is: (Choose one of the following)
[[1]]
Greatest stationary point is: (Choose one of the following)
[[2]]
A local minimum.
", "A local maximum.
", "Uncertain as the second derivative test fails.
"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": 0, "scripts": {}, "distractors": ["", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}, {"matrix": [0, 0, 1], "shuffleChoices": true, "marks": 0, "variableReplacements": [], "choices": ["A local minimum.
", "A local maximum.
", "Uncertain as the second derivative test fails.
"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": 0, "scripts": {}, "distractors": ["", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "\nUsing the third derivative answer the following questions:
$g'''(x) = \\;\\;$[[0]]
If $a$ is the least stationary point then $g'''(a) =\\;\\;$[[1]]
\n \nIf $b$ is the other stationary point then $g'''(b) =\\;\\;$[[2]]
\n \nThis information tells us that: (Choose one of the following).
[[3]]
{k} is not a local minimum or a local maximum.
", "{b} is not a local minimum or a local maximum.
", "{b} is not a local minimum or a local maximum and neither is {k}.
", "{k} is a local maximum and {b} is a local minimum.
", "{k} is a local minimum and {b} is a local maximum.
"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": 0, "scripts": {}, "distractors": ["", "", "", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "\nWhat are the following values at the end points of the interval $I$ ?
\n \n$g(\\var{l})=\\;\\;$ [[0]]
\n \n$g(\\var{m})=\\;\\;$ [[1]]
\n \nInput both to 2 decimal places.
\n \n ", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "{valbegin}", "minValue": "{valbegin}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{valend}", "minValue": "{valend}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "At what value of $x$ does $g$ have a global maximum ?
\n$x=\\;\\;$ [[0]]
\nValue of $g$ at this global maximum = [[1]].
\nAt what value of $x$ does $g$ have a global minimum ?
\n$x=\\;\\;$ [[2]]
\nValue of $g$ at this global minimum = [[3]].
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "{xma}", "minValue": "{xma}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{gma}", "minValue": "{gma}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{k}", "minValue": "{k}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{gmi}", "minValue": "{gmi}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "Let $I=[\\var{l},\\var{m}]$ be an interval in $x$ and let $g$ be a function defined on this interval given by :\\[g(x) = \\simplify{(x-{a})*(x-{b})^3}\\]
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"a": {"definition": "s1*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(3,6)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "4*k-3*a", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "if(c=3,random(-9..9),random(-9..9#2))", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "gma": {"definition": "(xma-a)*(xma-b)^3", "templateType": "anything", "group": "Ungrouped variables", "name": "gma", "description": ""}, "k": {"definition": "a+random(1..6)", "templateType": "anything", "group": "Ungrouped variables", "name": "k", "description": ""}, "m": {"definition": "b+random(1..3)", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "xma": {"definition": "if(valend > valbegin,m,l)", "templateType": "anything", "group": "Ungrouped variables", "name": "xma", "description": ""}, "l": {"definition": "k-random(1..3)", "templateType": "anything", "group": "Ungrouped variables", "name": "l", "description": ""}, "valend": {"definition": "(m-a)*(m-b)^3", "templateType": "anything", "group": "Ungrouped variables", "name": "valend", "description": ""}, "gmi": {"definition": "(k-a)*(k-b)^3", "templateType": "anything", "group": "Ungrouped variables", "name": "gmi", "description": ""}, "valbegin": {"definition": "(l-a)*(l-b)^3", "templateType": "anything", "group": "Ungrouped variables", "name": "valbegin", "description": ""}, "third2": {"definition": "8*(b-k)", "templateType": "anything", "group": "Ungrouped variables", "name": "third2", "description": ""}, "third1": {"definition": "16*(k-b)", "templateType": "anything", "group": "Ungrouped variables", "name": "third1", "description": ""}, "s1": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s1", "description": ""}}, "metadata": {"notes": "\n \t\t9/07/2012:
\n \t\tAdded tags.
\n \t\tQuestion appears to be working correctly.
\n \t\t", "description": "$I$ compact interval, $g:I\\rightarrow I$, $g(x)=(x-a)(x-b)^2$. Stationary points in interval. Find local and global maxima and minima of $g$ on $I$.
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Katie Dexter", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/553/"}]}]}], "contributors": [{"name": "Katie Dexter", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/553/"}]}