Lecture Notes 2: Review of Basic Calculus
The amount of calculus you need to know for this course is very small. But the parts that you do need to know will be used throughout the course, so it is important to be comfortable with it.
Differentiation of Polynomials
The derivative of a function is its rate of change at a particular point. The derivative of a function is basically just its slope, but extends the concept of slope to nonlinear functions which may have a different slope at different points along the function. The basic rule for the derivative of polynomial functions is as follows
𝑓𝑓(𝑥𝑥) = 𝑎𝑎𝑥𝑥𝑛𝑛 ⇒ 𝑓𝑓′(𝑥𝑥) =𝑑𝑑𝑓𝑓
𝑑𝑑𝑥𝑥 = 𝑎𝑎𝑎𝑎𝑥𝑥𝑛𝑛−1
For a few examples.
Function Derivative
𝑓𝑓(𝑥𝑥) = 𝑥𝑥3 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑= 3𝑥𝑥2
𝑓𝑓(𝑥𝑥) = 4𝑥𝑥3 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑= 4 ⋅ (3𝑥𝑥2) = 12𝑥𝑥2
𝑓𝑓(𝑥𝑥) = 6√𝑥𝑥 = 6𝑥𝑥1 2⁄ 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑= 3𝑥𝑥−1 2⁄ = 3 √𝑑𝑑
𝑓𝑓(𝑥𝑥) = 8𝑥𝑥 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑= 8
Also, the derivative of a sum of functions is just the derivative of each term in the sum separately. Note that the derivative of any constant function is equal to 0.
Function Derivative
𝑓𝑓(𝑥𝑥) = 3 + 12𝑥𝑥 − 𝑥𝑥2+1 2𝑥𝑥3
𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑= 12 − 2𝑥𝑥 + 3 2𝑥𝑥2
𝑓𝑓(𝑥𝑥) = 2𝑥𝑥(30 − 𝑥𝑥) = 60𝑥𝑥 − 2𝑥𝑥2 𝑑𝑑𝑑𝑑
Example: Profit-Maximization
Consider a perfectly competitive firm that sells its output at a market price of 𝑃𝑃 = 50 and has a total cost function of 𝑇𝑇𝑇𝑇 = 100 + 𝑞𝑞2 in order to produce 𝑞𝑞 units of output. How much output should this firm sell in order to maximize its profit?
To set up the profit function, remember that revenue is equal to price times quantity and profit is equal to total revenue minus total cost.
Π = 𝑇𝑇𝑇𝑇 − 𝑇𝑇𝑇𝑇
= 𝑃𝑃 ⋅ 𝑞𝑞 − (100 + 𝑞𝑞2)
= 50𝑞𝑞 − 100 − 𝑞𝑞2
The firm’s objective is to choose 𝑞𝑞 to maximize its profit. Remember that the maximum value of a function occurs where the derivative is equal to zero. Thus, to find the level of output that produces the maximum profit, we have to take the derivative of the profit function with respect to
𝑞𝑞 and set it equal to zero.
𝑑𝑑Π 𝑑𝑑𝑞𝑞 = 0 50 − 2𝑞𝑞 = 0 50 = 2𝑞𝑞
𝑞𝑞 = 25
Thus, in order to maximize its profit, this firm should produce 25 units of output.
How much profit does this firm actually earn? Well, it sells 25 units of output at $50 per unit, so the firm’s total revenue is
𝑇𝑇𝑇𝑇 = 𝑃𝑃𝑞𝑞 = 25 ⋅ 50 = $1250
We can plug into the total cost function to find the firm’s total cost.
𝑇𝑇𝑇𝑇 = 100 + 𝑞𝑞2 = 100 + 252 = $725
Thus, the firm’s total profit is
For a second example, let’s consider a monopoly firm with some price-setting power. The monopoly firm faces the demand curve 𝑃𝑃 = 12000 − 2𝑞𝑞. The monopoly can set its price, but the tradeoff is that there is an inverse relationship – higher prices lead to lower quantities sold. The monopoly faces the cost function 𝑇𝑇𝑇𝑇 = 392 + 2𝑞𝑞2. What price and output level should the firm set in order to maximize its profit?
Let’s first set up the profit function.
Π = 𝑇𝑇𝑇𝑇 − 𝑇𝑇𝑇𝑇
= 𝑃𝑃 ⋅ 𝑞𝑞 − (392 + 2𝑞𝑞2)
= (12000 − 2𝑞𝑞) ⋅ 𝑞𝑞 − (392 + 2𝑞𝑞2)
= 12000𝑞𝑞 − 2𝑞𝑞2− 392 − 2𝑞𝑞2
= 12000𝑞𝑞 − 4𝑞𝑞2− 392
We can now take the derivative of the profit function and set it equal to zero in order to find the level of output that maximizes the firm’s profit.
𝑑𝑑Π 𝑑𝑑𝑞𝑞 = 0 12000 − 8𝑞𝑞 = 0
𝑞𝑞 = 1500
We can then find the monopoly’s optimal price by substituting into the demand curve.
𝑃𝑃 = 12000 − 2𝑞𝑞 = 12000 − 2(1500) = 9000
This monopoly maximizes profit by setting its price at $9000 and selling 1500 units of output. It’s revenue is
𝑇𝑇𝑇𝑇 = 𝑃𝑃𝑞𝑞 = 9000 ⋅ 1500 = $13,500,000
We can find its production costs by substituting into the cost function.
𝑇𝑇𝑇𝑇 = 392 + 2𝑞𝑞2 = 392 + 2(15002) = $4,500,392
Example: Elasticity
The price elasticity of demand is the percentage change in quantity demanded for each 1% increase in price. In other words, if the elasticity of demand for a product is −4, what this means is that each 1% increase in price results in a 4% decline in sales (quantity demanded).
The formula for a price elasticity is
𝜀𝜀 = % change quantity% change price
For example, if a basketball team raises ticket prices by 15% and its ticket sales decline by 30%,
then its elasticity is 𝜀𝜀 =−30%
+15% = −2. In other words, each 1% increase in ticket price resulted in a 2% decline in ticket sales.
• When the price elasticity is between 0 and −1, demand is inelastic. When demand is inelastic, price changes lead to small changes in demand.
• When the price elasticity is between −1 and −∞, demand is elastic. When demand is elastic, price changes lead to large changes in demand.
• When 𝜀𝜀 = 0 demand is perfectly inelastic. In this case, the demand curve is vertical – price changes do not change quantity demanded.
• When 𝜀𝜀 = −∞ demand is perfectly elastic. In this case, the demand curve is horizontal – the firm cannot raise its price even a small amount or it loses all its sales
One important application is the relationship between elasticity and revenue. When demand is inelastic, price increases will raise the firm’s revenue since the change in sales is small. But when demand is elastic, increasing the price will reduce the firm’s revenue since the firm loses many sales when it raises the price.
For calculating price elasticities, remember that percentage change in any variable 𝑥𝑥 is Δ𝑑𝑑
𝑑𝑑. Thus, elasticity is:
𝜀𝜀 = Δ𝑞𝑞
𝑞𝑞 Δ𝑃𝑃
𝑃𝑃
𝜀𝜀 =Δ𝑞𝑞𝑞𝑞 ⋅Δ𝑃𝑃𝑃𝑃
= Δ𝑃𝑃 ⋅Δ𝑞𝑞 𝑃𝑃𝑞𝑞
But the change in demand (Δ𝑞𝑞) relative to the change in price (Δ𝑃𝑃), defined at a single point, is exactly the definition of the derivative. So the proper formula for calculating an elasticity is:
𝜀𝜀 =d𝑃𝑃 ⋅d𝑞𝑞 𝑃𝑃𝑞𝑞
For example, consider the demand curve 𝑄𝑄 = 100 − 2𝑃𝑃. Note that the derivative of this demand
curve with respect to price is constant: 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 = −2.
• At a price of $10, the quantity demanded is 𝑄𝑄 = 100 − 2 ⋅ 10 = 80. Using the formula, the elasticity at this price is:
𝜀𝜀 =d𝑃𝑃 ⋅d𝑞𝑞 𝑃𝑃𝑞𝑞
= −2 ⋅ �1080� = −0.25
• At a price of $40, the quantity demanded is 𝑄𝑄 = 100 − 2 ⋅ 40 = 20. Again, using the formula, the elasticity at this price is:
𝜀𝜀 = d𝑞𝑞d𝑃𝑃 ⋅𝑃𝑃𝑞𝑞
= −2 ⋅ �4020� = −4
Partial Derivatives
Often in economics, the functions that we consider are functions of multiple variables. For example, a firm’s profit might depend on its output of two different products or it might depend on its own output and also the output of a rival firm.
For functions of many variables, the partial derivative is simply the derivative with respect to one of these variables. Partial derivatives obey the same laws as ordinary differentiation. We simply hold the other variables constant. In other words, if a function depends on both 𝑥𝑥 and 𝑦𝑦, then in order to take the partial derivative with respect to 𝑥𝑥, we simply treat 𝑦𝑦 (and any function of 𝑦𝑦) as a constant and use the same ordinary rules of differentiation with respect to 𝑥𝑥. Here are some examples.
Function Partial Derivative w/rt x
𝑓𝑓(𝑥𝑥) = 12 + 4𝑥𝑥2 + 3𝑦𝑦2 𝜕𝜕𝑑𝑑
𝜕𝜕𝑑𝑑 = 8𝑥𝑥
𝑓𝑓(𝑥𝑥) = 3𝑥𝑥2+ 5𝑥𝑥𝑦𝑦 + 3𝑦𝑦2 𝜕𝜕𝑑𝑑
𝜕𝜕𝑑𝑑 = 6𝑥𝑥 + 5𝑦𝑦
𝑓𝑓(𝑥𝑥) = 4𝑥𝑥4𝑦𝑦6 𝜕𝜕𝑑𝑑
𝜕𝜕𝑑𝑑 = 16𝑥𝑥3𝑦𝑦6
𝑓𝑓(𝑥𝑥) = 4𝑥𝑥3𝑦𝑦2+ 13𝑥𝑥 + 12𝑦𝑦 − 4𝑥𝑥𝑦𝑦2 𝜕𝜕𝑑𝑑
𝜕𝜕𝑑𝑑 = 12𝑥𝑥2𝑦𝑦2+ 13 − 4𝑦𝑦2
𝑓𝑓(𝑥𝑥) = 100𝑥𝑥 − 4𝑥𝑥2 − 4𝑥𝑥𝑦𝑦 𝜕𝜕𝑑𝑑
Exercises
Problem 1
Calculate the partial derivative of each function with respect to 𝑥𝑥.
a. 𝑓𝑓(𝑥𝑥, 𝑦𝑦) = 100 + 3𝑥𝑥 + 4𝑦𝑦 − 12𝑥𝑥2− 12𝑦𝑦2+ 3𝑥𝑥𝑦𝑦 + 5𝑥𝑥2𝑦𝑦 + 13𝑥𝑥𝑦𝑦2+ 2𝑥𝑥2𝑦𝑦2 b. 𝑓𝑓(𝑥𝑥, 𝑦𝑦) = 60 + 3𝑥𝑥3𝑦𝑦2+1
2𝑥𝑥2𝑦𝑦3 c. 𝑓𝑓(𝑥𝑥, 𝑦𝑦) = 𝑥𝑥(120 − 2𝑥𝑥 − 2𝑦𝑦) − 4𝑥𝑥
Problem 2
Consider a monopoly facing a demand curve of 𝑃𝑃 = 10 − 0.1𝑞𝑞 and which has a total cost function of 𝑇𝑇𝑇𝑇 = 2𝑞𝑞 + 0.1𝑞𝑞2.
a. What are the profit-maximizing price and output level for the monopolist? b. Calculate the consumer surplus at the price in (a).
Problem 3
Consider a perfectly competitive firm that faces a market price of $2000. Its total cost function is
given by 𝑇𝑇𝑇𝑇 = 800𝑞𝑞 − 5𝑞𝑞2+1
3𝑞𝑞3. Find the profit-maximizing level of output for this firm.
Problem 4
A firm grows apples (A) and bananas (B). It sells apples for $20 each and it sells bananas for $18 each. Its cost of growing 𝐴𝐴 apples is 𝐴𝐴2. Its cost of growing 𝐵𝐵 bananas is 3𝐵𝐵2.
a. Write out the firm’s total profit function, including both fruits.
b. How many apples and bananas should the firm grow in order to maximize profit
Problem 5
A beekeeper keeps ℎ hives of bees and his total profit is Π𝐵𝐵 = 10ℎ −1
2ℎ2. A neighboring farmer grows 𝑡𝑡 apple trees and his total profit is Π𝐹𝐹 = 2𝑡𝑡 −1
2𝑡𝑡2+ ℎ. Notice that the bee hives create a positive externality because they pollinate the farmer’s trees.
a. If the beekeeper and the farmer act separately, what levels of ℎ and 𝑡𝑡 will they choose? b. If the beekeeper and the farmer merge into a single firm and act to maximize their total