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)
coefficients <- coef(lm(y~x))
intercept <- coefficients[[1]]
slope <- coefficients[[2]]
print(paste("y = ", slope,"x ",intercept))## [1] "y = 4.25714285714285 x -14.8"
Question 2
\[\begin{align} f(x,y) = 24x - 6xy^2 - 8y^3 \\ \frac{d}{dy} = -12xy - 24y^2 \\ \frac{d}{dx} = 24 - 6y^2 \\ 24 - 6y^2 = 0 \\ -6y^2 = -24 \\ y^2 = -24/-6 \\ y = \sqrt{4} = \pm 2 \end{align}\]
\[\begin{align} -12xy - 24y^2 \\ -12x(2) - 24(2)^2 \\ (2)(-12x - 24(2) \\ (2)(12)(-x - 4) = 0 \\ x = \pm 4 \end{align}\]
# Define the function
f <- function(x, y) {
return(24 * x - 6 * x * y^2 - 8 * y^3)
}
# Pass values of x and y
x_value <- 4
y_value <- -2
x_value_2 <- -4
y_value_2 <- 2
# Calculate the result by calling the function with the given values
result <- f(x_value, y_value)
result_2 <- f(x_value_2, y_value_2)
print(paste("(",x_value,",",y_value,",",result,")"," , ","(",x_value_2,",",y_value_2,",",result_2,")"))## [1] "( 4 , -2 , 64 ) , ( -4 , 2 , -64 )"
\[\begin{align} H = f_{xx}(x,y)f_{yy}(x,y) - f_{xy}(x,y)^2 \\ f_{x}(x,y) = 24 - 6y^2 \\ f_{xx}(x,y) = 0 \\ f_{y}(x,y) = -12xy - 24y^2 \\ f_{yy}(x,y) = -12x -48y \\ f_{xy}(x,y) = -12y \\ H = (0)(-12x-48y) - (-12y)^2 \\ H = -144y^2 \end{align}\]
# 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.
Step 1. Find the revenue function R(x,y).
\[\begin{align} R(x,y) = (81−21x+17y)x + (40+11x−23y)y \\ R(x,y) = 81x-21x^2+17xy + 40y + 11xy -23y^2 \\ R(x,y) = 81x + 40y + 28xy - 21x^2 - 23y^2 \\ \end{align}\]
Step 2. What is the revenue if she sells the “house” brand for $2.30 and the “name” brand for $4.10? | $116.62. You can manually plug the values in, but it’s easier to just use R.
## [1] 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) = \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?
\[\begin{align} x + y = 96 \\ y = 96 - x \end{align}\]
\[\begin{align} C(x) = \frac{1}{6}x^2 + \frac{1}{6}(96-x)^2 + 7x + 25(96-x) + 700 \\ C(x) = \frac{1}{6}x^2 + x^2/6-32x+1536 + 7x + 25(96-x) + 700 \\ C(x) = \frac{1}{3}x^2 -50x + 4636 \\ C'(x) = \frac{2}{3}x + -50 = 0 \\ C'(x) = \frac{2}{3}x = 50 \\ C'(x) = x = 50(3/2) = 75\\ y = 96 - 75 = 21 \end{align}\]
Question 5
Evaluate the double integral on the given region. \[\int_2^4 \int_2^4 e^{8x + 3y} dx dy\] Write your answer in exact form without decimals.
\[\begin{align} \int_2^4 \int_2^4 e^{8x + 3y} dy dx \\ u = 8x +3y; du = 3 dy; dy = 1/3 du \\ \frac{1}{3}\int e^u du \\ 8x + 3(2) = 8x + 6 \\ 8x + 3(4) = 8x + 12 \\ \frac{1}{3}\int_{8x + 6}^{8x + 12} e^u du \\ \frac{1}{3}(e^{8x + 12} - e^{8x + 6}) \\ \frac{1}{3}e^{8x + 6}(e^6-1) \\ \int_2^4 \frac{1}{3}e^{8x + 6}(e^6-1) dx \\ u = 8x + 6; du = 8d x; dx = 1/8 du \\ \int_2^4 \frac{1}{3} \frac{1}{8}e^{u}(e^6-1) du \\ 8(4) + 6 = 38 \\ 8(2) + 6 = 22 \frac{1}{24}e^{u}(e^6-1) du \biggr\vert_{22}^{38} \\ \frac{1}{24}e^{38}(e^6-1) - \frac{1}{24}e^{22}(e^6-1_)\\ \frac{1}{24}(e^6-1)(e^{38} -e^{22})\\ \frac{1}{24}(e^{44} - e^{38} - e^{28} + e^{22})\\ \end{align}\]
## [1] 5.34156e+17