Assignment 13

1.

The definite integral of \(4e^{-7x}\) from 0 to 1 is given by: \[ \int_{0}^{1} 4e^{-7x} \,dx \]

Substitute u for -7x and find the derivative and solve for dx

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

Substitute dx into the original integral, replace -7x with u and dx with -1/7du and simplify:

\[\int 4e^u \left(-\frac{1}{7}du\right) \]

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

Integrate with respect to \(u\), and where c is constant of integration

\[ = -\frac{4}{7} \int e^u \,du = -\frac{4}{7}e^u + C \]

Substitute value back \(u = -7x\). So, answer is:

\[ = -\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 dN/dt = - 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.

The rate of change provided is the derivative and question3 asks to find N(t) so we have to find the integral of the function. Lets start with the easier one: integral of -220 is -220t + C

Rewrite this part to remove the fraction - 3150 (t^-4); using 1/(n+1) x ^ (n+1),

-1/3(t^-3) (- 3150) = t^-3 (1050)

Combine them 1050/t^3 -220t +c and use t= 1, for one day and make the function equal to 6530 bacteria to find the value of c

6530 = 1050/1^3 -220(1) +c
6530 = 1050 - 220(1) +c

6530 = 830 +c ===> 6530 - 830

5700= c

How can I use pracma function to double check value of C? (tried and wasnt able)

3.

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

-visual (can never figure out how to add in r markdown!) reminds me of 5.3 Riemann Sums (calculus text, note to review Left Hand, Right Hand and Midpoint Rules), which suggests to find the integral, but not from 0 to 1, from the x axis- where the box start and ends, maybe 4.5 to 8.5.

f <- function(x) {
  2*x - 9
}
lower_limit <- 4.5
upper_limit <- 8.5
area <- integrate(f, lower_limit, upper_limit)$value
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, Enter your answer below

Need to find points of intersection by setting them equal to eachother and making it equal to 0: x^ 2 - 2x -2= x + 2

x^ 2 - 2x -x -2 -2 = 0 x^2-3x -4 = 0. –> will use -3 since it b value

Add up to -3 and multiply to get -4 (x - 4) (x+1);

x= 4 and -1 (lower and upper bounds)

To continue manually I need to figure out which has the higher value at x=0 and subtract 0+2 > 0+0-2

x + 2 - (x^ 2 - 2x -2), simplify: x + 2 - x^2 +2x +2 ==>

-x^2+ 3x +4, now find the integral of this using 1/(n+1) x ^ (n+1)

-1/3 x^ 3 - 3/2x^2 + 4x + c

Plug in -1 and 4, and subtract

-4^3/3+(3*4^2)/2+4*4 - (-(-1)^3/3+(3*(-1)^2)/2+(-1)*4)
## [1] 20.83333

trying to double check in R

f <- function(x) x^2 - 2*x - 2
g <- function(x) x + 2

curve(f(x), from = -5, to = 5, ylab = "y", xlab = "x", main = "Graphs of f(x) and g(x)")
curve(g(x), add = TRUE)

points_of_intersection = function() {
#quadratic form
  solutions = polyroot(c(-4, -3, 1))
  real_solutions = Re(solutions)
  return(real_solutions)
}
# area between functions
find_area = function(intersections) {
  area = integrate(function(x) { g(x) - f(x) }, min(intersections), max(intersections))$value
  #absolute value bc area is +
  return(abs(area))
}
intersections = points_of_intersection()
area4 = find_area(intersections)
area4
## [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.

I was unsure how to approach this question and referenced the internet which informed me of the EOQ model, and average number of flat irons in storage is half of the lot size.

  • looking for lot size, means the number of flat irons, and minimum cost

  • order cost is 8.25/ per flat iron ie 8.25n

  • storage cost is 3.75/ each in storage but we dont know how many, using x, or half of x, ie 3.75 (x/2)

-total cost is 8.25n+ 3.75 (x/n)

  • predicted to sell 110, which is the demand, to get this value it is equal to the lot size* # of orders, ie 110= xn

-if we try to find n = 110/x, we can plug in this value for n in the total cost equation to have the equation with only x variables : 8.25 (110/n) + 3.75 (x/2)

  1. find the derivative:

8.25 (110 n^-1) -> -8.25 (110/x^2),

3.75(x/2) -> 3.75/2

  1. make the sum equal to zero: -8.25 (110/x^2) + 3.75/2 = 0 and solve for x –>multiply both sized by x^2

-907.5 + 3.75/2 (x^2) = 0, isolate x^2, 907.5 = 3.75/2 (x^2), x^2 = 484, square root of that is 22 which is the critical value

  1. plug in 22 in here 110= xn; n = 110/2 = 5
  • neither of these seem like the mimum cost though so going to plug them in
8.25* (5) + 3.75*(22/2)
## [1] 82.5

##6. Use integration by parts to solve the integral below. S ln(9x)· x ^6 dx

  • use the differential rule: ∫f g’= fg- ∫f’g

Let \(f = \ln(9x)\) and \(g' = x^6\)

Then, \(f' = \frac{1}{9x} \cdot 9 = \frac{1}{x}\)

\(g = \int g' = \int x^6 \, dx = \frac{1}{7}x^7\)

plug it in

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

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

##7.
Determine whether f ( x ) is a probability density function on the interval [1, e^ 6] . yes

If not, determine the value of the definite integral. f ( x ) = 1/ 6x

  • probability density function (pdf) = non negative & total under curve = 1

  • e is approximately 2.71828, so [1, e^6] is not negative

  • total under curve = 1, means find the integral of the function using brackets has lower and upper limit

  • move 1/6 and find antiderivative of 1/x which is ln plug in the values – 1/6 times

– (ln(e^6) = 6 minus

– ln (1) = 0

1/6 (6)= 1