library(knitr)
Solution:
data = matrix(c(5.6, 6.3, 7, 7.7, 8.4, 8.8, 12.4, 14.8, 18.2, 20.8), nrow=5,ncol=2)
data.df <- data.frame(data)
kable(data.df, align='l', caption = "Sample Data", row.names=FALSE)
| X1 | X2 |
|---|---|
| 5.6 | 8.8 |
| 6.3 | 12.4 |
| 7.0 | 14.8 |
| 7.7 | 18.2 |
| 8.4 | 20.8 |
summary(data.df)
## X1 X2
## Min. :5.6 Min. : 8.8
## 1st Qu.:6.3 1st Qu.:12.4
## Median :7.0 Median :14.8
## Mean :7.0 Mean :15.0
## 3rd Qu.:7.7 3rd Qu.:18.2
## Max. :8.4 Max. :20.8
data.lm <- lm(X2 ~ X1, data = data.df)
plot(data.df$X1, data.df$X2, xlab = 'X1', ylab = 'X2', main='X1 Vs. X2')
abline(data.lm, col="red")
Scatterplot explains as value of X1 increases value of X2 is also increasing. Looking at the plot, we can assume both X1 and X2 are linearly related.
data.lm
##
## Call:
## lm(formula = X2 ~ X1, data = data.df)
##
## Coefficients:
## (Intercept) X1
## -14.800 4.257
Regression model(line) \(X2 = -14.800 + 4.267X1\). The model suggests that for every one unit increase in X1, value of X2 goes up by 4.267 units.
Solution:
Equation: \(f(x,y) = 24x - 6xy^2 - 8y^3\)
First derivative of the equation with respect to \(x\) = \(f_x = 24 - 6y^2\)
First derivative of the equation with respect to \(y\) = \(f_y = -12xy - 24y^2\)
Second derivative of the equation with respect to \(x\) = \(f_{xx} = 0\)
Second derivative of the equation with respect to \(y\) = \(f_{yy} = -12x - 48y\)
Second derivative of the equation with respect to \(xy\) = \(f_{xy} = \frac{d}{dx} = (24 - 6y^2)\)
= \(f_{xy} = -12y\)
Using first derivative equations, let \(f_x = 0\)
\(f_x = 24 - 6y^2\)
\(24 - 6y^2 = 0\)
Solving the equation,
\(y = \pm 2\)
Substituting the values of \(y\), in the first derivative \(f_y = -12xy - 24y^2\), let \(f_y = 0\)
Solving the equation,
for \(y = -2\), \(x = 4\), when \(y = 2\), \(x = -4\)
Critical points are \((4,-2), (-4,2)\)
Using second derivative test, \(D(a, b) = f_{xx}(a,b)\times f_{yy}(a,b) - [f_{xy}(a,b)]^2\)
for critical point \((4, -2)\)
\(D(4, -2) = f_{xx}(4, -2)\times f_{yy}(4, -2) - [f_{xy}(4, -2)]^2\)
= \(0 \times (-12(4) - 48(-2)) - [-12(-2)]^2\)
= \(-576\)
for critical point \((-4, 2)\)
\(D(-4, 2) = f_{xx}(-4, 2)\times f_{yy}(-4, 2) - [f_{xy}(-4, 2)]^2\)
= \(0 \times (-12(-4) - 48(2)) - [-12(2)]^2\)
= \(-576\)
Conclusion,
Since we have negative value \(-576\), for both critical points, we do not have local minima.
Also, \(D\) is negative and same at both critical points, it cannot be local maxima.
Saddle poinnts are \((-4, 2), (4, -2)\)
Solution:
Revenues from selling house brand for \(\$x\) = \(price \times number~ of~ units\) = \(x \times (81 - 21x + 17y)\)
revenues from selling name brand for \(\$y\) = \(price \times number~ of~ units\) = \(y \times (40 + 11x + 23y)\)
Total revenues \(R(x,y) = x \times (81 - 21x + 17y) + y \times (40 + 11x + 23y)\)
\(R(x,y) = 81x-21x^2+ 28xy+40y-23y^2\)
Price of house brand \(\$2.30\), name brand \(\$4.10\)
Total revenues, \(81(2.30)-21(2.30)^2+ 28(2.30)(4.10)+40(4.10)-23(4.10)^2\) = \(\$116.62\)
Solution:
If cost is spread evenly between Los Angels and Denver plants, then cost differentiation should be equal to zero.
\(\frac{d}{dx}C(x,y) = 0\)
\(\frac{d}{dx}C(x,y) = \frac{d}{dx}(\frac{1}{6}x^2 + \frac{1}{6}y^2 + 7x + 25y + 700)\)
\(\frac{d}{dx}(\frac{1}{6}x^2 + \frac{1}{6}y^2 + 7x + 25y + 700) = 0\)
Since \(x + y = 96, y = 96 - x\), substituting the values
\(\frac{d}{dx}(\frac{1}{6}x^2 + \frac{1}{6}(96 - x)^2 + 7x + 25(96 - x) + 700) = 0\)
\(\frac{d}{dx}(\frac{1}{6}x^2 + \frac{1}{6}(96^2 + x^2 -192x) + 7x + 2400 - 25x + 700) = 0\)
\(\frac{d}{dx}(\frac{1}{6}x^2 + \frac{1}{6}(96^2 + x^2 -192x) -18x + 3100) = 0\)
\(\frac{d}{dx}(\frac{1}{6}x^2 + \frac{1}{6}x^2 -32x + 1536 -18x + 3100) = 0\)
\(\frac{d}{dx}(\frac{1}{3}x^2 -50x + 4636) = 0\)
\(\frac{2}{3}x -50 = 0\)
\(x = 75\)
Therefore \(y = 96-x\), \(y = 21\)
To keep the costs minimum, company has to produce \(75\) units in Los Angels and \(21\) units in Denver plants.
Solution:
\(\int^4_2 \int^4_2 e^{(8x+3y)} dx~ dy\)
= \(\int^4_2 \int^4_2 (e^{8x}\times e^{3y}) dx~ dy\)
= \(\int^4_2 \int^4_2 (e^{8x}\times e^{3y}) dx~ dy\)
= \(\int^4_2 e^{3y}\int^4_2 e^{8x} dx~ dy\)
= \(\int^4_2 (e^{3y}\times \frac{1}{8} \times e^{8x}) |_2^4 dy\)
= \(\int^4_2 (\frac{1}{8} e^{(8x+3y)}) |_2^4 dy\)
= \(\int^4_2 (\frac{e^{(8\times 4+3y)}}{8} - \frac{e^{(8\times 2+3y)}}{8}) dy\)
= \(\int^4_2 (\frac{e^{32}\times e^{3y}}{8} - \frac{e^{16}\times e^{3y}}{8}) dy\)
= \(\int^4_2 \frac{e^{16}\times e^{3y}}{8} (e^{2} - 1) dy\)
= \(\frac{(e^{2} - 1)e^{16}}{8}\int^4_2e^{3y} dy\)
= \((\frac{(e^{2} - 1)e^{16}}{8} \times \frac{e^{3y}}{3}) |^4_2\)
= \((\frac{(e^{32} - e^{16})}{8} \times \frac{e^{3y}}{3}) |^4_2\)
= \((\frac{(e^{32} \times e^{3y} - e^{16}\times e^{3y})}{24}) |^4_2\)
= \((\frac{e^{(32+3y)}- e^{(16+3y)}}{24}) |^4_2\)
= \((\frac{e^{(32+3\times 4)}- e^{(16+3\times 4)}}{24} - (\frac{e^{(32+3\times 2)}- e^{(16+3\times 2)}}{24}))\)
= \((\frac{e^{44}- e^{28}}{24} - \frac{e^{38}+ e^{22}}{24})\)
= \((\frac{e^{44}- e^{28} -e^{38}+ e^{22}}{24})\)