// Numbas version: exam_results_page_options {"name": "Extremum of a function", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"preventleave": false, "allowregen": true, "showfrontpage": false}, "question_groups": [{"questions": [{"variable_groups": [], "contributors": [{"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/800/", "name": "Dann Mallet"}], "name": "Extremum of a function", "ungrouped_variables": ["amp", "persh"], "preamble": {"css": "", "js": ""}, "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"persh": {"templateType": "anything", "name": "persh", "description": "", "group": "Ungrouped variables", "definition": "random(1..9)"}, "amp": {"templateType": "anything", "name": "amp", "description": "", "group": "Ungrouped variables", "definition": "random(1..9)"}}, "question_groups": [{"questions": [], "name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0}], "metadata": {"description": "

In this question, a locally extreme value (and its location) of a function will be determined.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "parts": [{"vsetrangepoints": 5, "vsetrange": [0, 1], "checkingtype": "absdiff", "checkingaccuracy": 0.001, "scripts": {}, "showCorrectAnswer": true, "prompt": "

The location of any local maximum or minimum of $f(x)$ will occur where the derivative of $f(x)$ with respect to $x$ is zero. The derivative of $f(x)$ is $f'(x)=$

", "variableReplacements": [], "expectedvariablenames": [], "marks": 1, "showpreview": true, "type": "jme", "answer": "-{amp}*{persh}*sin({persh}*x)", "variableReplacementStrategy": "originalfirst", "checkvariablenames": false}, {"vsetrangepoints": 5, "vsetrange": [0, 1], "checkingtype": "absdiff", "checkingaccuracy": 0.001, "scripts": {}, "showCorrectAnswer": true, "prompt": "

The locations of potential extrema are found by setting the derivative to zero and solving for $x$. Here there are infinitely many such values of $x$. The particular one which lies between $x=\\pi/\\simplify{2*{persh}}$ and $x=3\\pi/\\simplify{2*{persh}}$ (inclusive) is $x=$

\n

(Use exact values or at least 4 decimal place accuracy)

", "variableReplacements": [], "expectedvariablenames": [], "marks": 1, "showpreview": true, "type": "jme", "answer": "pi/{persh}", "variableReplacementStrategy": "originalfirst", "checkvariablenames": false}, {"vsetrangepoints": 5, "vsetrange": [0, 1], "checkingtype": "absdiff", "checkingaccuracy": 0.001, "scripts": {}, "showCorrectAnswer": true, "prompt": "

The value of the function at this location is $f(x)=$

", "variableReplacements": [], "expectedvariablenames": [], "marks": 1, "showpreview": true, "type": "jme", "answer": "{amp}*cos(pi)", "variableReplacementStrategy": "originalfirst", "checkvariablenames": false}, {"vsetrangepoints": 5, "vsetrange": [0, 1], "checkingtype": "absdiff", "checkingaccuracy": 0.001, "scripts": {}, "showCorrectAnswer": true, "prompt": "

So we now have the location and value of the extrema. To determine whether it is a maximum or minimum, we will use the second derivative test. The second derivative of $f(x)$ is $f''(x)=$

", "variableReplacements": [], "expectedvariablenames": [], "marks": 1, "showpreview": true, "type": "jme", "answer": "-{amp}*{persh}^2*cos({persh}*x)", "variableReplacementStrategy": "originalfirst", "checkvariablenames": false}, {"vsetrangepoints": 5, "vsetrange": [0, 1], "checkingtype": "absdiff", "checkingaccuracy": 0.001, "scripts": {}, "showCorrectAnswer": true, "prompt": "

At the location of the extrema, $f''(x)$ is $f''(x)=$

", "variableReplacements": [], "expectedvariablenames": [], "marks": 1, "showpreview": true, "type": "jme", "answer": "-{amp}*{persh}^2*cos(pi)", "variableReplacementStrategy": "originalfirst", "checkvariablenames": false}, {"shuffleChoices": false, "scripts": {}, "displayType": "radiogroup", "matrix": ["1", 0, 0, 0], "marks": 0, "prompt": "

Because this value is

", "distractors": ["", "", "", ""], "maxMarks": 0, "variableReplacements": [], "showCorrectAnswer": true, "type": "1_n_2", "choices": ["

positive, $f(x)$ has a local minimum at the location found in (b)

", "

positive, $f(x)$ has a local maximum at the location found in (b)

", "

negative, $f(x)$ has a local minimum at the location found in (b)

", "

negative, $f(x)$ has a local maximum at the location found in (b)

"], "variableReplacementStrategy": "originalfirst", "displayColumns": 0, "minMarks": 0}], "showQuestionGroupNames": false, "rulesets": {}, "statement": "

We will determine the location and value of a specific extremum of the function $f(x)=\\simplify{{amp}cos({persh}x)}$.

", "functions": {}, "extensions": [], "type": "question", "advice": "

Here, we determine the location and value of a specific extremum of the function

\n

\$f(x)=\\simplify{{amp}cos({persh}x)}.\$

\n

The location of any local maximum or minimum of $f(x)$ will occur where the derivative of $f(x)$ with respect to $x$ is zero. So first, we need the derivative of the function. It is

\n

\$f'(x)=-\\simplify{{amp}{persh}}\\sin(\\simplify{{persh}x}).\$

\n

Now, we set the derivative to zero and solve for $x$. We have

\n

\$0=-\\simplify{{amp}{persh}}\\sin(\\simplify{{persh}x})\$

\n

\$\\Rightarrow 0=\\sin(\\simplify{{persh}x})\$

\n

\$\\Rightarrow n\\pi=\\simplify{{persh}x},\\,n\\in\\mathbb{Z}\$

\n

\$\\Rightarrow x=\\simplify{ n pi / {persh} },\\,n \\in \\mathbb{Z}.\$

\n

So, the particular one which lies between $x=\\simplify{ pi / {2 {persh}}}$ and $x=\\simplify{ 3 pi / {2 {persh}}}$ (inclusive) is $x=\\simplify{ pi / {persh}}$ and the value of the function at this location is $f(x)=\\var{amp}\\cos(\\pi)=-\\var{amp}$.

\n

So we now have the location and value of the extrema. To determine whether it is a maximum or minimum, we could use the first or second derivative test. Here we will are asked to use the second derivative test. The second derivative of $f(x)$ is

\n

\$f''(x)=-\\simplify{{amp}{persh}^2}\\cos(\\simplify{{persh}x}).\$

\n

At the location of the extrema, $f''(x)$ is

\n

\$f''\\left(\\frac{\\pi}{\\var{persh}}\\right)=-\\simplify{{amp}{persh}^2}\\cos(\\pi)=\\simplify{{amp}{persh}^2}>0.\$

\n

Because the second derivative is positive, we conclude that we have a local minimum of $f(x)=-\\var{amp}$ at$x=\\simplify{ pi / {persh}}$.

", "tags": []}], "pickingStrategy": "all-ordered"}], "contributors": [{"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/800/", "name": "Dann Mallet"}]}