Qn-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)
lm<-lm(Y~X)
lm
## 
## Call:
## lm(formula = Y ~ X)
## 
## Coefficients:
## (Intercept)            X  
##     -14.800        4.257

The linear eqn is as given below.

\[ y = -14.800 + 4.257x \]

plot(X,Y)
abline(lm)

Qn2 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-6xy2-8y3 \]

\[ f(x)=x-6y^2 = 0 , x= 6y^2 \]

\[ f(y)= 12y-24y=0 , y=???12 , y=???1/12 \]

y <- -1/12
x <- 6*y * y

z <- z <- 12*x-6*x*y^2-8*y^3

a <- c(x,y,z)
a 
## [1]  0.04166667 -0.08333333  0.50289352

Qn3 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 ) = (81 - 21x + 17y) + (40 + 11x - 23y) \]

house <- 81 - 21*x + 17*y
name <- 40 + 11*x - 23*y

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
y <- 4.10
R <- house + name
R
## [1] 121.0833

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

\[ \int\int_{R} e^{8x+3y} dA:R:2<=x<=4 and 2<=y<=4\]

f<-function(x) { exp(8*x+3*y) }
f2<- function(y) { sapply(y, 
function(z) { integrate(f, 2, 4)$value }) }
dI<- integrate(f2 , 2, 4)
dI
## 4.336961e+18 with absolute error < 48150