// Numbas version: finer_feedback_settings {"name": "Paul 's copy of Max and Min 1 and 2", "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": "Paul 's copy of Max and Min 1 and 2", "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"], "preamble": {"css": "", "js": ""}, "advice": "
Differentiating, we have:
\n\\[g'(x)=\\simplify{{c}*x^2+{-c*(a+b)}*x+{c*a*b}={c}*(x+{-a})(x-{b})}\\]
\nNote that we have already factorised the derivative.
\nStationary points are given by solving $g'(x)=0 \\Rightarrow x=\\var{a},\\;\\;\\mbox{or }x=\\var{b}$
\nSo the least stationary point is $x=\\var{a}$ and the greatest is $x=\\var{b}$.
\nSince $\\var{a} > \\var{l}$ and $\\var{b} \\lt \\var{m}$ we have that both stationary points are in $I$.
\nThe second derivative is given by \\[g''(x)=\\simplify{{2*c}*x-{c*(a+b)}}\\]
\nAt the stationary point $x=\\var{a}$ we have $g''(\\var{a})=\\var{c*a-c*b} \\lt 0$.
\nHence at this value of $x$ we have a local maximum.
\nThe value of the function $g$ at this local maximum is $g(\\var{a})= \\var{valmax}$.
\nAt the stationary point $x=\\var{b}$ we have $g''(\\var{b})=\\var{c*b-c*a} \\gt 0$.
\nHence this point is a local minimum.
\nThe value of the function $g$ at this local minimum is $g(\\var{b})= \\var{valmin}$.
\nFirst 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.
\nTo find the global maximum note that we are only concerned with the values of $g$ on the interval $I$.
\nSo we proceed by comparing the values of the function at the endpoints with the local maximum.
\na) 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.
\nb) Otherwise if the greatest value of the function at the endpoints is greater than the local maximum then this is the global maximum.
\n\\[\\begin{array}{c|c|c|c} x & \\mbox{Local Maximum}=\\var{a} & \\var{l} \\in I & \\var{m} \\in I \\\\ \\hline\\\\ g(x)& \\var{valmax} & \\var{valbegin} & \\var{valend} \\\\ \\end{array} \\]
\nSo for our example we see that the global maximum occurs at $x=\\var{gma}$ and $g(\\var{gma})=\\var{valgmax}$.
\nWe proceed as for the global maximum by comparing the values of the function at the endpoints with the local minimum.
\na) 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.
\nb) Otherwise if the least value of the function at the endpoints is less than the local minimum then this is the global minimum.
\n\\[\\begin{array}{c|c|c|c} x & \\mbox{Local Minimum}=\\var{b} & \\var{l} \\in I & \\var{m} \\in I \\\\ \\hline\\\\ g(x)& \\var{valmin} & \\var{valbegin} & \\var{valend} \\\\ \\end{array} \\]
\nIn our example we see that the global minimum occurs at $x=\\var{gmi}$ and $g(\\var{gmi})=\\var{valgmin}$.
", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "\nInput 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$:
\n \n$g'(x)=\\;\\;$[[0]]
\n \n ", "marks": 0, "gaps": [{"notallowed": {"message": "Factorise the expression
", "showStrings": false, "strings": ["^", "x*x", "xx", "x x"], "partialCredit": 0}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{c} * (x + {-a}) * (x + {-b})", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme", "musthave": {"message": "Factorise the expression
", "showStrings": false, "strings": ["(", ")"], "partialCredit": 0}}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "\nLeast stationary point: [[0]] Greatest stationary point: [[1]]
\nDo both these stationary points lie in the interval $I$ ? [[2]]
\n ", "marks": 0, "gaps": [{"expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{a}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{b}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"matrix": [1, 0], "shuffleChoices": true, "scripts": {}, "choices": ["Yes
", "No
"], "marks": 0, "displayType": "radiogroup", "maxMarks": 0, "distractors": ["", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "\nInput the second derivative of $g$:
\n \n$g''(x)=\\;\\;$ [[0]]
\n \nHence find all local maxima and minima given by the stationary points
\n \nLocal maximum is at $x=\\;\\;$ [[1]] and the value of the function at the local maximum = [[2]]
\n \nLocal minimum is at $x=\\;\\;$ [[3]] and the value of the function at the local minimum = [[4]]
\n \n ", "marks": 0, "gaps": [{"expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "(({(2 * c)} * x) + ( - {(c * (a + b))}))", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{a}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{valmax}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{b}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{valmin}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "\nWhat are the following values at the end points of the interval $I$ ?
\n$g(\\var{l})=\\;\\;$ [[0]] $g(\\var{m})=\\;\\;$ [[1]]
\nInput both to 3 decimal places.
\n ", "marks": 0, "gaps": [{"allowFractions": false, "marks": 1, "maxValue": "valbegin", "minValue": "valbegin", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "marks": 1, "maxValue": "valend", "minValue": "valend", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "\nAt what value of $x \\in I$ does $g$ have a global maximum ?
\n$x=\\;\\;$ [[0]]
\nValue of $g$ at this global maximum = [[1]] (input to 3 decimal places).
\nAt what value of $x \\in I$ does $g$ have a global minimum ?
\n$x=\\;\\;$ [[2]]
\nValue of $g$ at this global minimum = [[3]] (input to 3 decimal places).
\n ", "marks": 0, "gaps": [{"allowFractions": false, "marks": 1, "maxValue": "{gma}", "minValue": "{gma}", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "marks": 1, "maxValue": "valgmax", "minValue": "valgmax", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "marks": 1, "maxValue": "{gmi}", "minValue": "{gmi}", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "marks": 1, "maxValue": "valgmin", "minValue": "valgmin", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "\nLet $I=[\\var{l},\\var{m}]$ be an interval and let $g: I \\rightarrow I$ 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}}\\]
9/07/2102:
\n \t\tAdded tags.
\n \t\tQuestion appears to be working correctly.
\n \t\tChanged 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"}, "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/"}]}