1. Use integration by substitution to solve the integral below.

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

Let u = -7x

\[\frac {du} {dx} = -7\] \[\frac {du} {-7} =dx\] \[\frac {-4} {7} \int e^u du\] \[\frac {-4} {7} e^u \]

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

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.

\[\frac {dN} {dt} = \frac {- 3150} {t^4} - 220 \] \[N = 3150 \frac {t^-3} {-3} - 220t + C \] t=1 N=6530

\[6530 = -1050 (1^{-3}) - 220(1) + C \] \[6530 + 1270 = C \] \[7800 = C \]

\[N = \frac {-3150}{3t^3} - 220t + 7800 \] \[N = \frac {-1050}{t^3} - 220t + 7800 \]

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

\[ Area = \int_{4.5}^{8.5} 2x - 9 dx\] \[ Area = \bigg[x^2 - 9x \bigg] _{4.5}^{8.5} \]

\[ Area = \bigg[8.5^2 - 9 * 8.5 \bigg] - \bigg[4.5^2 - 9 * 4.5 \bigg] \]

Area <- (8.5^2 - 9*8.5) - (4.5^2 - 9*4.5)

Area
## [1] 16

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

\[ y =x^2 -2x - 2, y = x + 2 \] \[A = (x^2 - 2*x - 2 ) \] \[B = x + 2\]

\[Area =A-B\]

\[ (x^2 - 2*x - 2 ) - (x +2)\]

\[ (x^2 - 2x - 2 - x - 2)\]

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

\[ x = -1 and 4 \]

\[ \int_{-1}^{4}f(x)dx = \int_{-1}^{4} (x^2 - 3x - 4 )\] \[ = \bigg[ \frac {(x^3)}{3} - \frac{3x^2}{2} - 4x ) \bigg]_{-1}^{4}\] \[ = \bigg[ \frac {(64)}{3} - \frac{48}{2} - 16 ) \bigg] - \bigg[ \frac {(-1)}{3} - \frac{3}{2} + 4\bigg]\] \[ = \bigg[ \frac {64}{3} - 40 \bigg] - \bigg[ \frac {-1}{3} - \frac{3}{2} + 4\bigg]\]

a <- 64/3 - 40 + (1/3) + (3/2) -4
a
## [1] -20.83333
# create functions a and b
f <- function(x) {x^2-2*x-2}
g <- function(x) {x+2}
# plot to visualize
curve(f, -6, 6)
curve(g, -6, 6, add=TRUE)

# integrate g
g_area <- integrate(g, lower = -1, upper = 4)
# integrate f
f_area <- integrate(f, lower = -1, upper = 4)
g_area$value - f_area$value
## [1] 20.83333

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.

lot size = x units/order

Annual Cost = Annual storage cost * Average no. of items carried out a year

Annual Cost = 3.75.x/2 =1.875x

\[Annual Order Cost = Cost of Order * number of orders/year = (8.25 * 110/x)\]

\[Total inventory cost = 1.875x + (8.25 * 110/x)\] \[y = 1.875x + (907.5/x)\] \[y` = 1.875x + (907.5/x) = 0\] \[ 1.875 - (907.5/x^2) = 0 \] \[ x^2= 907.5/1.875 \]

\[ x^2= 206.25 \]

A <- sqrt(206.25)
A
## [1] 14.36141

lot size =14.36/order

ordperyear <- 110/14.36
ordperyear
## [1] 7.660167

Orders per year = 7.6

6. Use integration by parts to solve the integral below.

\[ Area = \int ln(9x).x^6 dx\]

\[U = ln(9x)\] \[dU = \frac {1} {x} dx \] \[dV = x^6dx\] \[V = \frac {1} {7} x^7\] \[UdV = UV - \int VdU \]

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

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

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} \] \[ F(x) = \int_{1}^{e^6} f(x) dx = 1 \] substituting f(x)

\[ F(x) = \int_{1}^{e^6} \frac {1} {6x} dx \] \[ F(x) = \frac {1} {6} \int_{1}^{e^6} \frac {1} {x} dx \]

\[ F(x) = \frac {1} {6} \bigg[ln(x) \bigg]_{1}^{e^6} \]

\[ F(x) = \frac {1} {6} \bigg[ln(e^6) - ln(1) \bigg] \] \[ F(x) = \frac {1} {6} \bigg[6 - 0 \bigg] = 1 \]