x <- c(5.6, 6.3, 7, 7.7, 8.4)
y <- c(8.8, 12.4, 14.8, 18.2, 20.8)
regressionline <- lm(y ~ x)
regressionline
##
## Call:
## lm(formula = y ~ x)
##
## Coefficients:
## (Intercept) x
## -14.800 4.257
\(equation: y= −14.8 + 4.257x\)
\(\frac{df}{dx} = \frac{d}{dx}(24x-6xy^2-8y^3)\) \(0=24-6y^2\) \(24=6y^2\) \(4=y^2\) \(y=2,-2\)
\(0=-12xy-24y^2\) y = 2, x = -4 y = -2, x = 4
critical points are (-4,2)(4,2)
\(f_{xx} = 0\) \(f_{yy} = -12 - 48y\) \(f_{xy} = -12y\)
\(D(-4,2) = 0 * 84 - 24^2 = -576\) \(D(4,-2) = 0 * -108 + 24^2 = -576\)
Both critical points are saddle points
x <- c(4,-4)
y <- c(-2,2)
df <- data.frame(x,y)
df$z <- 24 * df$x - 6* df$y * (df$x^2) - 8 * df$y^3
print(df$z)
## [1] 352 -352
(4, -2, 352), (-4, 2, -352)
Revenue = \(x(81−21x+17y) + y(40+11x−23y)\) R(x, y) = \(81x−21x^2+28xy+40y−23y^2\)
Step 2. What is the revenue if she sells the “house” brand for 2.30 and the “name” brand for 4.10?
x <- 2.3
y <- 4.1
z <- 81*x - 21*(x^2) + 28*x*y + 40*y - 23*(y^2)
z
## [1] 116.62
x+y=96 y = 96 - x
Put Y into the equation = \(x^2 + (96 - x)^2 + 7x + 25(96-x) + 700\) $ = x^2 + 1536 - 32x + + 7x + 2400 - 25x + 700$ $ = x^2 - 50x + 4636$
Minima critical point : C′(x)=0
\(C′(x)=\frac{2}{3}x−50=0\) \(x = 75\)
75 + y = 96 \(y = 21\)