Question 1

## Question 1:
x <- c(5.6,6.3,7,7.7,8.4)
y <- c(8.8,12.4,14.8,18.2,20.8)
ans <- lm(y~x)
ans
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     -14.800        4.257

Our equation for the regression line for the given point is:

\[ 4.257x -14.800 \]


Question 2

We have the equation

\[ f(x)= 24x-6xy^{2}-8y^{3} \]

Finding the critical points in the equation by finding the partial derivative of x and partial derivative of y \[ f'(x)=-6y^{2}+24 \]

\[ f'(y)=-12xy-24y^{2} \]

equaling each equation to 0 we get the critical points \[ (-4,2-64) \]

\[ (4,-2,64) \]

we got our z values by plugging in the critical points into the original equation.

In order to get our local min,max and saddle points we have to use theorem 12.8.2 i.e the second derivative test.

WE find our second partial deriviatves where:

\[ fxx=0 \]

\[ fyy = -12x-48y \]

\[ fxy=-12y \]

Using the formula to get the disk we get:

\[ D=-144y^{2} \] if we plug in both of the values of the critical point into D we get a value of -576 for both. However, by the theorem since fxx = 0 and D<0 we can see that f has a saddle points at (-4,2) and (4,2) and no local max or min.


Question 3:

To find the revenue function we get that: we multiply the house brand unit per x dollars and add that with the name brand per y dollars. So our revenue function would be: \[ R(x,y) = x(81-21x+17y)+y(40+11x-23y) \]

Combining and cleaning all the terms we get: \[ R(x,y) = 28xy-21x^{2}+81x+40y-23y^{2} \]


Step 2:

We simply plug in 2.30 for our house brand and 4.10 for our name brand.

revenue <-function(x,y){
  z = (28*x*y)-(21*x^2)+(81*x)+(40*y)-(23*y^2)
  z
}
revenue(2.30,4.10)
## [1] 116.62

Question 4

Our total weekly cost is: \[ C(x,y) = (1/6)x^{2} + (1/6)y^{2} + 7x + 25y+ 700 \]

Our constraint isnโ€™t given but our constraint is to produce a total of 96 units from units in both in LA and denver then we have that \[ x+y=96 \]

For this problem I used a method called the Lagrange Multipler to solve it where f(x) is our cost function and g(x) is our constraint \[ \nabla f(x) = \lambda \nabla g(x) \]

We find the gradient of f(x) which is (the partial derivative wrt to x, partial derivative wrt to y) \[ \nabla f(x) = (1/3x + 7,1/3y+25) \]

Then we find the gradient of g(x) our constraint which is (partial of x, partial of y) \[ \nabla g(x) = (1,1) \]

We then set it equal to each other and solve for lambda using algebra,

\[ 1/3x+7 = \lambda \\ 1/3y+25 = \lambda \]

Luckily since lambda is solved, we can then make the equation equal to each other and solve for x OR y we get that : \[ 1/3x+7=1/3y+25 \]

which gives us: \[ x=y+54 \]

Now that we have one variable represented in terms of the other we can now plug it into our constraint: so \[ x+y=96 \]

plugging in x we have: \[ y+54+y=96 \]

Now doing some algera we have that \[ y = 21 \]

and plugging our y value into the constraint now \[ x + 21 = 96 \]

we have our values where: \[ x=75,y=21 \]

Question 5:

To solve the double integral I first solved the integral for x and then solved the integral for y. \[ \iint e^{8x+3y}\,dx\,dy \]

first we integrate wrt to x and we get \[\int_2^4 e^{8x+3y} \, dx = \frac{1}8e^{8x+3y}\]

plugging in the bounds of the definite integral we have now

\[ 1/8e^{32+3y} - 1/8e^{16+3y}\]

now we solve for y \[ \int_2^4 1/8e^{32+3y} - 1/8e^{16+3y}\]

doing the same thing for y integrating and plugging in the bounds I got:

\[ 1/24(e^{44}-e^{39}) - 1/24(e^{28}-e^{22})\]