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 )

# put points into x and y variables
x <- c(5.6,6.3,7,7.7,8.4)
y <- c(8.8,12.4,14.8,18.2,20.8)
# build regression model
regr_mod <- lm(y ~ x)
regr_mod
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     -14.800        4.257

Linear Regression Model: \(y = 4.26 * x - 14.8\)


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 - 6xy^2 - 8y^3\)

See plot below:

install.packages("emdbook", repos='https://mirrors.nics.utk.edu/cran/')
## Installing package into 'C:/Users/Lelan/Documents/R/win-library/3.4'
## (as 'lib' is unspecified)
## package 'emdbook' successfully unpacked and MD5 sums checked
## 
## The downloaded binary packages are in
##  C:\Users\Lelan\AppData\Local\Temp\RtmpkZoxK7\downloaded_packages
library(emdbook)
## Warning: package 'emdbook' was built under R version 3.4.3
curve3d(24*x - 6*x*y^2 - 8*y^3, xlim = c(-5,5), ylim = c(-5,5))

Start by taking the derivative with respect to \(x\) and with respect to \(y\):

\(\frac{d}{dx} = 24 - 6y^2\)
\(\frac{d}{dy} = -12xy - 24y^2\) or \(-12y(x + 2y)\)

Find values where \(\frac{d}{dx} = 0\) or \(24 - 6y^2 = 0\).
\(6y^2 = 24\), so \(y^2 = 4\), so \(y = -2\) or \(y = 2\).

Find values where \(\frac{d}{dy} = 0\) or \(-12y(2y + x) = 0\).
When \(y = -2\), then \(\frac{d}{dy} = -12y(x + 2y) = 24(x - 4) = 0\), so \(x = 4\).
When \(y = 2\), then \(\frac{d}{dy} = -12y(x + 2y) = -24(x + 4) = 0\), so \(x = -4\).
So the two critical points are \((4, -2)\) and \((-4, 2)\).

\(f_{xx} = \frac{d}{dx}(24 - 6y^2) = 0\) \(f_{yy} = \frac{d}{dy}(-12xy - 24y^2) = -12x - 48y\) \(f_{xy} = \frac{d}{dy}(\frac{d}{dx}) = \frac{d}{dy}(24 - 6y^2) = -12y\).

Use second derivative test for \((4, -2)\):
\(D = f_{xx}(x,y)f_{yy}(x,y) - f^2_{xy}(x, y) = (0 * 48) - (-24^2) = 576\). Since \(f_{xx}\) is zero, and \(D < 0\), then \((4, -2)\) is a saddle point, but not a relative extrema.

Use second derivative test for \((-4, 2)\):
\(D = f_{xx}(x,y)f_{yy}(x,y) - f^2_{xy}(x, y) = (0 * -48) - (-24^2) = -576\). Since \(f_{xx}\) is zero, and \(D < 0\), then \((-4, 2)\) is also a saddle point, but not a relative extrema.

Plugging in \(x\) and \(y\) to find \(z\) and displaying the saddle points in \(( x, y, z )\) form, we have:

\((4, -2, 64)\) and \((-4, 2, -64)\)


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 )\).

\(h =\) number of “house” brand units sold
\(n =\) number of “name” brand units sold

The revenue function is:

\(R = h(81 - 21x + 17y) + n(40 + 11x - 23y)\)

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(81 - 21x + 17y) + 4.1(40 + 11x - 23y) = 186.3 - 48.3x + 39.1y + 164 + 45.1x - 94.3y = \boldsymbol{350.3 - 3.2x - 55.2y}\)


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) = \frac{1}{6}x^2 + \frac{1}{6}y^2 + 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?.

If \(x\) is the umber of units produced in L.A., and \(y\) is the number of units produced in Denver, and there will be 96 total units produced, then \(x + y = 96\), which means \(x = 96 - y\) or \(y = 96 - x\).

Since \(C(x, y) = \frac{1}{6}x^2 + \frac{1}{6}y^2 + 7x + 25y + 700\) and we know \(y = 96 - x\), then \(C(x, y) = C(x, 96 - x)\). Substititing\(96 - x\) in for \(y\), we get:

\(= \frac{1}{6}x^2 + \frac{1}{6}(96 - x)^2 + 7x + 25(96 - x) + 700\) \(= \frac{1}{6}x^2 + \frac{1}{6}(9216 - 192x + x^2) + 7x + 2400 - 25x + 700\) \(= \frac{1}{6}x^2 + 1536 - 32x + \frac{1}{6}x^2 - 18x + 3100\) \(= \frac{1}{3}x^2 - 50x + 4636\)

We want to find the minima, so we find \(\frac{d}{dx}(\frac{1}{3}x^2 - 50x + 4636)\) and set it equal to zero:

\(C'(x) = \frac{2}{3}x - 50 = 0\) or \(2x = 150\) or \(x = 75\). If \(x = 75\), then \(y = 96 - x = 96 - 75 = 21\). So to minimize weekly cost, \(75\) units should be produced in L.A. and \(21\) units should be produced in Denver.


5. Evaluate the double integral on the given region.

\(\boldsymbol{\iint(e^{8x + 3y})dA; R: 2 \leq x \leq 4}\) and \(\boldsymbol{2 \leq y \leq 4}\)

Write your answer in exact form without decimals.

First we calculate \(\int_{2}^{4} e^{(8x + 3y)} dx\):

If we substitute \(u = 8x + 3y\) then \(dx = \frac{1}{8}du\), so \(\frac{1}{8}\int e^udu\).
Using the exponential rule and substituting back, we get \(\frac{1}{8}e^{(8x + 3y)}\) as the integral, so the definite integral is:

\(\frac{1}{8}e^{(32 + 3y)} - \frac{1}{8}e^{(16 + 3y)}\)

We now take the definite integral of the result with respect to \(y\):

\(\int_{2}^{4}(\frac{1}{8}e^{(32 + 3y)} - \frac{1}{8}e^{(16 + 3y)})dy\), or \(\int_{2}^{4}\frac{1}{8}e^{(32 + 3y)}dy - \int_{2}^{4}\frac{1}{8}e^{(16 + 3y)})dy\), or \(\int_{2}^{4}\frac{1}{24}e^{(32 + 3y)} - \int_{2}^{4}\frac{1}{24}e^{(16 + 3y)}\).

Evaluating the definite integrals:

\(= \frac{1}{24}(e^{44} - e^{38}) - \frac{1}{24}(e^{28} - e^{22})\)

Calculating in R:

# set e value
e <- exp(1)
# compute
answer <- ((e^44 - e^38)/24) - ((e^28 - e^22)/24)
# print without scientific notation
format(answer, scientific = FALSE)
## [1] "534155947497083840"