# Lesson 4: Maximizing Profit in Two Markets

In Lesson 1, we considered the problem of maximizing profit in the context of declining market price. We solved this problem by finding where the derivative of the profit function was zero. In Lesson 3, we saw that if there are two markets, the profit is a function of two variables, which puts it beyond the scope of your single-variable calculus course.

Let's see how to use Maple to find the minimum and maximum values of a function of two variables.

# The Mathematical Model

Let's consider the problem of selling steel barrels in the US and Canada. Thanks to the North American Free Trade Agreement, we'll centralize production at a facility in Sarnia, Ontario, and ship barrels into the US without any trouble. We'll work in US dollars throughout.

Our fixed costs are $10,000, and each of our barrels costs$3.50 to produce. Our market research tells us that, initially, the market price per steel barrel in the US is $97, and the market price per steel barrel in Canada is$85.

As in Lesson 1, we expect that selling barrels in the US will drop the market price in the US; for this example let's say that drop is $0.10 per barrel sold. Similarly, we expect that selling barrels in Canada will drop the market price in Canada; let's say that drop is$0.07 per barrel sold.

Again, thanks to NAFTA, the two markets do interact. So each barrel sold in the US will drop the Canadian market price, and each barrel sold in Canada will drop the US market price. Let's organize all this information into a table:

 market initial market price price response in Canada price response in US Canada $85 -$0.07 per b. sold in Canada -$0.02 per b. sold in Canada US$97 -$.01 per b. sold in the US -$0.10 per b. sold in the US

Our goal will be to maximize profit. Recall that

so we should first derive symbolic expressions for revenue and cost.

screencast: using Maple to translate these word equations into symbolic equations

Let's use the following symbols:

# Takeaways/Deliverables

To say you've successfully completed this lesson, you should be able to do the following:

1. Define functions in Maple using function notation.
2. Visualize a function of two variables using Maple's plot3d and contourplot commands.
3. Use Maple to take partial derivatives.
4. Solve a system of algebraic equations using Maple's solve command.
5. Use the above skills to optimize a function of two variables.

These skills are what you'll need to complete the WebAssign homework for this Lesson.