2.6 Optimization

Plot[(x-1)*(x+2)*x,{x,-2,1}]

Example 2.12

Two formulas, one for growth of a forest G as a function of stand age A, and yield of a forest Y as a function of stand age A.
G(A) = 32 (A^(-2))(e^(10-32/A))
Y(A) = (e^(10-32/A))
Here G and Y are measured in cubic feet per acre per year, and A is measured in years.

G[A_]:=32*(A^(-2))(E^(10-32/A))

Y[A_]:=(E^(10-32/A))

Part 1

Plot[G[A],{A,0.00,60},AxesLabel->{"age (years)","growth ((ft^3)/acre/year)"}]

Part 2

From looking at the graph above, the maximum appears to occur near A=15 years.

N[Maximize[{G[A], A>0},A]]

Using the Maximize command, we see that growth is maximized at A=16 years.

Part 3

Plot[Y[A],{A,0.00,32},AxesLabel->{"age (years)","yield ((ft^3)/acre/year)"}]

Part 4

Maximum growth of the forest at t=16 years happens to be an inflection point for yield, as that is where the greatest increase in yield will occur.

Exercise 5

A cannonball’s trajectory once fired from a cannon is represented by the function y=x(Sqrt[3])-160(x^2)/297 where x is the horizontal distance, and y the vertical distance, both measured in miles.

y[x_]:=x(Sqrt[3])-160(x^2)/297

Part a.

Plot[y[x],{x,0,3.3},AxesLabel->{"h dist (miles)", "v dist (miles)"}]

Part b.

NSolve[y[x]==0,x]

We can look at the graph above, or use the NSolve command which gives us a much better approximation.  We see the cannonball goes 3.22 miles downrange.

Part c.

N[Maximize[{y[x],x>0},x]]

We use the Maximize command to find where y(x) attains its maximum.  Thus happens 1.61 miles downrange, and the maximum height is 1.39 miles.  This agrees with the graph from Part a as well.

Exercise 22

Balance B of a health plan (in millions of dollars) is a function of the number of years, t, the plan was instituted.  The model is given by: 
B(t) = 60+7t-50(e^(0.1t))

Clear[B]

B[t_]:= 60+7t-50(E^(0.1t))

Part a.

Plot[B[t],{t,0,7},AxesLabel->{"t (years)","Balance (mil $)"}, PlotRange->{{0,7},{0,14}}]

Part b.

N[Maximize[{B[t],t>0},t]]

Maximum balance of the plan is $13.55 million dollars 3.37 years after it was instituted.

Part c.

From looking at the graph, the minimum balance occurs at an endpoint which is 7 years.

B[7]

B[0]