2.2 Graphs

Example 2.3

Here we have a function of three variables, labor production P=P(w,h,I), where w is the number of workers working h hours per day producing I items:

P[w_,h_,It_]:=(It/(w*h))

P[5,2,3]

N[%]

Part 1

Here we let I = 750 and h = 8

P[w,8,750]

N[P[7,8,750]]

Plot[P[w,8,750],{w,2,10}, AxesLabel->{"workers","Productivity"}]

By looking at the graph above, we notice that the function is decreasing as the number of workers increases, thus productivity will decrease as more workers are added. Conversely, reducing the number of workers appears to increase productivity.

Part 2

Here we let w=5 and h=8

P[5,8,It]

Plot[P[5,8,It],{It,500,1000}, AxesLabel->{"Items Produced","Productivity"}, PlotRange->{{500,1000},{0,30}}]

By looking at the formula for P(5,8,I) = (I/40), we notice that this is a line with slope m = (1/40) which is positive.  So as the number of items is increased, productivity increases, as can be seen in the graph above.

Example 2.4

Cholesterol (in mg/dl) as a function of time t in months has the formula C(t) = 235 - 105(e^(-0.3t)) for a specific individual.

Part 1

Ch[t_] = 235-105*(E^(-0.3t))

Plot[Ch[t],{t,0,12}, AxesLabel->{"time (months)", "Cholesterol (mg/dl)"}]

Part 2

Plot[{Ch[t],200},{t,0,12}, AxesLabel->{"time (months)", "Cholesterol (mg/dl)"}]

NSolve[Ch[t]==200,t,Reals]

There is definitely a concern that the level will break 200, and numerically, this time is approximately 3.7 months.

Part 3

{Ch[50],Ch[100], Ch[200]}

It appears that the limit is 235 mg/dl

Plot[{Ch[t],235},{t,0,12}, AxesLabel->{"time (months)", "Cholesterol (mg/dl)"}]

Part 4

The graph is concave down, which means that even though the cholesterol levels are increasing, the rate of increase slows down, which makes sense, as there can only be so much cholesterol in your bloodstream.

Exercise 3

This problem involves a formula for equity in your home.  The formula is:
E(k) = ((P((((1+r))^k)-1))/((((1+r))^t)-1))
Where E is the equity in $, P is the mortgage amount (in $), r is the monthly interest rate (as a decimal), t is the number of months in the mortgage, and k is the number of payments made so far.

For this example, P = $200,000, r = .06/12= .005, and t = 360 months.

Eq[k_]:=((P*((((1+r))^k)-1))/((((1+r))^t)-1))/.{P-> 200000,r-> 0.005,t-> 360}

Eq[k]

Part a.

Plot[Eq[k],{k,0,360},AxesLabel->{"k months","Equity ($)"}, PlotRange->{{0,360},{0,200000}}]

Part b.

The function is increasing, which is good.  As we make payments, we gain equity in our house!

Part c.

Plot[{100000,Eq[k]},{k,0,360},AxesLabel->{"k months","Equity ($)"}, PlotRange->{{0,360},{0,200000}}]

NSolve[Eq[k]==100000,k,Reals]

Since the graph is concave up, i.e. the rate of increase is increasing, to get to 1/2 the value of the house back in equity we will have to be more than half way through the term of the loan.  Using the NSolve command, we see it is about 252 months into the 260 month loan.

Exercise 11

Its bake potato time!  We put a potato in a preheated oven, and the potatoes internal temperature is given by the formula:
P(t) = 400-325(e^(-t/50))
Here t is measured in minutes, and P measured in degrees Fahrenheit.

P[t_] :=400-325*(E^(-t/50))

Part a.

Plot[P[t],{t,0,120},PlotRange->{{0,120},{0,400}}]

Part b.

Initial temperature is P(0) = 75 F, which is done by the following calculation:

P[0]

Part c.

Since the graph is concave down, the potatoes temperature rises faster during the first 30 minutes over the second 30 minutes.  We compute the average rates of change over these time intervals:

N[(P[30]-P[0])/(30-0)]

N[(P[60]-P[30])/(60-30)]

The average rate of change in the temperature over the first 30 minutes is 4.9 degrees F/min, while over the second 30 minutes is 2.7 degrees F/min.