Question 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)

model <- lm(y ~ x)

intercept <- coef(model)[1]
slope <- coef(model)[2]

cat("Equation of the regression line: y =", round(intercept, 2), "+", round(slope, 2), "x")
## Equation of the regression line: y = -14.8 + 4.26 x

Question 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 \]

To compute the partial derivatives with respect to \(x\) and \(y\). Ordering anything that is not an \(x\), to the front for each term/factor.

\[ f(x,y) = 24x - \frac{y^2}{6} \cdot 6x - 8y^3 \] \[ f_x(x,y) = 24 - 6y^2 \] \[ f_y(x,y) = -12xy - 24y^2 \]

Now, we can set each partial derivative equal to zero and solve the resulting system of two equations and two unknowns.

If \(24 - 6y^2 = 0\), then \(y^2 = 4\) and thus \(y = \pm 2\).

If \(y = 2\) and \(-12xy - 24y^2 = 0\), then \(-24x = 24(2^2)\) and thus \(x = -4\).

If \(y = -2\) and \(-12xy - 24y^2 = 0\), then \(24x = 24(2^2)\) and thus \(x = 4\).

Now, calculate \(f(x,y)\).

\[ f(4,-2) = 24(4) - 6(4)(-2^2) - 8(-2)^3 \] \[ = 96 - 96 + 64 \] \[ f(4,-2) = 64 \]

\[ f(-4,2) = 24(-4) - 6(-4)(2^2) - 8(2)^3 \] \[ = -96 + 96 - 64 \] \[ f(-4,2) = -64 \]

Two Critical Points: \((4,-2,64)\) and \((-4,2,-64)\)

Now, we can use the Second Derivative Test to determine if the points are at local maxima, local minima, or saddle points. A saddle point is where a critical point exists but does not have any extrema.

Second Derivatives:

\[ f_{xx} = 0 \] \[ f_{yy} = -12x - 48y \] \[ f_{xy} = -12y \]

Consider:

\[ D(x,y) = f_{xx}f_{yy} - f_{xy}^2 \] \[ = (0)(-12x - 48y) - (-12y)^2 \] \[ = -144y^2 \]

\(D(x,y) < 0\) for all \((x,y)\), thus any critical point is a saddle point.

Therefore, both critical points \((4,-2)\) and \((-4,2)\) are saddle points.

Question 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.

A <- matrix(c(-21, 17, 11, -23), ncol = 2, byrow = TRUE)

b <- c(81, 40)

solution <- solve(A, b)


x <- solution[1]
y <- solution[2]

cat("The optimal price for the house brand is $", round(x, 2), "\n")
## The optimal price for the house brand is $ -8.59
cat("The optimal price for the name brand is $", round(y, 2), "\n")
## The optimal price for the name brand is $ -5.85
revenue <- function(x, y) {
  return(x * (81 - 21*x + 17*y) + y * (40 + 11*x - 23*y))
}

x_price <- 2.30
y_price <- 4.10

total_revenue <- revenue(x_price, y_price)

cat("The total revenue when selling the house brand for $2.30 and the name brand for $4.10 is $", round(total_revenue, 2), "\n")
## The total revenue when selling the house brand for $2.30 and the name brand for $4.10 is $ 116.62

Question 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+16y2+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?

To solve the system of equations \(x+y=96\) and \(x=96-y\), we can convert \(C(x, y)\) into a univariate function.

\[c(x,y)=16x^2 + 16y^2 + 7x + 25y + 700 = 16(96 - y)^2 + 16y^2 + 7(96 - y) + 25y + 700\] \[C(y) = 13y^2 - 14y + 2908\]

Let’s take the first derivative to find the minimal value. \[C'(y) = 23y - 14 = 0\] \[23y = 14\] \[y = \frac{14}{23}\]

Substitute it to find \(x\) value. \[x = 96 - y\] \[x = 96 - \frac{14}{23}\] \[x = 75\]

We need 75 units from Los Angeles and 21 units from Denver in order to minimize the cost.

Question 5

Evaluate the double integral on the given region.

\[∬(e8x+3y) dA;R:2≤x≤4 and 2≤y≤4\]

\[\int_{2}^{4}\int_{2}^{4}(e^{8x}+3y) \, dy \, dx\] \[= \int_{2}^{4}\left[\frac{1}{3}e^{8x}+3y^2\right]_{2}^{4} \, dx\] \[= \int_{2}^{4}\left[\frac{1}{3}e^{8x}+12- \left(\frac{1}{3}e^{8x}+12\right)\right] \, dx\] \[= \int_{2}^{4}12(e^6-1) \, dx\] \[= 12(4e^6-4) - 12(2e^6-2)\] \[= 12(e^{12}-e^6-2e^6+2)\] \[= 12(e^{12}-3e^6+2)\] ]