Mix Regression Double Integral

LOad Packages

library(ggplot2)
library(tidyverse)
library(knitr)
library(data.table)

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 )

Answer:

x <- c(5.6, 6.3, 7, 7.7, 8.4)
y <- c(8.8, 12.4, 14.8, 18.2, 20.8)

l = lm(y ~ x)
l
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     -14.800        4.257
#plot(who_csv$LifeExp ~ who_csv$TotExp, xlab="sum of personal and government expenditures", ylab="average life expectancy for the country in years",
#     main="Life Expectancy vs sum of personal and government expenditures", col = "blue")
#abline(life_expectancy)

Therefore, the equation of the line is: y = -14.8 + 4.257x.

Now, we’ll plot the line:

plot(x, y, xlab = "X axis", ylab = "y axis", main = "X-Y plot", col = "blue")
abline(l)

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 - 6xy^2 - 8y^3

Answer:

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). Step 2. What is the revenue if she sells the “house” brand for $2.30 and the “name” brand for $4.10?

Answer:
Step1: The price of (81 - 21x + 17y) units of house brands @ $x is: x.(81 - 21x + 17y) = 81x - 21x^2 + 17xy The price of (40 + 11x - 23y) units of house brands @ $y is: y.(40 + 11x - 23y) = 40y + 11xy - 23y^2

Therefore, the revenue function is: R(x,y) = 81x - 21x^2 + 17xy + 40y + 11xy - 23y^2 = 81x + 40y + 28xy - 21x^2 - 23y^2

x <- 2.3
y <- 4.1
R <- 81 * x + 40 * y + 28 * x * y - 21 * x^2 - 23 * y^2
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) = 1/6 x^2 + 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?

Answer:
x + y = 96, or y = 96 - x. Substituting this in the Cost function, we get: C(x, y) = C(x, 96 - x) = 1/6 . x^2 + 1/6 . (96 - x)^2 + 7x + 25 . (96 - x) + 700 = 1/6 . x^2 + 1/6 . (9216 - 192 x + x^2) + 7x + 25 . (96 - x) + 700 = 1/6 . x^2 + 1/6 . 9216 - 1/6 . 192 x + 1/6 . x^2 + 7x + 25 . 96 - 25x + 700 = 1/6 . x^2 + 1536 - 32x + 1/6 . x^2 + 7x + 2400 - 25x + 700 = 1/3 . x^2 + 3100 - 50x

So, C(x, y) = 1/3 . x^2 + 3100 - 50x. Differentiating C(X, Y): d(C(x, y))/dy = 2/3.x - 50. Equating this to zero, and solving, we get x = 75 and y = 21. Therefore, the critical point is (75, 21)

The second derivative is 2/3 > 0. Therefore, this critical point is a minima. Thefore, LA should produce 75 units and Denver should produce 21 units, for producing at minimum cost.

Question 5:

Evaluate the double integral on the given region. Double integral of e^(8x + 3y)dA; R: 2 =< x =< 4 and 2 =< y =< 4 Write the answer in exact form without decimals.

Answer:

Marker: 605-15