Solution
x <- c(5.6, 6.3, 7, 7.7, 8.4)
y <- c(8.8, 12.4, 14.8, 18.2, 20.8)
regression <- lm(y~x)
summary(regression)
##
## Call:
## lm(formula = y ~ x)
##
## 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
The equation of the regression line:
y = -14.80 + 4.26 * x
# Plot the chart.
plot(y,x, main = "The regression line for the given points")
abline(lm(x~y),cex = 1.3,pch = 10, xlab = "x",ylab = "y")
\(f(x,y)=24x-6xy^2-8y^3\)
Solution
partial derivatives:
\(f_x(x,y)=24-6y^2\)
\(f_y(x,y)=-12xy-24y^2\)
\(f_{xx}(x,y)=0\)
\(f_{yy}(x,y)=-12x-48y\)
\(f_{xy}(x,y)=-12y\)
When \(f_x=0, f_y=0\), The critical points:
\(f_x(x,y)=24-6y^2=0\)
\(y=\pm2\)
\(f_y(x,y)=-12xy-24y^2=0\)
\(-xy-2y^2=0\)
when \(y = 2, x = -4\)
when \(y = -2, x = 4\)
The critical points are (-4, 2) and (4, -2).
Using the Second Derivative Test:
\(D = D(x,y) = f_{xx}(x,y) f_{yy}(x,y) - f_{xy}(x,y)^2\)
saddle point: D > 0 is max or D < 0 is min
\(f_{xx}(x,y)=0, f_{yy}(x,y)=-12x-48y, f_{xy}(x,y)=-12y\)
\(D=(0)*(-12x-48y)-(-12y)^2=-144y^2\)
at \((4, -2)\):
\(D=-576<0\)
\(f_{yy}(x,y)=-12x-48y=48\)
at \((-4, 2)\):
\(D=-576<0\)
\(f_{yy}(x,y)=-12x-48y=48\)
So (4, -2) and (-4, 2) are saddle points.
Step 1. Find the revenue function \(R(x,y)\).
Solution
\(Revenue = (Units Sold) x (Sales Price)\) \(R(x,y)=x-(81-21x+17y)+y-(40+11x-23y)\) \(R(x,y)=81x-21x2+17xy+40y+11xy-23y^2\) \(R(x,y)=-21x^2-23y^2+81x+40y+28xy\)
Step 2. What is the revenue if she sells the “house” brand for $2.30 and the “name” brand for $4.10?
Solution
fun<- function(x,y){-21*(x^2) - 23*(y^2) + 81*x + 40*y + 28*x*y}
revenue <- fun(2.30, 4.10)
print(paste0("Revenue: $", round(revenue, 2)))
## [1] "Revenue: $116.62"
\(C(x,y)=\frac{1}{6}x^2+\frac{1}{6}y^2+7x+25y+700\), where x is the number of units produced in Los Angeles and y is the number of units produced in Denver. How many units should be produced in each plant to minimize the total weekly cost?
Solution
Total number of units produced is 96, x from Los Angeles and y from Denver.
\(x+y=96\)
\(y=96-x\)
So
\(C(x,y)=\frac{1}{6}x^2+\frac{1}{6}y^2+7x+25y+700\)
\(C(x,y)=\frac{1}{6}x^2+\frac{1}{6}(96-x)^2+7x+25(96-x)+700\)
\(C(x)=\frac{1}{6}x^2+\frac{9216-192x+x^2}{6}+7x+2400-25x+700\)
\(C(x)=\frac{1}{6}x^2+1536-32x+\frac{x^2}{6}+7x+2400-25x+700\)
\(C(x)=\frac{1}{3}x^2-50x+4636\)
Find the critical points in function \(C(x)\):
\(C_x(x)=\frac{2}{3}x-50\)
\(\frac{2}{3}x-50=0\)
\(x=75\)
So we know:
\(y=21\) the critical point: (75,21)
So the conlcusion is 75 units should be produced in Los Angeles, and 21 units should be produced in Denver to minimize the costs.
\(\iint_R(e^{8x+3y})\,\mathrm{d}A;R:2â¤xâ¤4\) and \(2â¤yâ¤4\)
Write your answer in exact form without decimals.
Solution
\(\int_{y = 2}^{y = 4} \int_{x = 2}^{x = 4} (e^{8x + 3y}) dx\, dy\)
\(=\int_2^4\int_2^4(e^{8x}e^{3y}) dx\, dy\)
\(=\int_2^4\int_4^2(e^{8x}e^{3y}) dx\, dy\)
\(=\int_2^4\frac{1}{8}e^{3y+32}-\frac{1}{8}e^{3y+16}\, dy\)
\(=\int_2^4\frac{1}{8}(e^{16}-1)e^{3y+16}\, dy\)
\(=\frac{e^{44}-e^{28}}{24}-\frac{e^{38}-e^{22}}{24}\)
\(=\frac{1}{24}(e^{22}-e^{28}-e^{38}+e^{44})\)