DATA605_HW13_Univariate & Multivariate Calculus

Question 1

Use integration by substitution to solve the integral below.

\(\int{4e^{-7x}dx}\)

Solution 1

Let \(u=-7x\), then \(du = -7dx\). \(dx = -\frac{du}{7}\)

\[ \begin{split} \int{4e^{-7x}dx} & = \int{4e^{u}\left ( \frac{-du}{7} \right )} \\ &= -\frac{4}{7}\int{e^u du} \\ &= \frac{-4}{7}e^u+constant \\ &= -\frac{4}{7}e^{-7x}+ constant \end{split} \]

Question 2

Biologists are treating a pond contaminated with bacteria. The level of contamination is changing at a rate of \(\frac{dN}{dt} = -\frac{3150}{t^4}-220\) bacteria per cubic centimeter per day, where \(t\) is the number of days since treatment began. Find a function \(N(t)\) to estimate the level of contamination if the level after \(1\) day was \(6530\) bacteria per cubic centimeter.

Solution 2

$$ = N’(t) = -220 \ N(t) = \ = -220t+C \ Since N(1)= 6530, then \

\[\begin{split} N(t) &= \frac{1050}{t^3}-220t+C \\ N(1) &= 6530 \\ \frac{1050}{1^3}-220\times 1 +C &= 6530 \\ C &= 6530 - 1050 + 220 \\ C &= 5700 \end{split}\]

$$

Since \(N(1)= 6530\), then

The level of contamination can be estimated by the following function:

\(N(t) = \frac{1050}{t^3}-220t+5700\)

Question 3

Find the total area of the red rectangles in the figure below, where the equation of the line is \(f(x)=2x-9\).

Solution 3

Each square in the graph has an area of \(1\). Each rectangle has a width of \(1\). Counting the height of each rectangle mark in yellow gives the areas as: \(Area=1+3+5+7=16\).

or we can also solve it using R function

#Find area in-build function
Q3 = function(x) {2*x -9}
#Find the difference between areas under the curve
area <- integrate(Q3, 4.5, 8.5)$value
area <- round(as.numeric(area))
print(area)
## [1] 16

Question 4

Find the area of the region bounded by the graphs of the given equations.

\(y_1 = x_1^2 - 2x_1-2\)
\(y_2 = x_2 + 2\)

Solution 4

To get the area of the region bounded by the two equation, we first solve the two equation to get the upper and the lower limit.

\(y=x^{2}−2x−2\)  \(y=x+2\)

we equate and solve both as quadratic equation to get be bounded region.

\(x^{2}−2x−2 = x+2\)

\(x^{2}−2x-x-2−2 = 0\)

\(x^{2}−3x-4 = 0\)

\((x+1)(x-4) = 0\)

\(x = -1\) or \(x = 4\)

The upper limit of the integral is 4 while the lower limit is -1

#Find area in-build function
f1 = function(x) {x + 2}
f2 = function(x) {x^2 -2*x -2}
#Find the difference between areas under the curve
area1 <- integrate(f1, -1, 4)
area2 <- integrate(f2, -1, 4)
area <- round((area1$value - area2$value),4)
print(area)
## [1] 20.8333

Question 5

A beauty supply store expects to sell 110 flat irons during the next year. It costs $3.75 to store one flat iron for one year. There is a fixed cost of $8.25 for each order. Find the lot size and the number of orders per year that will minimize inventory costs.

Solution 5

Let \(x\) be a number of flat irons to order.

\(Yearly\ storage\ cost = {Storage\ cost\ per\ iron} \times {Average\ number\ of\ irons\ stored} = 3.75 \times x/2 = 1.875x\)

\(Yearly\ ordering\ cost = {Cost\ of\ each\ order} \times {Number\ of\ orders} = 8.25 \times 110/x = 907.5/\)

\(Inventory\ cost = Yearly\ storage\ cost + Yearly\ ordering\ cost = 1.875x+907.5/x = f(x)\)

To find the minimized value, differentiate and solve at \(0\):

\[ \begin{split} f'(x) &= 1.875-\frac{907.5}{x^2} \\ f'(x) &= 0 \\ 1.875-\frac{907.5}{x^2} &= 0 \\ 1.875&= \frac{907.5}{x^2} \\ 1.875x^2&= 907.5 \\ x^2&= \frac{907.5}{1.875} \\ x&= \sqrt{\frac{907.5}{1.875}} \\ x&=\sqrt{484} \\ x&=22 \end{split} \]

Each order should contain \(22\) flat irons, so there should be \(110/22=5\) orders.

Question 6

Use integration by parts to solve the integral below.

\(\int{ln(9x) \times x^6 dx}\)

Solution 6

Let \(u= ln(9x)\), then \(\frac{du}{dx}=\frac{1}{x}\).

Let \(\frac{dv}{dx}=x^6\), then \(v = \int{x^6 dx} = \frac{1}{7}x^7\).

Using the formula for integration by parts: \(\int{u \frac{dv}{dx}dx} = uv - \int{v \frac{du}{dx} dx}\)

\[ \begin{split} \int{ln(9x) \times x^6 dx} &= \frac{1}{7}x^7 \times ln(9x) - \int{\frac{1}{7}x^7 \times \frac{1}{x} dx} \\ &=\frac{1}{7}x^7 \times ln(9x) - \int{\frac{1}{7}x^6 dx} \\ &=\frac{7}{49}x^7 \times ln(9x) - \frac{1}{49}x^7 + constant \\ &=\frac{1}{49}x^7 (7ln(9x) - 1) + constant \\ \end{split} \]

Question 7

Determine whether \(f(x)\) is a probability density function on the interval \([1, e^6]\). If not, determine the value of the definite integral.

\(f(x) = \frac{1}{6x}\)

Solution 7

\[ \begin{split} \int_1^{e^6}\frac{1}{6x} dx &= \frac{1}{6} ln(x)|_1^{e^6} \\ &= \frac{1}{6} ln(e^6) - \frac{1}{6} ln(1) \\ &= \frac{1}{6} \times 6 - \frac{1}{6} \times 0 \\ &= 1 \end{split} \] The definite integral of the function on interval \([1, e^6]\) is \(1\). Additionally, if \(x>0\), then \(f(x)>0\), so for this interval \(f(x)>0\). As long as \(f(x)=0\) outside of the given interval, this satisfies PDF requirements and this function is a probability density function.