library(tidyverse)
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 ) \]
\[\begin{align*} Y &= mX + b \\ m &= \frac{n\sum(xy) - \sum(x)\sum(y)}{n\sum(x^2) - (\sum x)^2} \\ b &= \frac{\sum(y)\sum(x^2) - \sum(x)\sum(xy)}{n\sum(x^2) - \sum(x)^2} \end{align*}\]
x <- c(5.6, 6.3, 7, 7.7, 8.4)
y <- c(8.8, 12.4, 14.8, 18.2, 20.8)
lm(y ~ x)
##
## Call:
## lm(formula = y ~ x)
##
## Coefficients:
## (Intercept) x
## -14.800 4.257
\[ Y = -14.8 + 4.26x \]
ggplot(data.frame(x,y), aes(x, y)) +
geom_point() +
geom_smooth(method = "lm")+
theme_bw()
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 \]
Finding partial derivatives.
\(f_x = 24 - 6y^2\) \(f_y = -12xy - 24y^2\)
\(24 - 6y^2 = 0 \ \to \ y^2 = 4 \ \to \ y = \pm 2\)
When \(y = 2\): \(-12xy -24y^2 = 0 \ \to \ -24x = 96 \ \to \ x = -4\).
When \(y = -2\): \(-12xy -24y^2 = 0 \ \to \ 24x = 96 \ \to \ x = 4\).
Plug and Play
\(f(-4,2) = 24(-4) - 6(-4)(2^2) - 8(2^3) =\) -64.
\(f(4,-2) = 24(4) - 6(4)(-2^2) - 8(-2^3) =\) 64.
Our two critical points are \((-4,2,-64)\) and \((4,-2,64)\).
second derivative:
\(D(x,y) = f_{xx}f_{yy} - f_{xy}^2\).
\(f_{xx} = 0\).
\(f_{yy} = -12x - 48y\).
\(f_{xy} = f_{yx} = -12y\).
\(D = 0 - (-12y)^2 = -144y^2\).
\(D(x,y) < 0 \ \forall (x,y)\), so both critical points are saddle points.
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)\). Step 2. What is the revenue if she sells the “house” brand for $2.30 and the “name” brand for $4.10?
Step 1:
\(R(x,y) = (81 - 21x + 17y)x + (40 + 11x - 23y)y\).
Step 2: Plug in \(x = 2.30\) and \(y = 4.10\).
\(R(2.30, 4.10) = \Big[81 - 21(2.30) + 17(4.10)\Big]\times 2.30 + \Big[40 + 11(2.30) - 23(4.10)\Big]\times 4.10\)
\(R(2.30, 4.10) =\) 116.62.
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?
Total units produced each week = Units produced in Los Angeles + Units produced in Denver.
We’re given \(x + y = 96\). We need to find the critical points of \(C(x,y)\), and then find the local minimum.
Solve for either variable: \(x = y - 96, \ \ y = 96 - x\).
\[\begin{align*} C(x, 96 - x) &= \frac{1}{6}x^2 + \frac{1}{6}(96 - x)^2 + 7x + 25(96 - x) + 700 \\ &= \frac{1}{6}x^2 + 1536 - 32x + \frac{1}{6}x^2 + 7x + 2400 - 25x + 700 \\ &= \frac{1}{3}x^2 - 50x + 4636 \\ C_x &= \frac{2}{3}x - 50 = 0 \\ x &= 75 \\ C_{xx} &= \frac{2}{3} \end{align*}\]
Since the second derivative is > 0, then, by the Second Derivative Test, there is a local minimum at 75.
Thus, the Los Angeles plant should produce 75 units, and the Denver plant should produce 21 units.
Evaluate the double integral on the given region. Write your answer in exact form without decimals.
\[ \iint \limits_R (e^{8x + 3y})dA; \ \ R: 2 \leq x \leq 4 \ \ \text{and } \ 2 \leq y \leq 4 \]
\[\begin{align*} &\int\limits_{2}^{4} \int\limits_{2}^{4} (e^{8x + 3y}) \ dx \ dy \\ &\int\limits_{2}^{4} e^{8x} \ dx \int\limits_{2}^{4} e^{3y} \ dy \\ &\frac{1}{8}e^{8x}\Big|_{2}^{4} \cdot \frac{1}{3}e^{3y}\Big|_{2}^{4} \\ &\frac{1}{24}(e^{32} - e^{16})(e^{12} - e^{6}) \end{align*}\]
(1/24)*((exp(32) - exp(16))*(exp(12) - exp(6)))
## [1] 5.341559e+17