In this assignment we are going to solve equations and then try to visualize our solutions. You might have encountered the

I am really not in favor of 'story' problems which motivate some mathematics unless they really do come from some real life example because they tend to start to look artificial after a while. Here is a perfect example of such a story problem:

A firm uses $x$ units which costs $\$4$ per unit of chemical 1, and $y$ units of chemical 2 which costs $\$3$ per unit in making their product. Therefore their total costs is $4x+3y$. Say that it also takes twice as much of chemical 2 as chemical 1 so that we are restricted to $2x=y$. Moreover, with the input of $x$ and $y$ units of chemicals they can produce $x^{1/3} y^{1/2}$ units of the and the product is worth $\$10$. The total profit is $p(x,y) =$ revenue - costs $= 10 x^{1/3} y^{1/2} - (4x+3y)$.

Step 1: Maximize the profit equation subject to the constraint $2x = y$. That is, determine $x$ and $y$ which maximizes the function $p(x,y)$ subject to the constraint $2x=y$. I would like you to find this maximum by taking the derivative of $p(x,2x)$ and setting it to $0$ and finding any maxima and minima of the function. Convince yourself that this is in fact a maxima by plugging in other nearby values.

Step 2: Now graph the profit equation $z = p(x,y)$ as a surface in an appropriate range around this maximum point using

Step 3: Plot the point $(x, y, p(x,y))$ in three dimensions (you might want to use the command

Step 4: Graph the curve in three space consisting of points satisfying $2x=y$ and $z = p(x,y)$. You might want to use the function

Step 5: Display the surface, point and curve on the same graph as the

Step 1: You are to find the solution to the system of equations. \[ 2x - y = 0 \] \[ \frac{\partial}{\partial x} (p(x,y) - \lambda (2x-y)) =0 \] \[ \frac{\partial}{\partial y} (p(x,y) - \lambda (2x-y)) =0 \] for the three unknowns $x, y, \lambda$. This should give you the same $x$ and $y$ values as in the previous problem, but I want you to set up the system of equations and solve them as a Lagrange multiplier problem.

Step 2: Next I would like you to give a contour plot of the function $z = p(x,y)$ in the region around the maximum that you found.

Step 3: On the same graph, plot the line $y = 2x$ and the point $(x,y)$ where you found the maximum (this is a two dimensional representation of the graph that you produced in the previous problem).

You should open up a new worksheet and start from scratch. You will have to save your work in a file and upload that file on to the course moodle. Your solution should be a sequence of commands where it is easy to change the input string and after you execute the sequence of commands you should have the correct output string. Please add documentation to your worksheet to explain how it works. Just a few sentences is sufficient, but imagine that you were opening up the worksheet for the first time and wanted to know what it did. You will be marked down if what you write is not clear and coherent.

You should finish your assignment by Wednesday, October 31 by 11:59pm. Assignments submitted after this date will be assessed a penalty of 10% per day.