// Numbas version: finer_feedback_settings {"name": "Find the stationary point of a function of two variables (2)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["rawstatval", "lmin", "q1", "dvalue", "neither", "b", "a", "c", "lmax", "p1", "d", "f", "y", "x", "type", "desc"], "name": "Find the stationary point of a function of two variables (2)", "tags": ["1603", "Calculus", "calculus", "checked2015", "critical point", "derivative", "determinant", "differentiation", "Differentiation", "function of 2 variables", "functions of 2 variables", "functions of two variables", "Hessian", "MAS1603", "maximum", "minimum", "partial derivatives", "partial differentiation", "saddle point", "stationary points", "stationary points of functions of two variables", "tested1", "type of critical point"], "preamble": {"css": "", "js": ""}, "advice": "
a) The $(x,y)$ coordinates of the critical point of a function of 2 variables $f(x,y)$ are given by solving
the following 2 equations for $x$ and $y$:
\\[\\begin{eqnarray*} \\frac{\\partial f}{\\partial x} &=&0\\\\ \\\\ \\frac{\\partial f}{\\partial y}&=&0 \\end{eqnarray*} \\]
\nIn this case you get two equations to solve for $x$ and $y$:
\n\\[\\begin{eqnarray*} \\simplify[std]{{3*a}x^2+{2*b}x*y}&=&0\\\\ \\\\ \\simplify[std]{{b}x^2+{2*c}y+{d}}&=&0 \\end{eqnarray*} \\]
The first equation factorises as \\[\\simplify{x*({3*a}x+{2*b}y)=0}\\] and we find that either:
\\[x=0,\\text{ or } \\simplify[std]{y={-3*a}x/{2*b}}\\]
\nOn substituting $x=0$ into the second equation we get $y=\\simplify[std]{{-d}/2}$.
\nHence $(0,\\simplify[std]{{-d}/2})$ is a critical point and it is the only critical point where $x=0$.
\nOn substituting these values for $x$ and $y$ into $f(x,y)$ we get:
\n\\[f\\left(0,\\simplify[std]{{-d}/2}\\right) = \\simplify[std]{{rawstatval}}.\\]
b) The Hessian at a point $(x,y)$ is:
\n\\[\\left(\\begin{array}{cc}\\simplify[std]{{6*a}x+{2*b}y}&\\simplify[std]{{2*b}x}\\\\ \\simplify[std]{{2*b}x}&\\var{2*c}\\end{array}\\right)\\]
\nEvaluated at the critical point $(0,\\simplify[std]{{-d}/2})$ we obtain:
\n\\[\\left(\\begin{array}{cc}\\simplify[std]{{-d*b}}&0\\\\ 0&\\var{2*c}\\end{array}\\right)\\]
\nThe determinant is $D=\\var{dvalue}$.
\nWe see that on looking at the information given by Steps above we have:
\n$\\var{desc}$
", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"stepsPenalty": 0, "prompt": "$a=\\;\\;\\;$[[0]]. Input as a fraction or an integer and not as a decimal.
\nInput the value of $f(x,y)$ at the critical point $(0,a)$:
\n$f(0,a)=\\;\\;$[[1]](Input to 2 decimal places).
\n", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "Input answer as a fraction or an integer, not a decimal
", "showStrings": false, "strings": ["."], "partialCredit": 0}, "vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{-d}/2", "marks": 2, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"notallowed": {"message": "Input answer as a fraction or an integer, not a decimal
", "showStrings": false, "strings": ["."], "partialCredit": 0}, "vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{rawstatval}", "marks": 2, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "steps": [{"prompt": "The $(x,y)$ coordinates of the stationary point of a function of 2 variables $f(x,y)$ are given by solving
the following 2 equations for $x$ and $y$
\\[\\begin{eqnarray*} \\frac{\\partial f}{\\partial x} &=&0\\\\ \\\\ \\frac{\\partial f}{\\partial y} &=&0 \\end{eqnarray*} \\]
\nIn this case you get two equations to solve for $x$ and $y$
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}, {"stepsPenalty": 0, "prompt": "Input the Hessian of the function evaluated at the critical point found above:
\nHence choose the type of the critical point;
\n[[1]]
\n", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"numRows": "2", "numColumns": "2", "type": "matrix", "allowFractions": false, "variableReplacements": [], "markPerCell": false, "variableReplacementStrategy": "originalfirst", "correctAnswerFractions": false, "showCorrectAnswer": true, "correctAnswer": "matrix([-d*b,0],[0,2c])", "scripts": {}, "marks": 1, "tolerance": 0, "allowResize": false}, {"matrix": "type", "shuffleChoices": false, "variableReplacements": [], "choices": ["Minimum
", "Maximum
", "Saddle
"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": 0, "scripts": {}, "marks": 0, "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}], "steps": [{"prompt": "The Hessian is defined by:
\n\\[H=\\;\\left(\\begin{array}{cc} \\frac{\\partial^2 f}{\\partial x^2}& \\frac{\\partial^2 f}{\\partial x \\partial y}\\\\
\\frac{\\partial^2 f}{\\partial y \\partial x}&\\frac{\\partial^2 f}{\\partial y^2}\\end{array}\\right)\\]
Evaluate this at the point found above.
\nFihd the determinant $D=\\det(H)$ and then the following tells us what type of critical point we have:
\na) $D \\gt 0$ and $\\displaystyle \\frac{\\partial^2 f}{\\partial x^2}\\gt 0$ gives a local minimum.
\nb) $D \\gt 0$ and $\\displaystyle \\frac{\\partial^2 f}{\\partial x^2}\\lt 0$ gives a local maximum.
\nc) $D \\lt 0$ gives a saddle point
\nd) $D=0$ not known - needs further work.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}], "statement": "In the following question find $a$ such that $(0,a)$ is a critical point of the function:
\n\\[f(x,y)=\\simplify[std]{{a}*x^3+{b}*x^2*y+{c}*y^2+{d}y+{f}}\\]
Also find the type of this critical point.
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": "dvalue<>0"}, "variables": {"q1": {"definition": "random(-3..3)", "templateType": "anything", "group": "Ungrouped variables", "name": "q1", "description": ""}, "dvalue": {"definition": "-2*b*c*d", "templateType": "anything", "group": "Ungrouped variables", "name": "dvalue", "description": ""}, "c": {"definition": "random(-5..5 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "p1": {"definition": "random(-3..3)", "templateType": "anything", "group": "Ungrouped variables", "name": "p1", "description": ""}, "d": {"definition": "random(-5..5 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "f": {"definition": "random(-5..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "f", "description": ""}, "type": {"definition": "switch(dvalue >0 and d*b<0,[1,0,0],dvalue>0 and d*b>0,[0,1,0],[0,0,1])", "templateType": "anything", "group": "Ungrouped variables", "name": "type", "description": ""}, "rawstatval": {"definition": "a*x^3+b*x^2*y+c*y^2+d*y+f", "templateType": "anything", "group": "Ungrouped variables", "name": "rawstatval", "description": ""}, "lmax": {"definition": "'Local maximum'", "templateType": "anything", "group": "Ungrouped variables", "name": "lmax", "description": ""}, "b": {"definition": "random(-5..5 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "a": {"definition": "random(1..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "y": {"definition": "-d/2", "templateType": "anything", "group": "Ungrouped variables", "name": "y", "description": ""}, "x": {"definition": "0", "templateType": "anything", "group": "Ungrouped variables", "name": "x", "description": ""}, "neither": {"definition": "'Saddle point'", "templateType": "anything", "group": "Ungrouped variables", "name": "neither", "description": ""}, "lmin": {"definition": "'Local minimum'", "templateType": "anything", "group": "Ungrouped variables", "name": "lmin", "description": ""}, "desc": {"definition": "switch(type[0]=1,'$\\\\displaystyle D\\\\gt 0,\\\\;\\\\;\\\\frac{\\\\partial^2 f}{\\\\partial x^2}\\\\gt 0\\\\Rightarrow \\\\text{ local minimum}.$',\n type[1]=1,'$\\\\displaystyle D\\\\gt 0,\\\\;\\\\;\\\\frac{\\\\partial^2 f}{\\\\partial x^2}\\\\lt 0\\\\Rightarrow \\\\text{ local maximum}.$',\n '$\\\\displaystyle D \\\\lt 0 \\\\Rightarrow \\\\text{ saddle point}$.')", "templateType": "anything", "group": "Ungrouped variables", "name": "desc", "description": ""}}, "metadata": {"notes": "10/07/2012:
\nAdded tags.
\nQuestion appears to be working correctly.
\n24/12/2012:
\nCalculations checked, OK. Added tested1 tag.
\n12/1/2016
\nThis copy asks for type of critical point using the Hessian.
", "description": "Find the critical point $(0,a)$ of the function: $f(x,y)=ax^3+bx^2y+cy^2+dy+f$ and find its type using the test given by the Hessian matrix.
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}]}