#hand work
knitr::include_graphics("https://raw.githubusercontent.com/maharjansudhan/DATA605/master/download.png")

Question 1. Answer:

# to find the linear regression of a given line

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

So, y = 4.257*x - 14.80

Question 2. Answer: f(x, y) = 24x -6xy^2 - 8y^3

Now, For 1st Derivative

fx = 24 - 6y^2 fy = -12xy - 24y^2

For 2nd Derivative fxx = 0 fxy = -12y fyy = -12x - 48y

Let’s say value of fx(x,y) = (0,0) and fy(x,y) = (0, 0) fx = 24 - 6^y = 0 which means y = [2, -2]

now lets plot the value of y on fy

fy = -12xy - 24y^2 = 0 which means The values will be (-4, 2) and (4, -2)

equat = function(x,y){
  z = 24*x - 6*x*y^2 - 8*y^3
  return(c(x,y,z))
}
print(rbind(equat(-4,2),equat(4,-2)))
##      [,1] [,2] [,3]
## [1,]   -4    2  -64
## [2,]    4   -2   64

Question 3:

Answer:

Two different houses

R(x) <- (81 - 21x + 17y) * x

R(y) <- (40 + 11x - 23y) * y

When we combine both

R(x,y) <- R(x) + R(y) R(x,y) <- 28xy - 23y^2 - 21x^2 + 40y + 81x

#to calculate revenue
# R(x,y) <- 28xy - 23y^2 - 21x^2 + 40y + 81x

revenue = function(x,y){
  rev = 28*x*y - 23*y^2 - 21*x^2 + 40*y + 81*x
  return(rev)
}
rev = revenue(2.3,4.1)

rev
## [1] 116.62

Question 4:

Answer: Firm has two plants Los Angeles(x) and Denver(y) that committed to produce 96 So,

X + y = 96 x = 96 - y y = 96 - x

Total weekly cost C(x,y) = (1/6)x^2 + (1/6)y^2 + 7x + 25y + 700

substituting value of y C(x, 96-x) = (1/6)x^2 + (1/6)(96-x)^2 + 7x + 25(96-x) + 700 = x^2 - 50x + 4636

The minimum output to cover cost value C’(x) => (2/3)x - 50 = 0 => 2x = 50 * 3 => x = 75 And y = 96 - 75 y = 21

The different plants Los Angeles should produce 75 and Denver should produce 21 to cover minimum cost.

–

Question 5: Evaluate the double integral on the given region.

Answer:

knitr::include_graphics("https://raw.githubusercontent.com/maharjansudhan/DATA605/master/IMG_1638.jpg")

e = 2.71828
x <- (1/24) * (e^22 - e^28 - e^38 + e^44)
x
## [1] 5.341401e+17