Problem 1
Find the equation of the regression line for the given points. Round any final values to the nearest hundredth, if necessary.
(5.6, 8.8), (6.3, 12.4), (7, 14.8), (7.7, 18.2), (8.4, 20.8)
x <- c(5.6, 6.3, 7, 7.7, 8.4)
y <- c(8.8, 12.4, 14.8, 18.2, 20.8)
df <- data.frame(cbind(x,y))
fit <- lm(y~x, data=df)
fit##
## Call:
## lm(formula = y ~ x, data = df)
##
## Coefficients:
## (Intercept) x
## -14.800 4.257
The formula is y = -14.8 + 4.257x
Thankfully the data are linear.
plot(x,y, xlim=c(-1,10), ylim=c(-15, 25))
abline(fit, col='blue')
abline(h=0, col='gray', lwd=2)
abline(h=-14.8, col='red', lty=2, lwd=2)
abline(v=0, col='gray', lwd=2)Problem 2
Find all local maxima, local minima, and saddle points for the function given below. Write your answer(s) in the form ( x, y, z ). Separate multiple points with a comma.
f(x,y) = 24x-6xy2-8y3
Find the partial derivatives (I’m using technology here):
fx(x,y) = -6y2+24
fy(x,y) = -24y2-12xy
Solve for zero:
-6y2+24=0, y = +/- 2
-24y2-12xy=0, x = +/ 4
Our four critical points are: (4,2), (-4,2), (4,-2), (-4,-2)
Find the second derivatives:
fxx(x,y) = 0
fyy(x,y) = -48y-12x
fxy(x,y) = -12y
Evaluate D = fxx(x0,y0)fyy(x0,y0) - f2xy(x0,y0):
D = 0 x (48y-12x) - (-12y)2 = 576
Relative minimum test: D > 0 but fxx(x0,y0) = 0, so P cannot be a minimum.
Relative maximum test: D > 0 but fyy(x0,y0) = 0, so P cannot be a maximum.
Saddle point test: since D is always > 0 none of the critical points are saddle points.
To see why this is the case, plot our function:
cone <- function(x, y){
24*x-6*x*y^2-8*y^3
}
x <- y <- seq(-6, 6, length=40)
z <- outer(x, y, cone)
persp(x, y, z, col='lightblue',
box=TRUE, main=expression(),
theta=4.5, phi=40,
d=1, r=2, ticktype='detailed',
axes=TRUE) -> res
points(trans3d(4,2, 0, pmat=res), col='blue', pch=16)
points(trans3d(-4,2, 0, pmat=res), col='blue', pch=16)
points(trans3d(-4,-2, 0, pmat=res), col='blue', pch=16)
points(trans3d(4,-2, 0, pmat=res), col='blue', pch=16)Problem 3
A grocery store sells two brands of a product, the “house” brand and a “name” brand. The manager estimates that if she sells the “house” brand for x dollars and the “name” brand for y dollars, she will be able to sell 81-21x+17y units of the “house” brand and 40+11x-23y units of the “name” brand.
Step 1. Find the revenue function R(x,y).
Revenue = units x price, so:
Rev(x,y) = x(81-21x+17y) + y(40+11x-23y) = -21x2-23y2+28xy+81x+40y
Step 2. What is the revenue if she sells the “house” brand for $2.30 and the “name” brand for $4.10?
R(2.3,4.1) = -21(2.3)2-23(4.1)2+28(2.3)(4.1)+81(2.3)+40(4.1)
= 116.62
Problem 4
A company has a plant in Los Angeles and a plant in Denver. The firm is committed to produce a total of 96 units of a product each week. The total weekly cost is given by
C(x,y) = 1/6x2 + 1/6y2 + 7x + 25y + 700,
where x is the number of units produced in Los Angeles and y is the number of units produced in Denver. How many units should be produced in each plant to minimize the total weekly cost?
This is a constrained optimization problem. Our constraint is that only 96 units can be produced in a week, so x+y = 96.
First, find the first-order derivatives for the cost function C(x,y) minus the constraint:
C(x,y) = 1/6x2 + 1/6y2 + 7x + 25y + 700 -\(\lambda\)(x+y-96)
fx(x,y) = \(\frac{x}{3}+7\) - \(\lambda\)
fy(x,y) = \(\frac{y}{3}+25\) - \(\lambda\)
Next, solve or \(\lambda\) and set terms equal to each other:
\(\lambda\) = x/3+7 , \(\lambda\) = y/3+25
x/3+7 = y/3+25
x = y+36, y = x-36
Substitute values into constraint equation:
96 = (y+36) + y; y = 30 units in Denver
96 = x + (x-36); x = 66 units in Los Angeles
Problem 5
Evaluate the double integral on the given region.
\(\iint _{ R }^{ }{ { e }^{ 8x+3y } } dA;\quad R:2\le x\le 4\quad and\quad 2\le y\le 4\)
Following the example on p. 792 of Grimstead, and using technology, take each integral in turn over the area:
\(\int _2^4\:\int _2^4\:e^{8x+3y}dxdy\)
\(\: \int _{ 2 }^{ 4 } \: e^{ 8x+3y }dy\quad =\quad \frac { 1 }{ 3 } { e }^{ 8x+3y }+C\quad =\quad \frac { 1 }{ 3 } { e }^{ 12+8x }-\frac { 1 }{ 3 } { e }^{ 6+8x }\quad =\quad \frac { { e }^{ 6 }-1 }{ 3 } { e }^{ 6+8x }\)
\(\int _{ 2 }^{ 4 } \frac { { e }^{ 6 }-1 }{ 3 } { e }^{ 6+8x }dx\quad =\quad \frac { { e }^{ 6 }-1 }{ 3 } \cdot \int _{ 2 }^{ 4 }{ e } ^{ 6+8x }dx\quad =\quad \frac { { e }^{ 6 }-1 }{ 24 } \cdot { e }^{ 6+8x }\ +C\)
\(=\quad \frac { { e }^{ 44 }-{ e }^{ 38 } }{ 24 } -\frac { { e }^{ 28 }{ -e }^{ 22 } }{ 24 } =\frac { { { e }^{ 44 }-{ e }^{ 38 }-e }^{ 28 }{ +e }^{ 22 } }{ 24 }\)