// Numbas version: exam_results_page_options {"name": "Max and Min (5 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": ["temp2", "temp1", "gmi", "valmin", "gma", "s", "m1", "valbegin", "a", "valmax", "valgmax", "valgmin", "rawvalend", "rawvalmax", "b", "rawvalbegin", "rawvalmin", "rtemp2", "c", "rtemp1", "d", "m", "l", "valend", "l1"], "name": "Max and Min (5 parts) 24/11", "tags": ["Calculus", "calculus", "classifying stationary points", "finding global maxima and minima", "finding local maxima and local minima", "finding stationary points", "finding the maximum and minimum of a function", "nature of a critical point", "nature of critical points", "nature of turning points", "optimisation", "optimising a function on an interval", "optimising functions", "stationary points", "turning points"], "advice": "

Differentiating, we have:

\n

\\[g'(x)=\\simplify{{c}*x^2+{-c*(a+b)}*x+{c*a*b}={c}*(x+{-a})(x-{b})}\\]

\n

Note that we have already factorised the derivative.

\n

Stationary points are given by solving $g'(x)=0 \\Rightarrow x=\\var{a},\\;\\;\\mbox{or }x=\\var{b}$

\n

So the least stationary point is $x=\\var{a}$ and the greatest is $x=\\var{b}$.

\n

Since $\\var{a} > \\var{l}$ and $\\var{b} \\lt \\var{m}$ we have that both stationary points are in $I$.

\n

The second derivative is given by \\[g''(x)=\\simplify{{2*c}*x-{c*(a+b)}}\\]

\n

Local Maximum

\n

At the stationary point $x=\\var{a}$ we have $g''(\\var{a})=\\var{c*a-c*b} \\lt 0$.

\n

Hence at this value of $x$ we have a local maximum.

\n

The value of the function $g$ at this local maximum is $g(\\var{a})= \\var{valmax}$.

\n

Local Minimum

\n

At the stationary point $x=\\var{b}$ we have $g''(\\var{b})=\\var{c*b-c*a} \\gt 0$.

\n

Hence this point is a local minimum.

\n

The value of the function $g$ at this local minimum is $g(\\var{b})= \\var{valmin}$.

\n

Global Maximum

\n

First we find the values at the endpoints of the interval $I=[\\var{l},\\var{m}]$ are:

\n

$g(\\var{l})=\\var{valbegin}$ to 3 decimal places.

\n

$g(\\var{m})=\\var{valend}$ to 3 decimal places.

\n

To find the global maximum note that we are only concerned with the values of $g$ on the interval $I$.

\n

So we proceed by comparing the values of the function at the endpoints with the local maximum.

\n

a) If the value at the local maximum is greater than either of the values at the endpoints then this is the global maximum on the interval.

\n

b) Otherwise if the greatest value of the function at the endpoints is greater than the local maximum then this is the global maximum.

\n

So for our example we see that the global maximum occurs at $x=\\var{gma}$ and $g(\\var{gma})=\\var{valgmax}$.

\n

Global Minimum

\n

We proceed as for the global maximum by comparing the values of the function at the endpoints with the local minimum.

\n

a) If the value at the local minimum is less than either of the values at the endpoints then this is the global minimum on the interval.

\n

b) Otherwise if the least value of the function at the endpoints is less than the local minimum then this is the global minimum.

\n

In our example we see that the global minimum occurs at $x=\\var{gmi}$ and $g(\\var{gmi})=\\var{valgmin}$.

\n

\n

More 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 linear factors in the form $g'(x)=c(x-a)(x-b)$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*x", "xx", "x x"], "partialCredit": 0}, "variableReplacements": [], "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{c} * (x + {-a}) * (x + {-b})", "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$.

\n

Least stationary point is at $x$ = [[0]]    Greatest stationary point is at $x$ = [[1]]

\n

Do 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": "{a}", "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": "\n

Input the second derivative of $g$:

\n \n

$g''(x)=\\;\\;$ [[0]]

\n \n

Hence find all local maxima and minima given by the stationary points

\n \n

Local maximum is at $x=\\;\\;$ [[1]] and the value of the function at the local maximum = [[2]]

\n \n

Local minimum is at $x=\\;\\;$ [[3]] and the value of the function at the local minimum = [[4]]

\n \n ", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "(({(2 * c)} * x) + ( - {(c * (a + b))}))", "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": "{a}", "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": "{valmax}", "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]}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{valmin}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "\n

What are the following values at the end points of the interval $I$ ?

\n

$g(\\var{l})=\\;\\;$ [[0]]      $g(\\var{m})=\\;\\;$ [[1]]

\n

Input both to 3 decimal places.

\n ", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "valbegin", "minValue": "valbegin", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "valend", "minValue": "valend", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

Global Maximum

\n

At what value of $x$ does $g$ have a global maximum ?

\n

$x=\\;\\;$ [[0]]

\n

Value of $g$ at this global maximum = [[1]] (input to 3 decimal places).

\n

Global Minimum

\n

At what value of $x$ does $g$ have a global minimum ?

\n

$x=\\;\\;$ [[2]]

\n

Value of $g$ at this global minimum = [[3]] (input to 3 decimal places).

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "{gma}", "minValue": "{gma}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "valgmax", "minValue": "valgmax", "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}, {"allowFractions": false, "variableReplacements": [], "maxValue": "valgmin", "minValue": "valgmin", "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{{c}/3*x^3+ {-c*(a+b)}/2*x^2+{c*a*b}*x+{d}}\\]

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"temp2": {"definition": "precround(rtemp2,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "temp2", "description": ""}, "temp1": {"definition": "precround(rtemp1,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "temp1", "description": ""}, "gmi": {"definition": "if(valbeginvalmax,m,a)", "templateType": "anything", "group": "Ungrouped variables", "name": "gma", "description": ""}, "valend": {"definition": "precround(rawvalend,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "valend", "description": ""}, "m1": {"definition": "b+random(0.5..3#0.5)", "templateType": "anything", "group": "Ungrouped variables", "name": "m1", "description": ""}, "valbegin": {"definition": "precround(rawvalbegin,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "valbegin", "description": ""}, "rtemp2": {"definition": "(c/3) * m1^ 3 + (-c * (a + b)) / 2 * m1^ 2 + (c * a * b) * m1+ d", "templateType": "anything", "group": "Ungrouped variables", "name": "rtemp2", "description": ""}, "valmax": {"definition": "round(rawvalmax)", "templateType": "anything", "group": "Ungrouped variables", "name": "valmax", "description": ""}, "valgmax": {"definition": "max(valend,valmax)", "templateType": "anything", "group": "Ungrouped variables", "name": "valgmax", "description": ""}, "valgmin": {"definition": "min(valbegin,valmin)", "templateType": "anything", "group": "Ungrouped variables", "name": "valgmin", "description": ""}, "rawvalend": {"definition": "(c/3) * m^ 3 + (-c * (a + b)) / 2 * m^ 2 + (c * a * b) * m+ d", "templateType": "anything", "group": "Ungrouped variables", "name": "rawvalend", "description": ""}, "rawvalmax": {"definition": "(c/3) * a^ 3 + (-c * (a + b)) / 2 * a^ 2 + (c * a * b) * a + d", "templateType": "anything", "group": "Ungrouped variables", "name": "rawvalmax", "description": ""}, "b": {"definition": "if(c=6,a+random(1..9),random(2..10#2)+a)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "rawvalbegin": {"definition": "(c/3) * l^ 3 + (-c * (a + b)) / 2 * l^ 2 + (c * a * b) * l+ d", "templateType": "anything", "group": "Ungrouped variables", "name": "rawvalbegin", "description": ""}, "rawvalmin": {"definition": "(c/3) * b^ 3 + (-c * (a + b)) / 2 * b^ 2 + (c * a * b) * b + d", "templateType": "anything", "group": "Ungrouped variables", "name": "rawvalmin", "description": ""}, "a": {"definition": "s*random(1..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(3,6)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "rtemp1": {"definition": "(c/3) * l1^ 3 + (-c * (a + b)) / 2 * l1^ 2 + (c * a * b) * l1+ d", "templateType": "anything", "group": "Ungrouped variables", "name": "rtemp1", "description": ""}, "d": {"definition": "if(c=3,random(-9..9),random(-9..9#2))", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "m": {"definition": "if(valmax=temp2,m1+0.5,m1)", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "l": {"definition": "if(valmin=temp1,l1-0.5,l1)", "templateType": "anything", "group": "Ungrouped variables", "name": "l", "description": ""}, "s": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s", "description": ""}, "l1": {"definition": "a-random(0.5..3#0.5)", "templateType": "anything", "group": "Ungrouped variables", "name": "l1", "description": ""}}, "metadata": {"notes": "\n \t\t

9/07/2102:

\n \t\t

Added tags.

\n \t\t

Question appears to be working correctly.

\n \t\t

Changed grammar in the Advice section.

\n \t\t", "description": "

$I$ compact interval, $g:I\\rightarrow I,\\;g(x)=ax^3+bx^2+cx+d$. Find stationary points, 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/"}]}