## Section2.3Nonlinear Functions

For most of this chapter we have restricted ourselves to functions that were either linear functions or polynomial functions where they are built from the interaction of linear functions. While this makes the economic models easier to understand, it is pretty clear that the situations we care about are often better described by more complicated functions. Suppliers of gasoline have a finite amount they can deliver regardless of the price. That leads to a very nonlinear supply function. It is worthwhile to review how we would enter other functions in a spreadsheet.

### Subsection2.3.1Algebraic Functions

We start with the algebraic functions that should be familiar from previous courses. These functions will let us use all the models that were mentioned in Chapter 1. For this table, we will assume the input to the function has been stored in cell A1.

 Algebraic Entry Spreadsheet Entry Notes $$f(x)=\sqrt{2x+7}$$ =SQRT(2*A1+7) * needed for multipliciation $$f(x)=\sqrt[3]{2x+7}$$ =(2*A1+7)^(1/3) other roots done as fractional exponents $$f(x)=x^4$$ =A1^4 $$f(x)=-x^4$$ =-(A1^4) Excel does negation before exponentiation $$f(x)=\ln(x)$$ =LN(A1) Log base $$e$$ or natural log $$f(x)=\log_{10}(x)$$ =LOG10(A1) Log base 10 or common log $$f(x)=\log_{2}(x)$$ =LOG(A1,2) Log to another base $$f(x)=1.06^x$$ =1.06^(A1) $$f(x)=e^x$$ =EXP(A1) $$f(x)=e^{(-x^2)}$$ =EXP(-(A1^2)) Parentheses needed for correct evaluation $$f(x)=|x|$$ =ABS(A1) Absolute value

Consider a demand function and why it is probably not linear. We expect demand to go up whenever we drop the price. However with a linear function, we get the same increase in demand by cutting the price in half, or if from half price we give the product away for free. A more reasonable model may be a power function where decreasing the price by a fixed percentage increases consumption by a fixed percentage. Similarly when we think about the supply function, we often expect the limits on available materials to make increasing the supply progressively more expensive.

#### Example2.3.1.Exponential Supply and Demand Price.

We are interested in selling gizmos. The most a consumer will pay is $1,000. If we drop the cost by 10% we increase demand by 100. The cheapest that a supplier will sell for is$200. We find the market will produce another 100 gizmos whenever we increase the price by 20%. Find the market equilibrium.

Solution.

We start by converting our information about supply and demand into equations, plugging the equations into Excel, and sketching a graph. We then use Goal Seek to find where the two equations are equal.

\begin{align*} \Dprice(\quantity)\amp =1000*(0.9)^{(\quantity/100)}\\ \Sprice(\quantity)\amp =200*(1.2)^{(\quantity/100)}\text{.} \end{align*}

We see that the equilibrium price is at $554.64. At that price the supply and demand will both be 559.45. #### Example2.3.3.Nonlinear Functions From Data. We have the following table of data for demand price and costs for our product.  Quantity 100 300 500 1000 1500 Demand Price$35.35 $21.63$17.25 $12.70$10.26 Costs $2347.67$5040.00 $7481.67$12469.67 16196.00 We have reason to believe that my demand price is a power function of some kind. Our cost function is close to linear, but we can get volume discounts and reduce the per-unit cost with larger quantities. Thus we expect my cost function is actually quadratic, with the quadratic term much smaller than the linear term. Find best fitting curves for cost and price. Derive functions for revenue and profit. Find break-even points between 10 and 1500. Solution. I start by finding best-fit curves of for cost and price. Thus we have: \begin{align*} \cost(q) \amp =-0.0028q^2+14.353q+968.13\\ \price(q) \amp =286.02 q^{-0.453}\text{.} \end{align*} Next, we follow our models to get equations for revenue and profit. \begin{align*} \revenue(q) \amp =q*\price(q)=q 286.02 q^{-0.453}=286.02 q^{0.547}\\ \profit(q) \amp = \revenue(q)-\cost(q)=286.02 q^{0.547}+0.0028q^2-14.353q-968.13\text{.} \end{align*} Finally, we load these equations back into Excel and use Goal Seek to find the break-even points. Looking at projected profit on the chart we see a sign change near 1000, so we suspect a break-even point there. We also note that profit seems to be going up until $$q$$ is about 300, so I test for a break-even point for small values of $$q\text{.}$$ We see we have break-even points when q is 12.74 and 996.28. ### Subsection2.3.2Discontinuous Functions All of the functions above have graphs without breaks. In mathematical terms, they are continuous functions. When we are modeling real world phenomena, we also want to use functions that have breaks in the graph. Paint is typically bought in gallon containers, so the price to paint a room is based on the number of gallons rounded up to the next whole number. Many businesses will give a volume discount to their best customers, so there is one price for small quantities and a different price for large quantities. The cost of labor changes if overtime pay is involved. In all of these cases the graph has a break in it. Excel has several discontinuous functions that are of use to us.  Function Example Value Notes ROUND ROUND(2.347,1) 2.3 2.35 would round to 2.4 ROUNDDOWN ROUNDDOWN(2.99,0) 2.0 0 for digits rounds to integers ROUNDUP ROUNDUP(-2.132,2) -2.14 Up is away from 0. CEILING CEILING(3.14159,1.5) 4.5 Rounds up to a multiple of 1.5 FLOOR FLOOR(3.14159,2) 2 Rounds down to a multiple of 2. IF IF($$2 \lt 1\text{,}$$5,10) 10 The condition is false. MIN MIN(1, 3, 5) 1 The minimum of a list of values. MAX MAX(1, 3, 5) 5 The maximum of a list of values. The functions ROUND, ROUNDUP, and ROUNDDOWN are all used for rounding. They have a second argument that specifies the number of digits to which we are rounding. It should be noted that Excel understands up and down as away from zero for negative numbers. Thus it will round $$-1.5$$ up to $$-2\text{.}$$ The CEILING and FLOOR functions also do rounding, but with some different features. Instead of specifying the number of digits in the answer, these functions round to a multiple of the second argument. As expected, CEILING rounds to the next higher multiple, and FLOOR rounds to the next lower multiple. #### Example2.3.6.Raw Materials in Blocks. The raw material needed to build widgets is sold in blocks that will make 100 widgets. A block costs1000. The labor cost for building a widget is $7. The fixed costs for widget production is$10,000. Find a formula for the costs of producing widgets. Find the cost of producing 998 and 1009 widgets. You should also find the cost per unit at those quantities.

Solution.

To make the worksheet easier to follow, we break costs into three pieces, fixed costs labor costs, and materials costs. The fixed coasts are constant, and the labor costs are linear. For the materials costs we need to use the CEILING function to round the number of widgets up to the next even 100, then divide by 100 to obtain the number of blocks of raw material we want to buy.

When we look at the numbers we see that the total cost of producing 998 widgets is $26,986 and the cost of producing 1009 widgets is$28,063. When we look at the unit costs, we expect the cost per unit to generally go down as we produce more, since the fixed costs are distributed over more units. However the per unit cost is $27.04 when we produce 998 widgets, but that goes up to$28.81 when we make 1009 widgets, since we had to buy another block of raw material.

The IF command is used when we use different formulas for different cases. Some easy examples are overtime pay, benefits costs, and volume discount. In many work situations employees are paid one rate up to a certain amount of work and a second rate for additional work. It is also common for full time employees to receive certain benefits, like retirement, that are not offered to part time employees. It is also common for certain industries to offer different rates for their biggest and best customers. The basic syntax of the IF command is:

IF(test condition, value if condition is true, value if condition is false)

The values for true and false can be numbers, string, or formulas to evaluate.

#### Example2.3.8.Computing Overtime Pay.

I am a bookkeeper at a small firm. Company policy pays the employees time and a half for working more than 40 hours per week. I need to compute the weekly pay of 5 employees. The employees worked 35, 42, 43, 38, and 42.5 hours. Their base pay rates were respectively $8,$9, $10,$11, and $12 an hour. Compute the pay for each employee. Solution. In setting up the worksheet, I will separate regular pay from overtime pay. The regular pay is the base rate times the hours worked, unless the employee worked more than 40 hours, in which case it is the base rate times 40. Overtime pay is the base pay times 1.5 times the number of overtime hours. Since overtime cannot be negative we use the maximum of 0 and hours worked minus 40. Looking at the computed values, the employees are owed$280, $387,$445, $418, and$525, respectively.

If our functions are discontinuous, we need to exercise a bit of care with our economic models and the points of interest we have been finding. The market equilibrium and break-even points are both places where two functions are equal. When the mathematics does not give us a clear answer we should think about the problem and consider what answer makes the most sense. Consider a simplified example to illustrate the point.

#### Example2.3.10.Market Equilibrium with Discontinuous Supply Price.

In the widget market the supply is constrained. Obtaining more than 2 widgets means using a more expensive process. My supply and demand curves are:

\begin{align*} \Dprice(q)=4-q/2\\ \Sprice(q)=\begin{cases} 1q/2+1&q\le 2\\ 1q/2+3&q>2\\ \end{cases}\text{.} \end{align*}

Find the market equilibrium price.

Solution.

We would like to find the place where the two curves cross. However when we look at a graph of the two functions we see that they never meet.

##### 2.

Given supply $$\price=10*(1.05)^{(q/10)}$$ and $$\Dprice=60*(0.96)^{(q/10)}\text{,}$$ with $$q_0=10\text{.}$$

##### 3.

Given $$p_s=5 \ln(q+10)$$ and $$p_d=1000/(q+10)-2\text{,}$$ with $$q_0=40\text{.}$$

Solution.

Formulas

Table

Goal Seek near $$q=40$$

1. At $$q_0=40\text{,}$$ supply = $19.56, and demand =$18

Gizmos cost $10 each for the first 9 on an order. The 10th through 49th gizmo cost$9 each. Additional gizmos beyond that each cost $8. Solution. Writing this in math terms: \begin{equation*} \text{Cost}=\begin{cases} 10x&x \le 9\\ 90+9(x-9)&10\le x\le 49\\ 450+8(x49)&x\ge 50\\ \end{cases} \end{equation*} or \begin{equation*} \text{Cost}=\begin{cases} 10x&x \le 9\\ 9+9x&10\le x\le 49\\ 58+8x&x\ge 50\\ \end{cases}\text{.} \end{equation*} 1. The Excel command is =IF(A2 < 10, 10*A2, IF(A2 < 50, 90+9*(A2-9),450+8*(A2-49))) 2. The graph is on the chart above. 3. Note that this function is only defined for integers so technically it is not a continuous function at all. If we use the same definition for all reals as long as the pieces change at 9 and 49. Note however that the slopes change at 9 and 49. ##### 14. Let $$f(x)$$ be the minimum of $$(x-50)^2/25$$ and 50. ##### 15. The cost of parking is$5 per hour rounded to the nearest half hour. For the chart of the values let x goes from 0 to 4 in steps of 0.2.

Solution.
1. The Excel command is =5*CEILING(A2,0.5)

2. The graph is on the chart above.

3. The graph is discontinuous at multiples of .5

#### Exercise Group.

Profit model with nonlinear models

For Exercise 2.3.3.16–2.3.3.24, given the equations of the cost and demand price function:

1. Find the revenue and profit functions.

2. Evaluate cost, demand price, revenue, and profit at $$q_0\text{.}$$

3. Find the first break-even point.

4. Graph the profit function over a domain that includes the first break-even point. Add a textbox and label to identify the break-even point.

##### 16.

Given $$\Dprice=30*(0.95)^{\quantity/10}$$ and $$\cost=3 \quantity+100\text{,}$$ with $$q_0=6\text{.}$$

##### 17.

Given $$\Dprice=40*(0.90)^{(q/10)}$$ and $$\cost=10 q+200\text{,}$$ with $$q_0=10\text{.}$$

Solution.
1. \begin{align*} \revenue \amp =q*40(0.90)^{q/10}\\ \profit \amp =q*40(0.90)^{q/10}-10q-200\text{.} \end{align*}
2. \begin{align*} \Dprice(10)\amp =40*(0.90)^{10/10} =36\\ \cost(10) \amp =10*10+200=300\\ \revenue(10)\amp =q*40(0.90)^{10/10}=36\\ \profit \amp =400(0.90)^{10/10}-300=60 \end{align*}
3. The first break-even point was found using Goal Seek and occurs when $$q = 7.4\text{.}$$

##### 18.

Given $$\Dprice =- q/10+50$$ and $$\cost=-2(q/1000)^2+10 q+1000\text{,}$$ with $$q_0=300\text{.}$$

##### 19.

Given $$\price=47*(0.96)^{(q/11)}$$ and $$\cost=-2(q/1000)^2+17 q+1234\text{,}$$ with $$q_0=59\text{.}$$

Solution.
1. \begin{align*} \revenue \amp =q*47(0.96)^{q/11}\\ \profit \amp =q*47(0.96)^{q/11}+2(\frac{q}{1000})^2-17q-1234 \end{align*}
2. Using Excel we get

3. Using $$q = 60$$ as the basis, using Goal Seek gives the value of our first break-even point as being 59.75.

##### 20.

Given demand price is an exponential function and cost is a quadratic function fitting the data below and that $$q_0=75\text{.}$$

 Quantity 100 130 160 190 220 250 Demand price 48 41 35 30 26 22 Cost 3000 3280 3560 3860 4160 4470
##### 21.

Given demand price is an exponential function and cost is a quadratic function fitting the data below and that $$q_0=300\text{.}$$

 Quantity 200 600 1000 1400 1800 2200 Demand price 190 171 155 140 126 114 Cost 30000 69600 109000 148000 186800 225200
Solution.

Using Excel trendlines, we use the polynomial of order 2 approximation for cost:

\begin{equation*} \cost = -0.0009x^2 + 99.864x + 10050\text{.} \end{equation*}

We use the exponential approximation for demand price:

\begin{equation*} \Dprice = 199.78e^{(-0.0003x)}\text{.} \end{equation*}
1. \begin{gather*} \revenue=x*199.78e^{(-0.0003x)}\\ \profit=x*199.78e^{(-0.0003x)}-(-0.0009x^2 + 99.864x + 10050)\text{.} \end{gather*}
2. Recreate the table, but now with the functions we found:

We can add another column to find the values of the respective functions when $$q_0=300\text{.}$$

Demand price = $182.59, cost =$39,928.20, revenue = $54,775.55 and profit =$14,847.35.

3. The initial table does not include the break-even points.

So we redo the table starting with q=0 and taking steps of 400. Goal Seek on the quantity q =0 reveals the first break even point to be at $$q = 107.27\text{.}$$

##### 22.

Given demand price is a linear function and cost is a quadratic function fitting the data below and that $$q_0=800\text{.}$$

 Quantity 200 600 1000 1400 1800 2200 Demand price 140 120 100 80 60 40 Cost 31600 52400 70000 84400 95600 103600
##### 23.

Given

\begin{equation*} \Dprice(q)=\begin{cases} 100-q/10&q \le 50\\ 95-q/20&q \gt 50\\ \end{cases} \end{equation*}

and

\begin{equation*} \cost(q)=\begin{cases} 3000+50q&q \le 100\\ 3000+47q&q \gt 100\\ \end{cases}\text{.} \end{equation*}

with $$q_0=200\text{.}$$

Solution.
1. \begin{align*} \revenue(q)=\begin{cases} q*100-q^2/10&q \le 50\\ 95q-q^2/20&q \gt 50\\ \end{cases}\\ \profit(q)=\begin{cases} q*100-q^2/10-50q-3000&q \le 50\\ 95q-q^2/20-50q-3000&50 \lt q \le 100\\ 95q-q^2/20-47q-3000&q \gt 100\\ \end{cases} \end{align*}
2. Cost = $12,400, demand price =$88, revenue = $17,600, and profit =$5200

3. The table shows that the breakeven point is close to $$q = 70\text{.}$$

Goal Seek shows it’s at $$q=72.5\text{.}$$

##### 24.

Given

\begin{equation*} \Dprice(q)=\begin{cases} 200-0.05q&q \le 50\\ 200-0.07q&q \gt 50\\ \end{cases} \end{equation*}

and

\begin{equation*} \cost(q)=\begin{cases} 4000+40q&q \le 100\\ 4000+37q&q \gt 100\\ \end{cases} \end{equation*}

with $$q_0=300\text{.}$$

mathstat.slu.edu/~may/ExcelCalculus/external/Examples/Section-2-3-Examples.xlsx