DATA 605 - Assignment 15

Michael Muller

December 10, 2017


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

\(y = -14.800 + 4.257*x\)

Solve 1st and 2nd Partial Derivatives of \(f_x f_y\):

1st

\(f_x = 24-6y^2\)
\(f_y = -12xy-24y^2\)

2nd

\(f_{xy} = -12y\)
\(f_{xx} = 0\)
\(f_{yy} = -12x-48y\)

Determine critical points by solving for \(f_x(x,y)=0\) and \(f_y(x,y) = 0\)

\(f_x = 24 - 6y^2 = 0\) ==> y = [2,-2]

Plug em in to the other equation

\(f_y = -12xy - 24y^2 = 0\) => (-4,2) & (4,-2)

Add the Z coordinate using \(f(x,y)\)

\(f(-4,2) = -12(8)-24(-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

Second Derivative test

\(D = D(x,y) = f_{xx}f_{yy}-f_{xy}^2\)
\(-(-12y)^2 = -144y^2\) ==> \(D(X,Y)<-576\)

(1)

Identify house and name
\(R(x) = (81-21x+17y)*x\)
\(R(y) = (40+11x-23y)*y\)

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

(2)

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

Expected Revenue is 116.62

(1)

Firm committed to produce 96 from X & Y which means
\(x+y=96\)
\(y=96-x\)
\(x=96-y\)

(2) Input one or the other equation to total weekly cost


\(C(x,96-x)= x^2+(96-x)^2+7x+25(96-x)+700\)
\(C(x,96-x)=x^2-50x+4636\)

(3) Find a minimal value

\(C'(x)=2/3x-50=0\)
x=75
\(21 = 96-75\)

Denver should output 21 units where as Los Angeles should output 75 Units in order to minimize the total weekly cost.

\(\int_2^4\int_2^4(e^{8x+3y})dx dy\)

indefinite integral

\(\int_2^4(1/8)(e^{16}-1)e^{3y+16} dy\)

indefinite integral

\((e^{16}-1)/24 e^{3y+16}+C\)

boundaries

\((e^{44}-e^{28})/24 -(e^{38}-e^{22})/24\)

simplify

\((1/24)(e^{22}-e^{28}-e^{38}+e^{44})\)