Problem 1

pts<-data.frame(c(5.6,6.3,7,7.7,8.4),c(8.8,12.4,14.8,18.2,20.8))
names(pts)<-c("x","y")
pts
##     x    y
## 1 5.6  8.8
## 2 6.3 12.4
## 3 7.0 14.8
## 4 7.7 18.2
## 5 8.4 20.8
regred<-lm(y ~ x, data=pts)
summary(regred)
## 
## Call:
## lm(formula = y ~ x, data = pts)
## 
## Residuals:
##     1     2     3     4     5 
## -0.24  0.38 -0.20  0.22 -0.16 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -14.8000     1.0365  -14.28 0.000744 ***
## x             4.2571     0.1466   29.04 8.97e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3246 on 3 degrees of freedom
## Multiple R-squared:  0.9965, Adjusted R-squared:  0.9953 
## F-statistic: 843.1 on 1 and 3 DF,  p-value: 8.971e-05
plot(pts$x,pts$y)
abline(regred)

Problem 2

Find the maxima, minima and saddle points of \(f(x,y)=24x-6xy^2-8y^3\)

Finding the zeroes for \(x\):

\[ \frac{\partial}{\partial x}f=24-6y^2=0\\ 6y^2=24\\ y^2=4\\ y=\pm 2 \]

Finding the zeroes for \(y\):

\[ \frac{\partial}{\partial y}f=12xy-24y^2=0\\ 12xy=24y^2\\ 12x=24y\\ x=2y \]

The local maxima/minima/saddle points are \((4,2)\) and \((-4,-2)\).

Looking around (-4,-2) to see what type it is:

f<-function(x,y){
  return(24*x-(6*x*y^2)-(8*y^3))
}
f(-3,-3)
## [1] 306
f(-3.5,-2.5)
## [1] 172.25
f(-5,-3)
## [1] 366
f(-4.5,-2.5)
## [1] 185.75
f(-4,-2)
## [1] 64
f(-5,-1)
## [1] -82
f(-4.5,-1.5)
## [1] -20.25
f(-3,-1)
## [1] -46
f(-3.5,-1.5)
## [1] -9.75

This is a saddle point, increasing as \(y\) increases.

And now around (4,2)

f(3,1)
## [1] 46
f(3.5,1.5)
## [1] 9.75
f(3,3)
## [1] -306
f(3.5,2.5)
## [1] -172.25
f(4,2)
## [1] -64
f(4.5,1.5)
## [1] 20.25
f(5,1)
## [1] 82
f(4.5,2.5)
## [1] -185.75
f(5,3)
## [1] -366

This is another saddle point.

Problem 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.

a.) Find \(R(x,y)\)

Revenue<-function(x,y){
  return((81-21*x+17*y)*x+(40+11*x-23*y)*y)
}

b.) Find the revenue when the house brand is $2.30 and the name brand is $4.10.

Revenue(2.30,4.10)
## [1] 116.62

Problem 4

A company produces 96 units each week, with the cost given by \(C(x,y)=\frac{1}{6}x^2+\frac{1}{6}y^2+7x+25y+700\). Minimize \(C\).

We start with \(y=96-x\). Substituting, we have \(C(x)=\frac{1}{6}x^2+\frac{1}{6}(96-x)^2+7x+25(96-x)+700\) Simplifying, we have, \(C(x)=\frac{1}{6}x^2+\frac{1}{6}(9216-192x+x^2)+7x+2400-25x+700=\frac{1}{3}x^2-50x+4636\)

Taking \(\frac{d}{dx}C(x)\), we have

\[ \frac{d}{dx}C(x)=\frac{2}{3}x-50\\ \text{Setting it to 0, we have}\\ \frac{2}{3}x-50=0\\ x=\frac{150}{2}\\ x=75 \]

So \(y=21\)

Problem 5

Evaluated

\[ \int\int_R e^{8x+3y}dA \]

Where \(R\) is \(x=[2,4]\) and \(y=[2,4]\).

\[ \int\int_R e^{8x+3y}dA=\\ \int_2^4\int_2^4 e^{8x}e^{3y}dydx=\\ \int_2^4 e^{8x}\int_2^4 e^{3y} dydx=\\ \int_2^4e^{8x}\cdot\frac{(e^{12}-e^6)}{3}dx=\\ \frac{(e^{12}-e^6)}{3}\int_2^4e^{8x}dx=\\ \frac{e^6(e^{6}-1)}{3}\cdot\frac{e^{32}-e^{16}}{8}=\\ \frac{e^6(e^{6}-1)}{3}\cdot\frac{e^{16}(e^{16}-1)}{8}=\\ \frac{e^{22}(e^6-1)(e^{16}-1)}{24} \]