data_605_hw13

Q1

Use integration by substitution to solve the integral below.

\[\int_{}^{} 4e^{-7x}dx\]

\[u = -7x\] \[\frac{du}{dx} = -7\]

\[du = -7dx\]

\[dx = \frac{du}{-7}\]

\[\int_{}^{} 4e^{u}\frac{du}{-7}\]

\[-\frac{4}{7}\int_{}^{}e^udu\]

\[= -\frac{4}{7} \times e^u\]

Now we can substitute u = -7x

\[= -\frac{4}{7}e^{-7x} + C\]

Q2

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.

Q3

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

\[\int_{4.5}^{8.5} 2x - 9dx\] \[= (x^2 - 9x) \Big|_{4.5}^{8.5}\] \[= (8.5^2 - 9(8.5)) - (4.5^2 - 9(4.5))\] \[= 16\]

Q4

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

\[y = x^2 - 2x - 2,\ y = x + 2\]

Let’s first solve for x.

\[x^2 - 2x - 2 = x + 2\] \[x^2 - 3x - 4 = 0\] \[(x-4)(x+1) = 0\]

x is either 4 or -1, let’s take a look of the graph.

curve(x**2 - 2*x - 2, -5, 5)
curve(x+2, -5, 5, add = TRUE)

That seems right, let’s solve for the area.

\[A = \int_{-1}^4 x+2dx - \int_{-1}^4 x^2 - 2x - 2dx\] \[A = [\frac{1}{2}x^2+2x]\Big|_{-1}^4 - [\frac{1}{3} x^3 - x^2 - 2x]\Big|_{-1}^4\] \[A = [-\frac{1}{3} x^3 + \frac{3}{2}x^2 + 4x]\Big|_{-1}^4\]

x <- 4
y <- -1
area <- (-1/3 * x**3 + 3/2 * x**2 + 4 * x) - (-1/3 * y**3 + 3/2 * y**2 + 4 * y)
   
print(glue("The area is approximately ", round({area}, 2)))
## The area is approximately 20.83

Q5

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.

This is the cost function assembled from above statement. There are x numbers of flat irons per order, so the number of orders would be equal to 110 / x. The fixed cost would be $8.25 times 110 / x. The storage fee is $3.75 per flat iron, so that would be $3.75 times x, and assume that half of them are in storage on average, so that would be $3.75 times x divided by 2. We need to derive C(x) and set C’(x) = 0 in order to find the critical point(s) for minimizing C(x).

Apply Chain Rule to find first derivative.

\[ C(x)=\frac{3.75x}{2} + \frac{8.25 * 110}{x}\\ C(x)=1.875x + \frac{907.5}{x}\\ C '(x)=1.875-\frac{907.5}{x^{2}} \] Solve for critical point(s).

\[ 0=1.875-\frac{907.5}{x^{2}}\\ \frac{907.5}{x^{2}}=1.875\\ 907.7=1.875 x^{2}\\ x^{2}=\frac{907.5}{1.875}\\ x=22 \] Hence, in order to minimize cost, we find that x is equal to 22, meaning 22 flat irons per order. Since we have 110 flat irons, we assume to have 110 / 22, i.e. 5 orders.

Q6

Use integration by parts to solve the integral below.

\[\int \ln(9x) \cdot x^6dx\]

“Integration By Parts” by Professor Dave Explains - https://www.youtube.com/watch?v=zNU8iK8sGD0

Very well worth watching.

Below is the formula of the integration by parts and now it is possible to integrate the product of any two functions using this formula.

\[\int f(x) g'(x) = f(x)g(x) - \int f'(x)g(x)\] \[f(x) = \ln(9x)\] \[f'(x) = \frac{1}{x}dx\] \[g'(x) = x^6dx\] \[g(x) = \frac{x^7}{7}\]

Plug them back into the formula.

\[\frac{x^{7}ln(9x)}{7}-\int \frac{1}{7}x^{7}\frac{1}{x}dx\\\]

\[\frac{x^{7}ln(9x)}{7}-\frac{1}{7} \int \frac{x^{7}}{x}dx\\\]

\[\frac{x^{7}ln(9x)}{7}-\frac{1}{7}\int x^{6}dx\\\] \[\frac{x^{7}ln(9x)}{7}-\frac{1}{7}(\frac{x^{7}}{7})+C\\\]

\[\frac{x^{7}ln(9x)}{7}-\frac{x^{7}}{49}+C\]

Q7

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}\]