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)

y<-c(8.8,12.4,14.8,18.2,20.8)
X<-c(5.6,6.3,7,7.7,8.4)
model1<-lm(y~X)
summary(model1)
## 
## Call:
## lm(formula = y ~ X)
## 
## Residuals:
##     1     2     3     4     5 
## -0.24  0.38 -0.20  0.22 -0.16 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -14.8000     1.0365  -14.28 0.000744 ***
## X             4.2571     0.1466   29.04 8.97e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3246 on 3 degrees of freedom
## Multiple R-squared:  0.9965, Adjusted R-squared:  0.9953 
## F-statistic: 843.1 on 1 and 3 DF,  p-value: 8.971e-05
plot(X,y)
abline(model1, col='red')

The equation of the regression line (rounded to the nearest hundredth) is:

y = 4.26 - 14.8X

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 \] Calculate the first and second derivatives with respect to x, y and both x and y.

$$ f_{x} = 24 - 6y^2 \ f_{y} = -12xy - 24y^2 \ f_{xx} = 0 \ f_{yy} = -12x - 48y \ f_{xy} = -12y \ f_{yx} = -12y \

$$ The critical points are obtained by setting the first partial derivatives to 0

\[ f_{x} = 24 - 6y^2 = 0 \\ 6y^2 = 24\\ Therefore\,y=+2\, or\, y=-2 \] Substituting this in the other first order partial derivative equation we get: when y = +2 \[ f_{y} = -12xy - 24y^2 = 0 \\ -24x=96\\ x=-4 \] when y = -2 \[ f_{y} = -12xy - 24y^2 = 0 \\ 24x=96\\ x=4 \] Therefore the critical points are (-4,2) and (4,-2) Plugging these values back into the function gives us the following:

multif<-function(x,y) {
  24*x - 6*x*y^2 - 8*y^3
}
(w<-multif(-4,2))
## [1] -64
(v<-multif(4,-2))
## [1] 64

In order to apply the second derivative test, calculate the discriminant as follows: \[ D = f_{xx}f_{yy}-f^2_{xy}\\ =0-(-12y)^2\\ =-144y^2 \] Since y = 2 or -2, y^2 = 4 Therefore the discriminant D<=0, which indicates that all the critical points are saddle points. So the local maxima, minima and saddle points of this function are: (-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).

Revenue = Price x Quantity Therefore, the revenue function R(x,y) = x(81-21x+17y) + y(40+11x-23y) \[ 81x-21x^2+17xy+40y+11xy-23y^2 \\ = -21x^2+81x+28xy-23y^2+40y \]

3. Step 2. What is the revenue if she sells the “house” brand for $2.30 and the “name” brand for $4.10?

Substituting the price of the 2 brands in the revenue function, we get:

rev<-function(x,y){
  -21*x^2+81*x+28*x*y-23*y^2+40*y  
}

revenue<-rev(2.3,4.1)
revenue
## [1] 116.62

The total revenue for R(2.3,4.1) is $116.62

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?

Expressing the cost function of the product based on quantities produced in the 2 factories and the fixed number of total units across the 2 factories, we get:

\[ C(x,y)=1/6x^2 + 1/6y^2 + 7x + 25y + 700 \\ x+y=96 \] Using Lagrange multipliers, we set the gradients of the 2 functions above as an equation below:

\[ \nabla f(x,y) = \lambda \nabla g(x,y) \] This gives the following:

\[f_{x}(x,y)= \lambda g_{x}(x,y) \]

\[ f_{y}(x,y)= \lambda g_{y}(x,y) \] Setting the constraint function as follows: \[ g(x,y)=0 \] We get: \[ x+y-96=0 \] Taking the partial derivative of the cost function with respect to x, we get \[C_{x}= \lambda g_{x} \\ 1/3x+7 = \lambda \]

Taking the partial derivative of the cost function with respect to y, we get \[C_{y}= \lambda g_{y} \\ 1/3y+25 = \lambda \]

\[ 1/3x+7 = 1/3y+25 \\ x = 3*(1/3y+18) = y+54 \] Substituting in the constraint function, we get

\[ y + 54 + y - 96 = 0 \\ 2y = 42 \\ y = 21 \\ x = 21 + 54 = 75 \] Therefore to minimize the weekly cost, the company must produce 75 units in it’s LA plant and 21 units in its Denver plant.

5. Evaluate the double integral on the given region. Write your answer in exact form without decimals.

$$ _{R} (e^{(8x+3y)}dA ; R: 2 x 4, and, 2 y 4

$$ Separating the double integral into 2 separate integrals in x and y, we get:

\[ \int e^{8x}dx \int e^{3y}dy \\ = (|1/8e^{8x}|_{x=2}^{4})\,(|1/3e^{3y}|_{y=2}^{4}) \\ = 1/8(e^{32}-e^{16}).1/3(e^{12}-e^{6}) \\ = 1/24(e^{32}-e^{16})(e^{12}-e^{6}) \]