// Numbas version: exam_results_page_options {"name": "Lagrange multpliers", "timing": {"allowPause": true, "timeout": {"message": "", "action": "none"}, "timedwarning": {"message": "", "action": "none"}}, "showstudentname": true, "navigation": {"preventleave": true, "allowregen": true, "showresultspage": "oncompletion", "reverse": true, "onleave": {"message": "", "action": "none"}, "browse": true, "showfrontpage": true}, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questions": [{"name": "Q1-Find the absolute minimum and absolute maximum values using the Lagrange multiplier method (two variables)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Amna Shah", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1167/"}], "variables": {"b": {"description": "", "group": "Ungrouped variables", "name": "b", "definition": "random(5..11)", "templateType": "anything"}, "a": {"description": "", "group": "Ungrouped variables", "name": "a", "definition": "2", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}, "advice": "
\nLet $g(x,y,z)=x^2+y^2+z^2=\\var{b^2}$
The system of equations we need to solve:
\\begin{align}
0&=2\\lambda x \\tag{1} \\\\
2y &=2\\lambda y \\tag{2}\\\\
\\var{-a}&=2\\lambda z \\tag{3}\\\\
x^2+y^2+z^2 &=\\var{b^2}\\tag{4}\\\\
\\end{align}
Equation (3) shows that : $\\lambda \\neq 0$ and $z \\neq 0$; thus $2y-2\\lambda y=2y(1-\\lambda)=0$ hence $y=0$ or $\\lambda=1$.
Case 1
Since $y=0$ and $x=0$ we have two potential extremas at $(0,0,\\var{b})$ and$(0,0,\\var{-b})$.
Case 2
Plugging $\\lambda$ =1 into equation (3) we get $z=-\\simplify{{a}/2}$.
We can now substitue this into equation (4) and get $y=\\pm\\sqrt{\\simplify[!basic,simplifyFractions,unitDenominator]{{4*b^2-{a^2}}/4}}$.This part gives us two more point that are potential absolute extremas,$\\bigg(0,\\sqrt{\\simplify[!basic,simplifyFractions,unitDenominator]{{4*b^2-{a^2}}/4}},-\\simplify{{a}/2}\\bigg)$ and $\\bigg(0,-\\sqrt{\\simplify[!basic,simplifyFractions,unitDenominator]{{4*b^2+-{a^2}}/4}},-\\simplify{{a}^2/4}\\bigg)$.
To determine the absolute maximum and absolute minimum we evaluate the four potential extremas:
\\begin{align}f(0,0,\\var{b})&=\\simplify{-{a}*{b}};\\\\ f(0,0,-\\var{b})&=\\simplify{{a*b}};\\\\f\\bigg(0,\\pm\\sqrt{\\simplify[!basic,simplifyFractions,unitDenominator]{{4*b^2+-{a^2}}/4}},-\\simplify{{a}^2/4}\\bigg)&=\\simplify[!basic,simplifyFractions,unitDenominator]{{4*b^2+{a^2}}/4}.
\\end{align}
Hence the absolute minimum and absolute maximum respectivley is $\\simplify{-{a}*{b}}$ and $\\simplify[!basic,simplifyFractions,unitDenominator]{{4*b^2+{a^2}}/4}$.
\n", "metadata": {"description": "", "licence": "None specified"}, "statement": "
$\\lambda$ = [[0]]
", "marks": 0, "showFeedbackIcon": false, "variableReplacementStrategy": "originalfirst", "scripts": {}}, {"variableReplacements": [], "showCorrectAnswer": true, "type": "gapfill", "gaps": [{"showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "showpreview": true, "vsetrange": [0, 1], "showFeedbackIcon": true, "variableReplacements": [], "checkvariablenames": false, "type": "jme", "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrangepoints": 5, "marks": 1, "answer": "{{b^2}+1}", "scripts": {}}], "prompt": "Absolute minimum = [[0]]
", "marks": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "scripts": {}}], "functions": {}, "preamble": {"js": "", "css": ""}, "type": "question"}, {"name": "Q2-Find the absolute maxima and absolute minima (two variables)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Amna Shah", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1167/"}], "variables": {"n": {"description": "", "group": "Ungrouped variables", "name": "n", "definition": "random(1..9)", "templateType": "anything"}, "b": {"description": "", "group": "Ungrouped variables", "name": "b", "definition": "2*n", "templateType": "anything"}, "a": {"description": "", "group": "Ungrouped variables", "name": "a", "definition": "random(1..10)", "templateType": "anything"}, "c": {"description": "", "group": "Ungrouped variables", "name": "c", "definition": "random(1..5)", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}, "advice": "We want to find the lowest and highest point on the surface $f(x,y)=\\var{c}xy+\\var{a}$ over the unit circle $g(x,y)=x^2+y^2=\\var{b^2}$
We need to solve the following system of equations:
\\begin{align} \\var{c}y&=2 \\lambda z \\tag{1} \\\\ \\var{c}x&=2 \\lambda y \\tag{2} \\\\ x^2+y^2&=\\var{b^2} \\tag{3} \\\\ \\end{align}
When $\\var{c}x=0$, $y=0$ but $(0,0)$ is not on the unit circle thus $x\\neq 0$ and $y\\neq 0$.
Solving for $\\lambda$ yields:
\\begin{align}
\\lambda &= \\frac{\\var{c}y}{2x} \\tag{4} \\\\
\\lambda &= \\frac{\\var{c}x}{2y} \\tag{5} \\\\
\\end{align}
Equating (4) and (5) we get $x^2=y^2$.We can now plug this into the constraint to get $x=\\pm\\sqrt{\\simplify{{b^2}/2}}$. Moreover $y^2=x^2$ implies that either $y=x$ or $y=-x$ .This gives us four potential extremas.
Now we must evaluate these points to find out the minimum and maxiumum,
\\begin{align}
f\\bigg(\\sqrt{\\simplify{{b^2}/2}},\\sqrt{\\simplify{{b^2}/2}}\\bigg)&=\\simplify{{{c*{b^2}}/2+a}}; \\\\
f\\bigg(-\\sqrt{\\simplify{{b^2}/2}},-\\sqrt{\\simplify{{b^2}/2}}\\bigg)&=\\simplify{{{c*{b^2}}/2+a}}; \\\\
f\\bigg(-\\sqrt{\\simplify{{b^2}/2}},\\sqrt{\\simplify{{b^2}/2}}\\bigg)&=\\simplify{{-c*{b^2}/2+a}}; \\\\
f\\bigg(\\sqrt{\\simplify{{b^2}/2}},-\\sqrt{\\simplify{{b^2}/2}},\\bigg)&=\\simplify{{-c*{b^2}/2+a}}.
\\end{align}
From this we know the absolute minimum is $\\simplify{{-c*{b^2}/2+a}}$ and the absolute maximum is $\\simplify{{{c*{b^2}}/2+a}}$.
This question assesses the students ability to solve a function subject to two constraints
", "licence": "None specified"}, "statement": "$\\var{c}y$= [[0]]$\\lambda$
[[1]]x =[[3]]$\\lambda$
$x^2$+$y^2$=[[2]]
", "marks": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "scripts": {}}, {"variableReplacements": [], "showCorrectAnswer": true, "type": "gapfill", "gaps": [{"showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "showpreview": true, "vsetrange": [0, 1], "showFeedbackIcon": true, "variableReplacements": [], "checkvariablenames": false, "type": "jme", "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrangepoints": 5, "marks": 1, "answer": "{{-c*{b^2}/2+a}}", "scripts": {}}], "prompt": "
Absolute minimum = [[0]]
", "marks": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "scripts": {}}, {"variableReplacements": [], "showCorrectAnswer": true, "type": "gapfill", "gaps": [{"showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "showpreview": true, "vsetrange": [0, 1], "showFeedbackIcon": true, "variableReplacements": [], "checkvariablenames": false, "type": "jme", "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrangepoints": 5, "marks": 1, "answer": "{{{c*{b^2}}/2+a}}", "scripts": {}}], "prompt": "Absolute maxiumum = [[0]]
", "marks": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "scripts": {}}], "functions": {}, "preamble": {"js": "", "css": ""}, "type": "question"}, {"name": "Q3-Find the absolute maximum and absolute minimum of the function ( two variables)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Amna Shah", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1167/"}], "ungrouped_variables": ["n", "a", "b"], "preamble": {"css": "", "js": ""}, "tags": [], "variables": {"b": {"definition": "2*n+1", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "b"}, "a": {"definition": "2*n", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "a"}, "n": {"definition": "random(1..10)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "n"}}, "statement": "
Find the absolute maximum and absolute minimum values of the function $f(x,y)=\\var{a}xy$ subject to the constraint $x^2+y^2=\\var{b}$ using the Lagrange multiplier method.
Fill in the gaps of the system of equations that need to be solved.
The system of equations we need to solve is:
\\begin{align}
\\var{a}y&=2x \\lambda \\tag{1} \\\\
\\var{a}x&=2y \\lambda \\tag{2}\\\\
x^2+y^2=\\var{b} \\tag{3} \\\\
\\end{align}
Neither $x$ or $y$ $\\ne 0$ as the above equations wont hold.
Rearranging equation (1) and (2) respectivley to make $\\lambda$ the subject we get,
\\begin{align}
\\lambda &=\\frac{\\var{a}y}{2x}, \\tag{4}\\\\
\\lambda &=\\frac{\\var{a}x}{2y}, \\tag{5}
\\end{align}
Equating (4) and (5) we get $y^2=x^2 \\tag{6}$
Substituting (6) into (3) we get $x=\\pm \\sqrt{\\frac{\\var{b}}{2}}$ and $y=\\pm\\sqrt{\\frac{\\var{b}}{2}}$. We now have four potential extremas. The absolute maximum is $\\simplify{{a*b}/{2}}$ and the absolute minimum is $\\simplify{-{a*b}/{2}}$.
$\\var{a}y$=$\\lambda$[[0]]$x$
[[3]]$x$=$\\lambda$[[1]]$y$
$x^2+y^2$=[[2]]
Absolute maximum = [[0]]
", "gaps": [{"expectedvariablenames": [], "showFeedbackIcon": true, "marks": 1, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false, "showpreview": true, "showCorrectAnswer": true, "checkingaccuracy": 0.001, "answer": "{{{a}*{b}}/{2}}", "type": "jme", "vsetrange": [0, 1], "scripts": {}, "vsetrangepoints": 5, "checkingtype": "absdiff", "variableReplacements": []}], "variableReplacements": [], "showCorrectAnswer": true, "scripts": {}}, {"type": "gapfill", "showFeedbackIcon": true, "marks": 0, "variableReplacementStrategy": "originalfirst", "prompt": "Absolute minimum = [[0]]
", "gaps": [{"expectedvariablenames": [], "showFeedbackIcon": true, "marks": 1, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false, "showpreview": true, "showCorrectAnswer": true, "checkingaccuracy": 0.001, "answer": "-{{{a}*{b}}/{2}}", "type": "jme", "vsetrange": [0, 1], "scripts": {}, "vsetrangepoints": 5, "checkingtype": "absdiff", "variableReplacements": []}], "variableReplacements": [], "showCorrectAnswer": true, "scripts": {}}], "variablesTest": {"maxRuns": 100, "condition": ""}, "metadata": {"licence": "None specified", "description": ""}, "variable_groups": [], "functions": {}, "type": "question"}, {"name": "Q4-Optimize (three variables)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Amna Shah", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1167/"}], "metadata": {"licence": "None specified", "description": ""}, "rulesets": {}, "advice": "Here is the system of equations we need to solve:
\\begin{align} \\var{a}&=\\lambda +2\\mu x \\tag{1} \\\\ 1&=\\lambda \\tag{2} \\\\-\\var{a}&=-\\lambda + 2\\mu z \\tag{3} \\\\x^2+z^2&=1 \\tag{4} \\\\x+y-z&=0 \\tag{5}
\\end{align}
Since $\\lambda=1$ we substitute this into equation (1) and rearrange this to get $x$ the subject: $x=\\frac{\\simplify{{{a}-1}}}{2\\mu}\\tag{6}$
Now we substitute $\\lambda=1$ into equation (3) and rearrange this to make $z$ the subject :$z=\\frac{\\simplify{{{-a}+1}}}{2\\mu}\\tag{7}$
We now know what $x$ and $z$ are therefore we plug this into equation (4) Simplyfying this and completing the square we get $\\mu=\\pm\\frac{\\simplify{{{a}-1}}}{\\sqrt{2}}$.
Case 1: $\\mu=\\frac{\\simplify{{{a}-1}}}{\\sqrt{2}}$.
Plug in $\\mu=\\frac{\\simplify{{{a}-1}}}{\\sqrt{2}}$ into (6) and (7) to find $x$ and $z$ respectivley.Thus $x=\\frac{\\sqrt{2}}{2}$ and $z=\\frac{-\\sqrt{2}}{2}$. To find $y$ we plug the (6) and (7) into equation (5) which gives us $y=-\\sqrt{2}$. Thus there is an extrema at $\\bigg(\\frac{\\sqrt{2}}{2},-\\sqrt{2},-\\frac{\\sqrt{2}}{2} \\bigg)$
Case 2: $\\mu=-\\frac{\\simplify{{{a}-{1}}}}{\\sqrt{2}}$.
Plug $\\mu=-\\frac{\\simplify{{{a}-{1}}}}{\\sqrt{2}}$ into (6) and (7) to find $x$ and $z$ respectivley. Thus $x=-\\frac{\\sqrt{2}}{2}$ and $z=\\frac{\\sqrt{2}}{2}$.To find $y$ we plug the (6) and (7) into equation (5) which gives us $y=\\sqrt{2}$. There is an extrema at $\\bigg(-\\frac{\\sqrt{2}}{2},\\sqrt{2},\\frac{\\sqrt{2}}{2} \\bigg)$
To find the absolute miniumum and absolute maximum we plug in the extremas into $f(x,y,z)= \\var{a}x+y-\\var{a}z$ and evaluate. The absolute maximum is $\\sqrt{2}$ and the absolute minimum is $-\\sqrt{2}$
Note: $\\nabla f(x,y,z)=\\lambda \\nabla g(x,y,z) +\\mu \\nabla h(x,y,z)$
\n$\\mu$ = [[0]]
$\\mu$ = - [[1]]
Absolute maximum = [[0]]
", "gaps": [{"marks": 1, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "checkingtype": "absdiff", "expectedvariablenames": [], "checkvariablenames": false, "showFeedbackIcon": true, "type": "jme", "variableReplacements": [], "scripts": {}, "showpreview": true, "vsetrange": [0, 1], "vsetrangepoints": 5, "answer": "2^(1/2)", "checkingaccuracy": 0.001}], "marks": 0, "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "variableReplacements": []}, {"prompt": "Absolute minimum = [[0]]
", "gaps": [{"marks": 1, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "checkingtype": "absdiff", "expectedvariablenames": [], "checkvariablenames": false, "showFeedbackIcon": true, "type": "jme", "variableReplacements": [], "scripts": {}, "showpreview": true, "vsetrange": [0, 1], "vsetrangepoints": 5, "answer": "-2^(1/2)", "checkingaccuracy": 0.001}], "marks": 0, "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "variableReplacements": []}], "type": "question"}, {"name": "Q5- Find the maximum and minimum values (two variables)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Amna Shah", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1167/"}], "functions": {}, "variable_groups": [], "rulesets": {}, "metadata": {"licence": "None specified", "description": ""}, "tags": [], "parts": [{"marks": 0, "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "showCorrectAnswer": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "marks": 1, "expectedvariablenames": [], "checkingaccuracy": 0.001, "checkvariablenames": false, "showpreview": true, "checkingtype": "absdiff", "answer": "y", "scripts": {}, "vsetrange": [0, 1]}, {"vsetrangepoints": 5, "showCorrectAnswer": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "marks": 1, "expectedvariablenames": [], "checkingaccuracy": 0.001, "checkvariablenames": false, "showpreview": true, "checkingtype": "absdiff", "answer": "2", "scripts": {}, "vsetrange": [0, 1]}, {"vsetrangepoints": 5, "showCorrectAnswer": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "marks": 1, "expectedvariablenames": [], "checkingaccuracy": 0.001, "checkvariablenames": false, "showpreview": true, "checkingtype": "absdiff", "answer": "x", "scripts": {}, "vsetrange": [0, 1]}, {"vsetrangepoints": 5, "showCorrectAnswer": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "marks": 1, "expectedvariablenames": [], "checkingaccuracy": 0.001, "checkvariablenames": false, "showpreview": true, "checkingtype": "absdiff", "answer": "2", "scripts": {}, "vsetrange": [0, 1]}, {"vsetrangepoints": 5, "showCorrectAnswer": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "marks": 1, "expectedvariablenames": [], "checkingaccuracy": 0.001, "checkvariablenames": false, "showpreview": true, "checkingtype": "absdiff", "answer": "{b^2}", "scripts": {}, "vsetrange": [0, 1]}], "type": "gapfill", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "[[0]]$e^{xy}$ = [[1]] $\\lambda x$
[[2]]$e^{xy}$ =[[3]] $\\lambda y$
$x^{2}+y^{2}$ = [[4]]
Absolute maximum =$e$^[[0]]
"}, {"marks": 0, "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": "2", "showCorrectAnswer": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "marks": 1, "expectedvariablenames": [], "checkingaccuracy": "1", "checkvariablenames": false, "showpreview": true, "checkingtype": "dp", "answer": "-{b^2}/2", "scripts": {}, "vsetrange": [0, 1]}], "type": "gapfill", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "Absolute minimum =$e$^ [[0]]
"}], "ungrouped_variables": ["a", "b", "n"], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "Here is the system of equations we need to solve:
\\begin{align}
ye^{xy}&=\\lambda \\var{a}x \\tag{1} \\\\
xe^{xy}&=\\lambda \\var{a}y \\tag{2} \\\\
x^{\\var{a}}+y^{\\var{a}}=\\simplify{{b^2}} \\tag{3}
\\end{align}
Now making $\\lambda$ the subject and then equating and cross multipying the equations we get $x^2=y^2$. We now plug $x^2=y^2$ into $g(x,y,z)=x^{\\var{a}}+y^{\\var{a}}=\\var{b^2}$ which gives us $x=\\pm \\frac{\\simplify{{b^2}^{1/2}}}{\\sqrt{2}}$ and $y=\\pm\\frac{\\simplify{{b^2}^{1/2}}}{\\sqrt{2}}$.
We have now found the potential extremas. To find the absolute maximum and absolute minimum values we plug these points into $f(x,y)=e^{xy}$ and evaluate. Therefore absolute maximum is $e^\\simplify{{b^2}/2}$ and the absolute minimum is $e^{-\\simplify{{b^2}/2}}$.
[[0]]$(x-\\var{a})$ = [[1]]$\\lambda$
[[2]]$y$ = [[2]]$y\\lambda$
$y^2$- [[3]]$x=0$
Shortest distance is = [[0]]
", "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showFeedbackIcon": true, "marks": 0}], "advice": "The square of the distance between a point $(x,y)$ and $(\\var{a},0)$ is $f(x,y)=(x-\\var{a})^2+y^2$
We have to minimize $f(x,y)$ subject to the constraint $g(x,y)=y^2-\\var{b}x$.
We need to solve the following system of equations:
\\begin{align}
2(x-\\var{a})&=-\\var{b}\\lambda \\tag{1} \\\\
2y&=2y\\lambda \\tag{2} \\\\
y^2-\\var{b}x&=0 \\tag{3} \\\\
\\end{align}
Equation $(2)$ shows $y=0$ or $\\lambda = 1$
Case 1: when $y=0$ then $x=0$ therefore $f(0,0)=\\simplify{{{a}^2}}$
Case 2: when $\\lambda=1$ then $y\\ne0$ therefore:
\\begin{align}
2(x-\\var{a})&=-\\var{b} \\\\
x-\\var{a}&=-\\simplify{{b}/2} \\\\
x&= \\simplify{{-{{b}+{2*a}}}/{2}}
\\end{align}
Now substituting $x=\\simplify{{-{{b}+{2*a}}}/{2}} $ into $f(x,y)$ we get :
\\begin{align}
\\simplify{{b^2}/4}+y^2=0
\\end{align}
This is not possible. Hence Case 2 does not occur.
The shortest distance is therefore $\\simplify{{{a}^2}}$.
$\\simplify{{b^2}/4}$
", "metadata": {"description": "", "licence": "None specified"}, "rulesets": {}, "functions": {}, "ungrouped_variables": ["a", "b", "n"], "tags": [], "type": "question"}, {"name": "Q7-Find the points that give the greatest and least distances from a point to the sphere.", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Amna Shah", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1167/"}], "advice": "The square of the distance between $(x,y,z)$ to the point $(\\var{a},\\var{b},\\var{-a})$ is $f(x,y,z)=(x-\\var{a})^2+(y-\\var{b})^2+(z+\\var{a})^2$
Here is the system of equations simplified we need to solve:
\\begin{align}
(x-\\var{a})&=\\lambda x \\tag{1} \\\\
(y-\\var{b})&=\\lambda y \\tag{2} \\\\
(z+\\var{a})&=\\lambda z \\tag{3} \\\\
x^2+y^2+z^2&=\\var{c} \\tag{4}
\\end{align}
Equations (1)-(3) imply $x,y,z \\ne 0$.
Making $\\lambda$ the subject and setting them equal to each other gives $z=-x$ and $y=\\simplify{{b}x/{a}}$.Plugging this into equation (4) gives us :
\\begin{align}
x=\\pm\\simplify{{a^2}*{c}/{{{2{a^2}}+{b^2}}}}
\\end{align}
Therefore we have two cases.
Case 1:
$x=\\simplify{{a^2}*{c}/{{{2{a^2}}+{b^2}}}}$,$y=\\simplify{{{b}*{a^2}}*{c}/{{{2{a^3}}+{a*b^2}}}}$ and $z=\\simplify{-{a^2}*{c}/{{{2{a^2}}+{b^2}}}}$.
Case 2:
$z=\\simplify{-{a^2}*{c}/{{{2{a^2}}+{b^2}}}}$,$y=\\simplify{{{-b}*{a^2}}*{c}/{{{2{a^3}}+{a*b^2}}}}$ and $z=\\simplify{{a^2}*{c}/{{{2{a^2}}+{b^2}}}}$.
Finally substituting the above cases into $f(x,y,z)=(x-\\var{a})^2+(y-\\var{b})^2+(z+\\var{a})^2$ we know the greatest distance is given by the points shown in case 2 and therefore the least is given by case 1.
\n\n\n", "metadata": {"description": "", "licence": "None specified"}, "variablesTest": {"condition": "", "maxRuns": 100}, "tags": [], "parts": [{"variableReplacements": [], "gaps": [{"expectedvariablenames": [], "variableReplacementStrategy": "originalfirst", "answer": "1", "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": 1, "variableReplacements": [], "vsetrange": [0, 1], "answersimplification": "all", "checkvariablenames": false, "scripts": {}, "checkingaccuracy": 0.001, "vsetrangepoints": 5, "showpreview": true, "type": "jme", "checkingtype": "absdiff"}, {"expectedvariablenames": [], "variableReplacementStrategy": "originalfirst", "answer": "{b}", "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": 1, "variableReplacements": [], "vsetrange": [0, 1], "answersimplification": "all", "checkvariablenames": false, "scripts": {}, "checkingaccuracy": 0.001, "vsetrangepoints": 5, "showpreview": true, "type": "jme", "checkingtype": "absdiff"}, {"expectedvariablenames": [], "variableReplacementStrategy": "originalfirst", "answer": "{1}", "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": 1, "variableReplacements": [], "vsetrange": [0, 1], "answersimplification": "all", "checkvariablenames": false, "scripts": {}, "checkingaccuracy": 0.001, "vsetrangepoints": 5, "showpreview": true, "type": "jme", "checkingtype": "absdiff"}], "showFeedbackIcon": true, "prompt": "
$x-\\var{a}$ = [[0]]$\\lambda x $
$y$ - [[1]]= $\\lambda y$
$z+\\var{a}$ = [[2]]$\\lambda z $
The least distance is given by the points:
$x$ = [[0]]
$y$ = [[1]]
$z$ = [[2]]
The greatest distance is given by the points:
$x$ = [[0]]
$y$ = [[1]]
$z$ = [[2]]
Use Lagrange multipliers to find the points that once evlauated into $f(x,y,z)$ will give the greatest and least distances from the point $(\\var{a},\\var{b},\\var{-a})$ to the sphere with the equation $x^2+y^2+z^2=\\var{c}$.
Fill in the gaps of the system of equations that need to be solved.
$2y+2z$ = $\\lambda$ [[0]]
$2x+z$ = $\\lambda$ [[1]]
$2x+y$ = $\\lambda$ [[2]]
The dimensions that give minimal surface area are :
\nx = [[0]]
y = [[1]]
z = [[2]]
We need to minimise the surface area under the volume constraint. These constraints are as follows:
\\begin{align}
f(x,y,z)&=2xy+2xz+yz \\\\
g(x,y,z)&=xy-\\var{a}
\\end{align}
We need to solve the following system of equations:
\n\\begin{align}
2y+2z&= \\lambda yz \\tag{1} \\\\
2x+z&= \\lambda xz \\tag{2} \\\\
2x+y&= \\lambda xy \\tag{3} \\\\
xyz-\\var{a}&=0 \\tag{4}
\\end{align}
Making $\\lambda $ the subject and setting them equal to each other we get $y=2x $ and $y=z$. Substituting $y=2x $ and $y=z$ into the volume constriant gives us $y=\\simplify{{2*{a}}^(1/3)}$.Since we know $y=z$ we also know now that $y=\\simplify{{2*{a}}^(1/3)}$. As $y=2x$, $x=\\simplify{{2*{a}}^(1/3)/{{2}}} $.
Thus,
\\begin{align}
x=\\simplify{{2*{a}}^(1/3)/{{2}}} \\\\
y=\\simplify{{2*{a}}^(1/3)}\\\\
z=\\simplify{{2*{a}}^(1/3)}
\\end{align}
The goal is to maximise function $f(x,y)=\\var{b}x^\\frac{3}{2}y$ s.t to the constraint $g(x,y)=x+y=\\var{a}$
Here is the system of equations we need to solve:
\\begin{align}
\\simplify{{3*b}/2}x^\\frac{1}{2}y&=\\lambda \\tag{1} \\\\
\\var{b}x^\\frac{1}{2}&=\\lambda \\tag{2} \\\\
x+y&=\\var{a} \\tag{3}
\\end{align}
Since (1)=(2) and $x \\ne 0$,
\\begin{align}
\\simplify{{3*b}/2}x^\\frac{1}{2}y&=\\var{b}x^\\frac{1}{2}\\\\
y&=\\frac{\\var{b}x^\\frac{3}{2}}{\\frac{3}{2}\\var{b}x^\\frac{1}{2}} \\\\
y&=\\frac{2}{3}x \\tag{4}
\\end{align}
Now plug (4) into (3) to get x,
\\begin{align}
x+\\frac{2}{3}x&=\\var{a} \\\\
x&= \\simplify{{3*a}/5} \\tag{5}
\\end{align}
Now to find y we plug (5) into (4),
\\begin{align}
y&=\\frac{2}{3}\\times\\bigg(\\frac{3}{5}\\times\\var{a}\\bigg)\\\\
&=\\simplify{{2*a}/5} \\tag{6}
\\end{align}
Therefore £ $\\simplify{{3*a}/5}$ is spent on the development of the book and £ $\\simplify{{2*a}/5}$ is spent on the production of the book
+
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", "metadata": {"description": "", "licence": "None specified"}, "statement": "
[[0]] $x^{1/2}$$y$=$\\lambda$
[[1]] $x^{1/2}$=$\\lambda$
$x+y$ = [[2]]
You have not given your answer to the correct precision.
", "precision": 0, "showFeedbackIcon": true, "correctAnswerFraction": false, "variableReplacements": [], "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "prompt": "How much is spent on the development of the book?
", "marks": 0, "minValue": "{{2*a}/5}", "scripts": {}, "allowFractions": false}, {"precisionPartialCredit": "0", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "showPrecisionHint": true, "precisionType": "dp", "maxValue": "{{3*a}/5}", "strictPrecision": false, "precisionMessage": "You have not given your answer to the correct precision.", "precision": 0, "showFeedbackIcon": true, "correctAnswerFraction": false, "variableReplacements": [], "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "prompt": "How much is spent on the production of the book?
", "marks": 1, "minValue": "{{3*a}/5}", "scripts": {}, "allowFractions": false}], "functions": {}, "preamble": {"js": "", "css": ""}, "type": "question"}, {"name": "Q10-Find the dimensions of each run that maximizes the area", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Amna Shah", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1167/"}], "advice": "Let A denoted the area of each run. There are 10 sections of fences corresponding to width $x$ and 6 sections corresponding to the length $y$.
We wish to maximize $A=xy$ subject to the constraint $10x+10y=\\var{a}$. We need to find the absolute extrema for $x$ in [0,$\\simplify{{a}/{10}}$]
The system of equations we need to solve is:
\\begin{align}
y&=10 \\lambda \\tag{1} \\\\
x&=6 \\lambda \\tag{2} \\\\
10x+6y=\\var{a} \\tag{3} \\\\
\\end{align}
Rearranging equation (1) and (2) and setting $\\lambda$ equal to each other gives $y=\\frac{5x}{3}$. Now we must substitue this into (3) which gives us $x=\\simplify{{a}/{20}}$ft. Moreover substiuting $x=\\simplify{{a}/{20}}$ into $y=\\frac{5x}{3}$ gives $y=\\simplify{{a}/{12}}$.
Anna happens to acquire $\\var{a}$ft of fencing and decides to use it to start a kennel by building five adjacent rectangtular runs. Find the dimensions of each run that maximizes its area.
", "parts": [{"type": "gapfill", "marks": 0, "variableReplacementStrategy": "originalfirst", "gaps": [{"marks": 1, "checkingtype": "absdiff", "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "vsetrangepoints": "2", "expectedvariablenames": [], "type": "jme", "showpreview": true, "variableReplacementStrategy": "originalfirst", "checkingaccuracy": 0.001, "showCorrectAnswer": true, "answer": "10", "checkvariablenames": false, "vsetrange": [0, 1]}, {"marks": 1, "checkingtype": "absdiff", "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "vsetrangepoints": 5, "expectedvariablenames": [], "type": "jme", "showpreview": true, "variableReplacementStrategy": "originalfirst", "checkingaccuracy": 0.001, "showCorrectAnswer": true, "answer": "6", "checkvariablenames": false, "vsetrange": [0, 1]}, {"marks": 1, "checkingtype": "absdiff", "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "vsetrangepoints": 5, "expectedvariablenames": [], "type": "jme", "showpreview": true, "variableReplacementStrategy": "originalfirst", "checkingaccuracy": 0.001, "showCorrectAnswer": true, "answer": "{a}", "checkvariablenames": false, "vsetrange": [0, 1]}], "prompt": "$y$ = [[0]] $\\lambda$
$x$ = [[1]] $\\lambda$
$10x+6y$= [[2]]
Dimension of x = [[0]]
", "showFeedbackIcon": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacements": []}, {"type": "gapfill", "marks": 0, "variableReplacementStrategy": "originalfirst", "gaps": [{"marks": 1, "precisionType": "dp", "correctAnswerFraction": false, "showFeedbackIcon": true, "scripts": {}, "strictPrecision": false, "variableReplacements": [], "showPrecisionHint": true, "minValue": "{{a}/{12}}", "precisionMessage": "You have not given your answer to the correct precision.", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "maxValue": "{{a}/{12}}", "showCorrectAnswer": true, "precision": "2", "allowFractions": false, "precisionPartialCredit": 0, "correctAnswerStyle": "plain"}], "prompt": "Dimension of y = [[0]]
", "showFeedbackIcon": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacements": []}], "variable_groups": [], "metadata": {"description": "", "licence": "None specified"}, "variablesTest": {"maxRuns": 100, "condition": ""}, "ungrouped_variables": ["n", "a"], "preamble": {"js": "", "css": ""}, "functions": {}, "variables": {"n": {"templateType": "anything", "description": "", "name": "n", "group": "Ungrouped variables", "definition": "random(20..60)"}, "a": {"templateType": "anything", "description": "", "name": "a", "group": "Ungrouped variables", "definition": "2*n"}}, "type": "question"}]}], "duration": 2400, "percentPass": "80", "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "feedbackmessages": [], "intro": "", "allowrevealanswer": true, "advicethreshold": 0}, "metadata": {"description": "The test asseses the students ability to apply the Lagrange multiplier method to various calculus problems.
", "licence": "All rights reserved"}, "showQuestionGroupNames": false, "type": "exam", "contributors": [{"name": "Amna Shah", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1167/"}], "extensions": [], "custom_part_types": [], "resources": []}