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)
points_df <- data.frame(x = c(5.6, 6.3, 7, 7.7, 8.4), y = c(8.8, 12.4, 14.8, 18.2, 20.8))
linear_model <- lm(y ~ x, data = points_df)
linear_model
## 
## Call:
## lm(formula = y ~ x, data = points_df)
## 
## Coefficients:
## (Intercept)            x  
##     -14.800        4.257

The equation of the regression line is \(y=-14.80+4.26x\).

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

Find partial derivatives & critical points: \[ f_x(x,y)=24-6y^2\\ f_y(x,y)=-12xy-24y^2\\ 24-6y^2=0\\ y^2=4\\ y=\pm2\\ -12xy-24y^2=0\\ \text{Let} \space y=2\\ -12x(2)-24(2)^2=0\\ -24x-96=0\\ x=-4\\ \text{Let} \space y=-2\\ -12x(-2)-24(-2)^2=0\\ 24x-96=0\\ x=4\\ f(-4,2)=24(-4)-6(-4)(2)^2-8(2)^3\\ f(-4,2)=-64\\ f(4,-2)=24(4)-6(4)(-2)^2-8(-2)^3\\ f(4,-2)=64\\ \{(-4,2,-64),(4,-2,64)\} \] The function has critical points at (-4,2,-64) and (4,-2,64). Applying the second derivative test will confirm what type(s) of critical points they are.

\[ f_x(x,y)=24-6y^2\\ f_{xx}(x,y)=0\\ f_{xy}(x,y)=-12y\\ \]

Since \(f_{xx}(x,y)=0\), we need only calculate \(f_{xy}(x,y)\) for each critical point to determine if \(D\) is negative or zero (it cannot be positive, given that \(D=f_{xx}f_{yy}-f_{xy}^2\), and the first product will be zero.)

\[ f_{xy}(x,y)=-12y\\ f_{xy}(-4,2)=-12(2)\\ f_{xy}(-4,2)=-24\\ \]

Since \(f_{xy}(-4,2)\) is non-zero, \(D<0\), and \(f\) has a saddle point at \((-4,2,-64)\).

\[ f_{xy}(x,y)=-12y\\ f_{xy}(4,-2)=-12(-2)\\ f_{xy}(4,-2)=24\\ \] Since \(f_{xy}(4,-2)\) is also non-zero, \(D<0\), and \(f\) has another saddle point at \((4,-2,64)\).

In sum, there are no local minima or maxima, and two saddle points: \((-4,2,-64)\), \((4,-2,64)\).

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

\[ R(x,y)=x(81-21x+17y)+y(40+11x-23y)\\ R(x,y)=81x-21x^2+17xy+40y+11xy-23y^2\\ R(x,y)=-21x^2+81x+28xy+40y-23y^2\\ \]

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

\[ x=2.30 \space \text{and} \space y=4.10\\ R(2.3,4.1)=-21(2.3)^2+81(2.3)+28(2.3)(4.1)+40(4.1)-23(4.1)^2\\ R(2.3,4.1)=116.62\\ \] The revenue would be $116.62.

  1. 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?

\[ C(x,y)= \frac{1}{6}x^2+\frac{1}{6}y^2+7x+25y+700\\ x+y=96\\ x=96-y\\ C(y)= \frac{1}{6}(96-y)^2+\frac{1}{6}y^2+7(96-y)+25y+700\\ C(y)=\frac{1}{6}(9216-192y+y^2)+\frac{1}{6}y^2+672-7y+25y+700\\ C(y)=\frac{1}{3}y^2-14y+2908\\ C'=\frac{2}{3}y-14\\ \frac{2}{3}y-14=0\\ y=21\\ x=75\\ \] 75 units should be produced in Los Angeles and 21 in Denver.

We can check by comparing surrounding values, which confirms that (75,21,2761) is at least a relative minimum: \[ C(75,21)= \frac{1}{6}(75)^2+\frac{1}{6}(21)^2+7(75)+25(21)+700\\ C(75,21)=2761\\ C(76,20)= \frac{1}{6}(76)^2+\frac{1}{6}(20)^2+7(76)+25(20)+700\\ C(76,20)= 2761.33\\ C(74,22)= \frac{1}{6}(74)^2+\frac{1}{6}(22)^2+7(74)+25(22)+700\\ C(74,22)= 2761.33\\ \]

1/6*75^2+1/6*21^2+7*75+25*21+700
## [1] 2761
1/6*76^2+1/6*20^2+7*76+25*20+700
## [1] 2761.333
1/6*74^2+1/6*22^2+7*74+25*22+700
## [1] 2761.333
  1. Evaluate the double integral on the given region. \[ \int\int e^{8x+3y}dA;R:2\leq x\leq4\space \text{and} \space 2\leq y\leq4 \] Write your answer in exact form without decimals.

\[ \int\int e^{8x+3y}dA;R:2\leq x\leq4\space \text{and} \space 2\leq y\leq4\\ \int_2^4\int_2^4 e^{8x+3y} \space dy \space dx\\ \] First we evaluate the integral with respect to \(y\) using substitution: \[ u=8x+3y\\ du=3dy\\ \int_2^4 e^{8x+3y}\space dy\\ \frac{1}{3}\int_2^4 e^u\space du\\ \frac{1}{3}(e^{8x+3(4)}-e^{8x+3(2)})\\ \frac{1}{3}(e^{8x+12}-e^{8x+6})\\ \]

Then we evalaute the integral with respect to \(x\) using substitution: \[ \int_2^4 \frac{1}{3}(e^{8x+12}-e^{8x+6})\space dx\\ v=8x+6\\ dv=8dx\\ \frac{1}{3}\cdot\frac{1}{8}\int_2^4 (e^{v+6}-e^{v})\space dv\\ \frac{1}{24} ((e^{8(4)+12}-e^{8(4)+6})-(e^{8(2)+12}-e^{8(2)+6}))\\ \frac{1}{24}((e^{44}-e^{38})-(e^{28}-e^{22}))\\ \frac{1}{24}(e^{44}+e^{22}-e^{38}-e^{28})\\ \]

\(\int\int e^{8x+3y}dA\) on the region \(R:2\leq x\leq4\space \text{and} \space 2\leq y\leq4\) is equal to \(\frac{1}{24}(e^{44}+e^{22}-e^{38}-e^{28})\).