Problem 1:

Use integration by substitution to solve the integral below.

Solve the integral: \[ \int 4e^{-7x} \, dx \]

Solution

Using substitution method, let \(u = -7x\). Therefore, \(du = -7dx\) or \(dx = -\frac{1}{7}du\). Substituting into the integral, we get: \[ \int 4e^{u} \cdot \frac{du}{-7} = -\frac{4}{7} \int e^{u} \, du = -\frac{4}{7}e^{u} + C \] Converting back to \(x\), the solution is: \[ -\frac{4}{7}e^{-7x} + C \]

Problem 2:

Biologists are monitoring a pond contaminated with bacteria. They observe that the level of contamination changes at a rate given by the differential equation:

\[ \frac{dN}{dt} = -\frac{3150}{t^4} - 220 \]

where \(t\) is the number of days since the treatment began. The goal is to find the function \(N(t)\) that estimates the level of contamination.

Solution

To find \(N(t)\), we need to integrate the rate of change of contamination:

\[ N(t) = \int \left(-\frac{3150}{t^4} - 220\right) \, dt \]

This integral can be computed as follows:

\[ N(t) = \int -\frac{3150}{t^4} \, dt - \int 220 \, dt \]

The integration of each term separately yields:

\[ N(t) = 1050 \frac{1}{t^3} - 220t + C \]

where \(C\) is the integration constant.

Applying the Initial Condition

Given the initial condition that after 1 day the level of contamination was 6530 bacteria per cubic centimeter, we set \(t = 1\) and \(N(1) = 6530\) to find \(C\):

\[ 1050 \cdot \frac{1}{1^3} - 220 \cdot 1 + C = 6530 \]

\[ 1050 - 220 + C = 6530 \]

\[ C = 6530 - 1050 + 220 = 5700 \]

Thus, the function that models the level of contamination \(N(t)\) is:

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

This R code numerically integrate the rate of change from day 1 to any given day t and plot the level of contamination over time, applying the initial condition that the level of contamination after 1 day was 6530 bacteria per cubic centimeter.

# Define the rate of change of the bacteria contamination
rate_of_change <- function(t) {
  -3150 / t^4 - 220
}

# Define the time points
time_points <- seq(from = 1, to = 10, by = 0.1)

# Numerically integrate the rate of change
# We set up a small function to perform the integration from 1 to any time t
N_t <- sapply(time_points, function(t) {
  integrate(rate_of_change, lower = 1, upper = t)$value
})

# Add the initial condition to the integrated values
# Initial condition: N(1) = 6530 bacteria per cubic centimeter
N_t <- N_t + 6530

# Plot the function N(t)
plot(time_points, N_t, type = 'l', col = 'blue', xlab = 'Days since treatment (t)', ylab = 'Level of contamination (N(t))', main = 'Bacteria Contamination Over Time')

Problem 3

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

Calculating the Area Under the Line

Given the line \(f(x) = 2x - 9\), we want to calculate the area under this line and above the x-axis from where the line intersects the x-axis up to \(x = 8\), where the line reaches \(y = 7\).

First, we find the x-coordinate where \(f(x)\) intersects the x-axis:

\[ 0 = 2x - 9 \implies x = \frac{9}{2} = 4.5 \]

Next, we set up the integral to calculate the area of the triangle formed by the x-axis, the line, and the line \(x = 8\):

\[ A = \int_{4.5}^{8} (2x - 9) \, dx \]

This integral can be computed as follows:

\[ A = \left[ x^2 - 9x \right]_{4.5}^{8} \]

Evaluating the antiderivative at the bounds gives us:

\[ A = \left( 8^2 - 9 \cdot 8 \right) - \left( 4.5^2 - 9 \cdot 4.5 \right) \]

Simplifying the above expression will yield the area of the triangle:

\[ A = (64 - 72) - \left( 20.25 - 40.5 \right) = -8 + 20.25 = 12.25 \]

Thus, the area of the red triangle under the line \(f(x) = 2x - 9\) is 12.25 square units.

This integral represents the area of the triangle that is formed by the x-axis, the line itself, and the vertical line at \(x = 8\), which is where the line intersects \(y = 7\).

We calculate this integral using R:

# Define the function
f <- function(x) { 2*x - 9 }

# Calculate the definite integral from 4.5 to 8
area <- integrate(f, lower = 4.5, upper = 8)$value
area
## [1] 12.25

Problem 4

Find the area of the region bounded by the graphs of the given equations: \[ y = x^2 - 2x - 2, \quad y = x + 2. \]

We want to find the area bounded by the parabola \(y = x^2 - 2x - 2\) and the line \(y = x + 2\).

First, we find the points of intersection between the parabola and the line by equating the two equations:

\[\begin{align*} x^2 - 2x - 2 &= x + 2 \\ x^2 - 3x - 4 &= 0 \end{align*}\]

This is a quadratic equation, which can be factored or solved using the quadratic formula. Factoring gives us:

\[\begin{align*} (x - 4)(x + 1) &= 0 \end{align*}\]

Thus, the points of intersection are \(x = 4\) and \(x = -1\).

To find the area between the two curves, we integrate the difference of the functions from the lower intersection point to the upper intersection point:

\[\begin{align*} A &= \int_{-1}^{4} \left[ (x + 2) - (x^2 - 2x - 2) \right] \, dx \\ &= \int_{-1}^{4} (-x^2 + 3x + 4) \, dx \\ &= \left[ -\frac{1}{3}x^3 + \frac{3}{2}x^2 + 4x \right]_{-1}^{4} \\ &= \left( -\frac{1}{3}(4)^3 + \frac{3}{2}(4)^2 + 4(4) \right) - \left( -\frac{1}{3}(-1)^3 + \frac{3}{2}(-1)^2 + 4(-1) \right) \\ &= \left( -\frac{64}{3} + 24 + 16 \right) - \left( \frac{1}{3} + \frac{3}{2} - 4 \right) \\ &= \left( -\frac{64}{3} + \frac{72}{3} + \frac{48}{3} \right) - \left( \frac{1}{3} + \frac{3}{2} - \frac{12}{3} \right) \\ &= \left( \frac{56}{3} \right) - \left( -\frac{7}{6} \right) \\ &= \frac{56}{3} + \frac{7}{6} \\ &= \frac{112}{6} + \frac{7}{6} \\ &= \frac{119}{6} \end{align*}\]

The exact area of the region bounded by the two given curves is \(\frac{119}{6}\) square units.

The area is calculated using R:

# Define the functions
f1 <- function(x) { x + 2 }
f2 <- function(x) { x^2 - 2*x - 2 }

# Calculate the definite integral of the difference of the functions
area <- integrate(function(x) { f1(x) - f2(x) }, lower = -1, upper = 4)$value
area
## [1] 20.83333

Problem 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. Determine the lot size and the number of orders per year that will minimize inventory costs.

The Economic Order Quantity (EOQ) model is used to minimize the total inventory costs, which include both the ordering costs and the holding costs. The model calculates the optimal order size that minimizes these costs.

Given:

The total cost function \(TC\) for inventory is defined as the sum of ordering costs and holding costs:

\[ TC(Q) = \left(\frac{D}{Q}\right) S + \left(\frac{Q}{2}\right) H \]

Where \(Q\) is the order quantity.

To find the optimal order quantity, we take the derivative of the total cost function with respect to \(Q\) and set it to zero:

\[ \frac{d}{dQ} \left( \frac{D}{Q} S + \frac{Q}{2} H \right) = 0 \]

\[ -\frac{D}{Q^2} S + \frac{1}{2} H = 0 \]

\[ \frac{D}{Q^2} S = \frac{1}{2} H \]

\[ Q^2 = \frac{2DS}{H} \]

\[ Q = \sqrt{\frac{2DS}{H}} \]

Plugging in the values:

\[ Q = \sqrt{\frac{2 \times 110 \times 8.25}{3.75}} \]

The EOQ and the number of orders per year are computed using R.

# Given values
D <- 110  # Annual demand
S <- 8.25 # Ordering cost per order
H <- 3.75 # Holding cost per unit per year

# Calculate EOQ (Economic Order Quantity) using the formula derived from calculus
EOQ <- sqrt((2 * D * S) / H)

# Calculate the number of orders per year
num_orders <- D / EOQ

# Output the results
print(paste("EOQ (Optimal Order Quantity):", EOQ))
## [1] "EOQ (Optimal Order Quantity): 22"
print(paste("Number of Orders per Year:", num_orders))
## [1] "Number of Orders per Year: 5"

Problem 6

Use integration by parts to solve the integral below: \[ \int x \ln(9x) \, dx \]

Integration by Parts

We are asked to solve the integral using integration by parts:

\[ \int \ln(9x) \cdot x \, dx \]

We choose: \[ u = \ln(9x), \quad dv = x \, dx \]

We then differentiate and integrate to find \(du\) and \(v\): \[ du = \frac{1}{x} \, dx, \quad v = \frac{x^2}{2} \]

Using the integration by parts formula: \[ \int u \, dv = uv - \int v \, du \]

We substitute \(u\), \(dv\), \(du\), and \(v\): \[ \int \ln(9x) \cdot x \, dx = \frac{x^2}{2} \ln(9x) - \int \frac{x^2}{2} \cdot \frac{1}{x} \, dx \] \[ = \frac{x^2}{2} \ln(9x) - \int \frac{x}{2} \, dx \] \[ = \frac{x^2}{2} \ln(9x) - \frac{x^2}{4} + C \]

Where \(C\) is the constant of integration. This gives us the solution to the integral.

# Define the functions
u <- function(x) log(9*x)
dv <- function(x) x

# Differentiate u and integrate dv
du <- function(x) 1/x
v <- function(x) (x^2)/2

# Integration by parts formula
integration_by_parts <- function(u, du, v, x) {
  u(x) * v(x) - integrate(function(t) v(t) * du(t), lower = 0, upper = x)$value
}

# Calculate the integral at a point
integration_by_parts(u, du, v, 1)  # Example calculation at x = 1
## [1] 0.8486123

Problem 7

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

Solution

Determining a Probability Density Function

Given the function \(f(x) = \frac{1}{6x}\) on the interval \([1, e^6]\), we want to determine if it is a probability density function. For \(f(x)\) to be a PDF, the integral of \(f(x)\) from \(1\) to \(e^6\) must be equal to 1.

The integral of \(f(x)\) is:

\[ \int_1^{e^6} \frac{1}{6x} \, dx = \frac{1}{6} \int_1^{e^6} \frac{1}{x} \, dx = \frac{1}{6} \ln(x) \Bigg|_1^{e^6} \]

Evaluating the integral gives us:

\[ \frac{1}{6} \left[ \ln(e^6) - \ln(1) \right] = \frac{1}{6} \left[ 6 - 0 \right] = 1 \]

Since the integral evaluates to 1, the function \(f(x)\) is indeed a probability density function on the interval \([1, e^6]\).

# Calculate the integral of f(x) over the interval [1, e^6]
integral_result <- (1/6) * (log(exp(6)) - log(1))
integral_result
## [1] 1