// Numbas version: exam_results_page_options {"name": "Paul 's copy of Max and Min 3", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "name": "Paul 's copy of Max and Min 3", "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": "\n

First derivative

\n

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.

\n

Stationary points

\n

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

\n

Therefore 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$.

\n

Second derivative.

\n

The 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*} \\]

\n

Local Minimum

\n

At the stationary point $x=\\var{k}$ we have $g''(\\var{k})=\\var{4*(k-b)^2} \\gt 0$.

\n

Hence $x=\\var{k}$ is a local minimum.

\n

The other stationary point

\n

The value at $x=\\var{b}$ is $g(\\var{b})= 0$.

\n

Hence this test fails at this point and we proceed to use the third derivative to see in more information can be gained.

\n

Third derivative

\n

We see that $g'''(x)=\\simplify{8*(3*x-{k+2*b})}$.

\n

Testing the stationary point using the third derivative gives:

\n

$g'''(\\var{b})=\\var{8*(b-k)} \\neq 0$.

\n

Therefore there cannot be an extremum point at $x=\\var{b}$.

\n

Finding the global maximum and minimum on $I$

\n

First 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}$.

\n

Global Maximum

\n

To 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$.

\n

We see from the values at the end points obtained above that the global maximum value on $I$ is at $x=\\var{xma}$.

\n

We have $g(\\var{xma})=\\var{gma}$.

\n

Global Minimum.

\n

$g$ has only one local minimum on $I$ at $x=\\var{k}$ and so this must be the global minimum on $I$.

\n

We have $g(\\var{k})=\\var{(k-a)*(k-b)^3}$.

\n ", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "\n

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$:

\n \n

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

\n \n ", "gaps": [{"notallowed": {"message": "

Factorise the expression

", "showstrings": false, "strings": ["x^2", "x^3"], "partialcredit": 0.0}, "checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "vsetrangepoints": 5.0, "checkingtype": "absdiff", "answersimplification": "std", "marks": 1.0, "answer": "4*(x + {-k}) * (x + {-b})^2", "type": "jme", "musthave": {"message": "

Factorise the expression

", "showstrings": false, "strings": ["(", ")"], "partialcredit": 0.0}}], "type": "gapfill", "marks": 0.0}, {"prompt": "\n

Find the stationary points of $g$, here thought of as $g:\\mathbb{R} \\rightarrow \\mathbb{R}$.

\n \n

Least stationary point: [[0]]

\n \n

Greatest stationary point: [[1]]

\n \n

Do both these stationary points lie in the interval $I$ ? [[2]]

\n \n ", "gaps": [{"checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "vsetrangepoints": 5.0, "checkingtype": "absdiff", "answersimplification": "std", "marks": 1.0, "answer": "{k}", "type": "jme"}, {"checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "vsetrangepoints": 5.0, "checkingtype": "absdiff", "answersimplification": "std", "marks": 1.0, "answer": "{b}", "type": "jme"}, {"maxanswers": 0.0, "distractors": ["", ""], "matrix": [1.0, 0.0], "minanswers": 0.0, "shufflechoices": true, "choices": ["

Yes

", "

No

"], "displaytype": "radiogroup", "maxmarks": 0.0, "marks": 0.0, "displaycolumns": 0.0, "type": "1_n_2", "minmarks": 0.0}], "type": "gapfill", "marks": 0.0}, {"prompt": "\n

Input the second derivative of $g$:

\n \n

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

\n \n

Using $g''(x)$, determine more information about the stationary points:

\n \n

Least stationary point is: (Choose one of the following)
[[1]]

\n \n

Greatest stationary point is: (Choose one of the following)
[[2]]

\n \n ", "gaps": [{"checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "vsetrangepoints": 5.0, "checkingtype": "absdiff", "answersimplification": "std", "marks": 1.0, "answer": "4*(x-{b})*(3*x-{2*k+b})", "type": "jme"}, {"maxanswers": 0.0, "distractors": ["", "", ""], "matrix": [1.0, 0.0, 0.0], "minanswers": 0.0, "shufflechoices": true, "choices": ["

A local minimum.

", "

A local maximum.

", "

Uncertain as the second derivative test fails.

"], "displaytype": "radiogroup", "maxmarks": 0.0, "marks": 0.0, "displaycolumns": 0.0, "type": "1_n_2", "minmarks": 0.0}, {"maxanswers": 0.0, "distractors": ["", "", ""], "matrix": [0.0, 0.0, 1.0], "minanswers": 0.0, "shufflechoices": true, "choices": ["

A local minimum.

", "

A local maximum.

", "

Uncertain as the second derivative test fails.

"], "displaytype": "radiogroup", "maxmarks": 0.0, "marks": 0.0, "displaycolumns": 0.0, "type": "1_n_2", "minmarks": 0.0}], "type": "gapfill", "marks": 0.0}, {"prompt": "\n

Using the third derivative answer the following questions:
$g'''(x) = \\;\\;$[[0]]

\n \n

If $a$ is the least stationary point then $g'''(a) =\\;\\;$[[1]]

\n \n

If $b$ is the other stationary point then $g'''(b) =\\;\\;$[[2]]

\n \n

This information tells us that: (Choose one of the following).
[[3]]

\n \n ", "gaps": [{"checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "vsetrangepoints": 5.0, "checkingtype": "absdiff", "answersimplification": "std", "marks": 1.0, "answer": "8*(3*x-{k+2*b})", "type": "jme"}, {"minvalue": "{third1}", "type": "numberentry", "maxvalue": "{third1}", "marks": 0.5, "showPrecisionHint": false}, {"minvalue": "{third2}", "type": "numberentry", "maxvalue": "{third2}", "marks": 0.5, "showPrecisionHint": false}, {"maxanswers": 0.0, "distractors": ["", "", "", "", ""], "matrix": [0.0, 1.0, 0.0, 0.0, 0.0], "minanswers": 0.0, "shufflechoices": true, "choices": ["

{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.

"], "displaytype": "radiogroup", "maxmarks": 0.0, "marks": 0.0, "displaycolumns": 0.0, "type": "1_n_2", "minmarks": 0.0}], "type": "gapfill", "marks": 0.0}, {"prompt": "\n

What 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 \n

Input both to 2 decimal places.

\n \n ", "gaps": [{"minvalue": "{valbegin}", "type": "numberentry", "maxvalue": "{valbegin}", "marks": 0.5, "showPrecisionHint": false}, {"minvalue": "{valend}", "type": "numberentry", "maxvalue": "{valend}", "marks": 0.5, "showPrecisionHint": false}], "type": "gapfill", "marks": 0.0}, {"prompt": "\n

Global Maximum

\n \n

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

\n \n

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

\n \n

Value of $g$ at this global maximum = [[1]].

\n \n

Global Minimum

\n \n

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

\n \n

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

\n \n

Value of $g$ at this global minimum = [[3]].

\n \n ", "gaps": [{"minvalue": "{xma}", "type": "numberentry", "maxvalue": "{xma}", "marks": 1.0, "showPrecisionHint": false}, {"minvalue": "{gma}", "type": "numberentry", "maxvalue": "{gma}", "marks": 1.0, "showPrecisionHint": false}, {"minvalue": "{k}", "type": "numberentry", "maxvalue": "{k}", "marks": 1.0, "showPrecisionHint": false}, {"minvalue": "{gmi}", "type": "numberentry", "maxvalue": "{gmi}", "marks": 1.0, "showPrecisionHint": false}], "type": "gapfill", "marks": 0.0}], "extensions": [], "statement": "\n

Let $I=[\\var{l},\\var{m}]$ be an interval and let $g: I \\rightarrow \\mathbb{R}$ be a function defined on this interval
given by :\\[g(x) = \\simplify{(x-{a})*(x-{b})^3}\\]

\n \n ", "variable_groups": [], "progress": "ready", "type": "question", "variables": {"a": {"definition": "s1*random(1..9)", "name": "a"}, "c": {"definition": "random(3,6)", "name": "c"}, "b": {"definition": "4*k-3*a", "name": "b"}, "d": {"definition": "if(c=3,random(-9..9),random(-9..9#2))", "name": "d"}, "gma": {"definition": "(xma-a)*(xma-b)^3", "name": "gma"}, "k": {"definition": "a+random(1..6)", "name": "k"}, "m": {"definition": "b+random(1..3)", "name": "m"}, "xma": {"definition": "if(valend > valbegin,m,l)", "name": "xma"}, "l": {"definition": "k-random(1..3)", "name": "l"}, "valend": {"definition": "(m-a)*(m-b)^3", "name": "valend"}, "gmi": {"definition": "(k-a)*(k-b)^3", "name": "gmi"}, "valbegin": {"definition": "(l-a)*(l-b)^3", "name": "valbegin"}, "third2": {"definition": "8*(b-k)", "name": "third2"}, "third1": {"definition": "16*(k-b)", "name": "third1"}, "s1": {"definition": "random(1,-1)", "name": "s1"}}, "metadata": {"notes": "\n \t\t

9/07/2012:

\n \t\t

Added tags.

\n \t\t

Question 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"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Paul Howes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/632/"}]}]}], "contributors": [{"name": "Paul Howes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/632/"}]}