// 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}, "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": "

\n

Let $g(x,y,z)=x^2+y^2+z^2=\\var{b^2}$
The system of equations we need to solve:

\n

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

\n

Case 1
Since $y=0$ and $x=0$ we have two potential extremas at $(0,0,\\var{b})$ and$(0,0,\\var{-b})$.

\n

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

\n

", "metadata": {"description": "", "licence": "None specified"}, "statement": "

#### Find the absolute maximum and absolute minimum of $f(x,y)= y^2-\\var{a}z$  subject to the constraint $x^2+y^2+z^2=\\var{b^2}$ using the Lagrange multiplier method.

", "ungrouped_variables": ["b", "a"], "tags": [], "variable_groups": [], "parts": [{"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": "1", "scripts": {}}], "prompt": "

$\\lambda$ = []

", "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 maximum = []

\n

", "marks": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "alwaysreplace", "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": "{{-a}*{b}}", "scripts": {}}], "prompt": "

Absolute minimum = []

", "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}, "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}}$.

\n

\n

This question assesses the students ability to solve a function subject to two constraints

", "licence": "None specified"}, "statement": "

#### Find the absolute maxima and absolute minima of $f(x,y)=\\var{c}xy+\\var{a}$ subject to the constraint $x^2+y^2=\\var{b^2}$ using the Lagrange multiplier method.Fill in the gaps for the system of equations that need to be solved.

\n", "ungrouped_variables": ["a", "c", "n", "b"], "tags": [], "variable_groups": [], "parts": [{"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": "2z", "scripts": {}}, {"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}}", "scripts": {}}, {"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}}", "scripts": {}}, {"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": "2y", "scripts": {}}], "prompt": "

$\\var{c}y$= []$\\lambda$
[]x    =[]$\\lambda$
$x^2$+$y^2$=[]

\n

", "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 = []

", "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 = []

\n

", "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}, "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}}$.

\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

\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

\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

\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

", "rulesets": {}, "parts": [{"type": "gapfill", "showFeedbackIcon": true, "marks": 0, "variableReplacementStrategy": "originalfirst", "prompt": "

$\\var{a}y$=$\\lambda$[]$x$
[]$x$=$\\lambda$[]$y$
$x^2+y^2$=[]

", "gaps": [{"expectedvariablenames": [], "showFeedbackIcon": true, "marks": 1, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false, "showpreview": true, "showCorrectAnswer": true, "checkingaccuracy": 0.001, "answer": "2", "type": "jme", "vsetrange": [0, 1], "scripts": {}, "vsetrangepoints": 5, "checkingtype": "absdiff", "variableReplacements": []}, {"expectedvariablenames": [], "showFeedbackIcon": true, "marks": 1, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false, "showpreview": true, "showCorrectAnswer": true, "checkingaccuracy": 0.001, "answer": "2", "type": "jme", "vsetrange": [0, 1], "scripts": {}, "vsetrangepoints": 5, "checkingtype": "absdiff", "variableReplacements": []}, {"expectedvariablenames": [], "showFeedbackIcon": true, "marks": 1, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false, "showpreview": true, "showCorrectAnswer": true, "checkingaccuracy": 0.001, "answer": "{b}", "type": "jme", "vsetrange": [0, 1], "scripts": {}, "vsetrangepoints": 5, "checkingtype": "absdiff", "variableReplacements": []}, {"expectedvariablenames": [], "showFeedbackIcon": true, "marks": 1, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false, "showpreview": true, "showCorrectAnswer": true, "checkingaccuracy": 0.001, "answer": "{a}", "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 maximum = []

", "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 = []

", "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}, "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}$

\n

\n

", "statement": "

#### Optimize $f(x,y,z)= \\var{a}x+y+\\var{a}z$ s.t $g(x,y,z)=x+y-z$ and $h(x,y,z)=x^2+z^2=1$.Fill in the gaps.

\n\n

Note: $\\nabla f(x,y,z)=\\lambda \\nabla g(x,y,z) +\\mu \\nabla h(x,y,z)$

\n
##### If your answer includes a square root input it as e.g x^(1/2).
", "functions": {}, "ungrouped_variables": ["n", "a"], "variable_groups": [], "tags": [], "preamble": {"js": "", "css": ""}, "variables": {"n": {"definition": "random(1..10)", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "a": {"definition": "2*n", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}}, "variablesTest": {"maxRuns": 100, "condition": ""}, "parts": [{"prompt": "

\n

$\\mu$ = []
$\\mu$ = - []

", "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": "{{a}-1}/(2)^(1/2)", "checkingaccuracy": 0.001}, {"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": "-{{a}-1}/(2)^(1/2)", "checkingaccuracy": 0.001}], "marks": 0, "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "variableReplacements": []}, {"prompt": "

Absolute maximum = []

", "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 = []

[]$e^{xy}$ = [] $\\lambda x$
[]$e^{xy}$ =[]  $\\lambda y$
$x^{2}+y^{2}$ = []

\n

"}, {"marks": 0, "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": "2", "answersimplification": "all", "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "marks": 1, "showCorrectAnswer": true, "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 maximum =$e$^[]

"}, {"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$^ []

"}], "ungrouped_variables": ["a", "b", "n"], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

#### Find the maximum and minimum values of the function $f(x,y)=e^{xy}$ subject to the constraint $x^\\var{a}+y^\\var{a}=\\simplify{{b^2}}$

\n\n
##### If your answer includes a square root input it as e.g. x^(1/2).
", "variables": {"n": {"name": "n", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..10)", "description": ""}, "a": {"name": "a", "templateType": "anything", "group": "Ungrouped variables", "definition": "2", "description": ""}, "b": {"name": "b", "templateType": "anything", "group": "Ungrouped variables", "definition": "2*n+1", "description": ""}}, "advice": "

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

", "preamble": {"css": "", "js": ""}, "type": "question"}, {"name": "Q6-Find the shortest distance betweent the point and the curve (two variables)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Amna Shah", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1167/"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "statement": "

#### Find the shortest distance between the point $(\\var{a},0)$ and the curve $y^2=\\var{b}x$Fill in the gaps of the system of equations that need to be solved.

", "variables": {"n": {"definition": "random(2..11)", "name": "n", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "b": {"definition": "2n+1", "name": "b", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "a": {"definition": "random(1..10)", "name": "a", "group": "Ungrouped variables", "description": "", "templateType": "anything"}}, "preamble": {"css": "", "js": ""}, "variable_groups": [], "parts": [{"showCorrectAnswer": true, "variableReplacements": [], "gaps": [{"showCorrectAnswer": true, "variableReplacements": [], "checkingtype": "absdiff", "expectedvariablenames": [], "checkingaccuracy": 0.001, "marks": 1, "answer": "{2}", "showpreview": true, "showFeedbackIcon": true, "scripts": {}, "vsetrangepoints": 5, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrange": [0, 1]}, {"showCorrectAnswer": true, "variableReplacements": [], "checkingtype": "absdiff", "expectedvariablenames": [], "checkingaccuracy": 0.001, "marks": 1, "answer": "{-b}", "showpreview": true, "showFeedbackIcon": true, "scripts": {}, "vsetrangepoints": 5, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrange": [0, 1]}, {"showCorrectAnswer": true, "variableReplacements": [], "checkingtype": "absdiff", "expectedvariablenames": [], "checkingaccuracy": 0.001, "marks": 1, "answer": "{2}", "showpreview": true, "showFeedbackIcon": true, "scripts": {}, "vsetrangepoints": 5, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrange": [0, 1]}, {"showCorrectAnswer": true, "variableReplacements": [], "checkingtype": "absdiff", "expectedvariablenames": [], "checkingaccuracy": 0.001, "marks": 1, "answer": "{b}", "showpreview": true, "showFeedbackIcon": true, "scripts": {}, "vsetrangepoints": 5, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrange": [0, 1]}], "scripts": {}, "prompt": "

[]$(x-\\var{a})$ = []$\\lambda$
[]$y$ = []$y\\lambda$
$y^2$- []$x=0$

", "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showFeedbackIcon": true, "marks": 0}, {"showCorrectAnswer": true, "variableReplacements": [], "gaps": [{"showCorrectAnswer": true, "variableReplacements": [], "checkingtype": "absdiff", "expectedvariablenames": [], "checkingaccuracy": 0.001, "marks": 1, "answer": "{{b^2}}", "showpreview": true, "showFeedbackIcon": true, "scripts": {}, "vsetrangepoints": 5, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrange": [0, 1]}], "scripts": {}, "prompt": "

Shortest distance is = []

", "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:

\n

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

\n

$\\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}, "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}}}}$.

\n

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}$ = []$\\lambda x$
$y$ - []= $\\lambda y$
$z+\\var{a}$ = []$\\lambda z$

", "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "marks": 0}, {"variableReplacements": [], "gaps": [{"expectedvariablenames": [], "variableReplacementStrategy": "originalfirst", "answer": "{{a^2*c}}/{{2*a^2+b^2}}", "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*a^2*c}}/{{2*a^3+a*b^2}}", "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": "-{{a^2*c}}/{{2*a^2+b^2}}", "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": "

The least distance is given by the points:
$x$ = []
$y$ = []
$z$ = []

", "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "marks": 0}, {"variableReplacements": [], "gaps": [{"expectedvariablenames": [], "variableReplacementStrategy": "originalfirst", "answer": "-{{a^2*c}}/{{2*a^2+b^2}}", "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*a^2*c}}/{{2*a^3+a*b^2}}", "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": "{{a^2*c}}/{{2*a^2+b^2}}", "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": "

The greatest distance is given by the points:
$x$ = []
$y$ = []
$z$ = []

", "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "marks": 0}], "variables": {"a": {"group": "Ungrouped variables", "name": "a", "templateType": "anything", "description": "", "definition": "random(2..3)"}, "b": {"group": "Ungrouped variables", "name": "b", "templateType": "anything", "description": "", "definition": "random(1..5)"}, "c": {"group": "Ungrouped variables", "name": "c", "templateType": "anything", "description": "", "definition": "random(1..4)"}}, "statement": "

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.

", "variable_groups": [], "rulesets": {}, "functions": {}, "preamble": {"css": "", "js": ""}, "ungrouped_variables": ["a", "b", "c"], "type": "question"}, {"name": "Q8-Find the dimensions of the box with minimal surface area", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Amna Shah", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1167/"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "statement": "

#### A rectangular box with no top has a volume of $\\var{a}cm^3$.Use Lagrange multipliers to find the dimension of the box.Fill in the gaps of the system of equations that need to be solved.

\n
##### If your answer includes a root for example a cube root then please input it as x^(1/3)
", "variables": {"a": {"definition": "random(10..25)", "name": "a", "group": "Ungrouped variables", "description": "", "templateType": "anything"}}, "preamble": {"css": "", "js": ""}, "variable_groups": [], "parts": [{"showCorrectAnswer": true, "variableReplacements": [], "gaps": [{"showCorrectAnswer": true, "variableReplacements": [], "checkingtype": "sigfig", "expectedvariablenames": [], "checkingaccuracy": "3", "marks": 1, "answer": "{yz}", "showpreview": true, "showFeedbackIcon": true, "scripts": {}, "vsetrangepoints": 5, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrange": [0, 1]}, {"showCorrectAnswer": true, "variableReplacements": [], "checkingtype": "absdiff", "expectedvariablenames": [], "checkingaccuracy": 0.001, "marks": 1, "answer": "{xz}", "showpreview": true, "showFeedbackIcon": true, "scripts": {}, "vsetrangepoints": 5, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrange": [0, 1]}, {"showCorrectAnswer": true, "variableReplacements": [], "checkingtype": "absdiff", "expectedvariablenames": [], "checkingaccuracy": 0.001, "marks": 1, "answer": "{xy}", "showpreview": true, "showFeedbackIcon": true, "scripts": {}, "vsetrangepoints": 5, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrange": [0, 1]}], "scripts": {}, "prompt": "

$2y+2z$ = $\\lambda$ []
$2x+z$ = $\\lambda$ []
$2x+y$ = $\\lambda$ []

\n

", "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showFeedbackIcon": true, "marks": 0}, {"showCorrectAnswer": true, "variableReplacements": [], "gaps": [{"showCorrectAnswer": true, "variableReplacements": [], "checkingtype": "sigfig", "expectedvariablenames": [], "checkingaccuracy": "3", "marks": 1, "answer": "{2*{a}}^(1/3)/2", "showpreview": true, "showFeedbackIcon": true, "scripts": {}, "vsetrangepoints": 5, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrange": [0, 1]}, {"showCorrectAnswer": true, "variableReplacements": [], "checkingtype": "absdiff", "expectedvariablenames": [], "checkingaccuracy": 0.001, "marks": 1, "answer": "{2*{a}}^(1/3)", "showpreview": true, "showFeedbackIcon": true, "scripts": {}, "vsetrangepoints": 5, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrange": [0, 1]}, {"showCorrectAnswer": true, "variableReplacements": [], "checkingtype": "absdiff", "expectedvariablenames": [], "checkingaccuracy": 0.001, "marks": 1, "answer": "{2*{a}}^(1/3)", "showpreview": true, "showFeedbackIcon": true, "scripts": {}, "vsetrangepoints": 5, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrange": [0, 1]}], "scripts": {}, "prompt": "

The dimensions that give minimal surface area are :

\n

x = []
y = []
z = []

", "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showFeedbackIcon": true, "marks": 0}], "advice": "

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}

\n

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

\n

Thus,

\\begin{align}
x=\\simplify{{2*{a}}^(1/3)/{{2}}} \\\\
y=\\simplify{{2*{a}}^(1/3)}\\\\
z=\\simplify{{2*{a}}^(1/3)}
\\end{align}

\n

", "metadata": {"description": "", "licence": "None specified"}, "rulesets": {}, "functions": {}, "ungrouped_variables": ["a"], "tags": [], "type": "question"}, {"name": "Q9-How much money should the editor allocate on the development and production to maximize sales?", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Amna Shah", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1167/"}], "variables": {"g": {"description": "", "group": "Ungrouped variables", "name": "g", "definition": "1000", "templateType": "anything"}, "f": {"description": "", "group": "Ungrouped variables", "name": "f", "definition": "random(1..12)", "templateType": "anything"}, "b": {"description": "", "group": "Ungrouped variables", "name": "b", "definition": "random(1..10)", "templateType": "anything"}, "a": {"description": "", "group": "Ungrouped variables", "name": "a", "definition": "g*f", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}, "advice": "

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

\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

\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

\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": "

\n

\n

#### Use the Lagrange multiplier method to find out how much money the editor should allocate on the development and production to maximize sales.Fill in the gaps of the system of equations that need to be solved.

\n

\n

", "ungrouped_variables": ["g", "f", "b", "a"], "tags": [], "variable_groups": [], "parts": [{"variableReplacements": [], "showCorrectAnswer": true, "type": "gapfill", "gaps": [{"answersimplification": "all", "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": "{{3*b}/2}", "scripts": {}}, {"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}", "scripts": {}}, {"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": "{a}", "scripts": {}}], "prompt": "

[] $x^{1/2}$$y$=$\\lambda$
[] $x^{1/2}$=$\\lambda$
$x+y$ = []

", "marks": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "scripts": {}}, {"precisionPartialCredit": 0, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "showPrecisionHint": true, "precisionType": "dp", "maxValue": "{{2*a}/5}", "strictPrecision": true, "precisionMessage": "

", "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}, "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}}$.

", "tags": [], "rulesets": {}, "statement": "

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$ = [] $\\lambda$
$x$ = [] $\\lambda$
$10x+6y$= []

", "showFeedbackIcon": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacements": []}, {"type": "gapfill", "marks": 0, "variableReplacementStrategy": "originalfirst", "gaps": [{"marks": 1, "precisionType": "dp", "correctAnswerFraction": false, "showFeedbackIcon": true, "scripts": {}, "strictPrecision": true, "variableReplacements": [], "showPrecisionHint": true, "minValue": "{{a}/{20}}", "precisionMessage": "You have not given your answer to the correct precision.", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "maxValue": "{{a}/{20}}", "showCorrectAnswer": true, "precision": "2", "allowFractions": false, "precisionPartialCredit": 0, "correctAnswerStyle": "plain"}], "prompt": "

Dimension of x = []

", "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 = []

", "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": []}