Calculus The problems have been computed by hand as well on a separate pdf document.

  1. Use integration by substitution to solve the integral below. \(\int{4e^{-7x} dx}\)

Use substitution to solve:

library(mosaic)
## Warning: package 'mosaic' was built under R version 4.0.5
## Registered S3 method overwritten by 'mosaic':
##   method                           from   
##   fortify.SpatialPolygonsDataFrame ggplot2
## 
## The 'mosaic' package masks several functions from core packages in order to add 
## additional features.  The original behavior of these functions should not be affected by this.
## 
## Attaching package: 'mosaic'
## The following objects are masked from 'package:dplyr':
## 
##     count, do, tally
## The following object is masked from 'package:Matrix':
## 
##     mean
## The following object is masked from 'package:ggplot2':
## 
##     stat
## The following objects are masked from 'package:stats':
## 
##     binom.test, cor, cor.test, cov, fivenum, IQR, median, prop.test,
##     quantile, sd, t.test, var
## The following objects are masked from 'package:base':
## 
##     max, mean, min, prod, range, sample, sum
library(mosaicCalc)
## Warning: package 'mosaicCalc' was built under R version 4.0.5
## Loading required package: mosaicCore
## Warning: package 'mosaicCore' was built under R version 4.0.5
## 
## Attaching package: 'mosaicCore'
## The following objects are masked from 'package:dplyr':
## 
##     count, tally
## 
## Attaching package: 'mosaicCalc'
## The following object is masked from 'package:stats':
## 
##     D
u<-expression ((-7)*x)

du<-D(u,'x')
du
## (-7)
int<-antiD(a*exp(u) ~ u, a=4)
int
## function (u, a = 4, C = 0) 
## a * exp(u) + C

d/dx (-7x)=-7 d(-7x)=-7dx du=-7dx -4/7du =-4/7(-7)dx -/7du=4dx

\(\int{-4/7e^{u} du}\)

Recall u=-7x

-4/7 (exp(-7x)) +c

#________________________________________________
  1. 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.

antiD(-3150*t^-4-220 ~ t )
## function (t, C = 0) 
## 1050 * t^-3 - 220 * t + C
#solve for c
#1050 * t^-3 - 220 * t + C = 6350
#where t=1
C<-6350-1050+220
C
## [1] 5520

So, N(t)=1050t^3 -220t +5520

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

A straight count from the grid: R1 = 2 x 1 =2 R2 = 2 x 3 =6 R3 = 2 x 5 =10 R4 = 2 x8 = 16 Total = 34 area of 4 rectangles

OR

Evaluate:

\(\int{2x-9 dx}\) At [5,10]

f=function(x) 2*x-9
integrate(f,5,10)
## 30 with absolute error < 3.3e-13
#______________________________________________
  1. Find the area of the region bounded by the graphs of the given equations. y = x^2 - 2x - 2, y = x + 2

A sketch reveals y = g(x)= x + 2 lies above y =f(x) = x^2 - 2x - 2 over [-1, 4]

(where the two curves intersect)

So we are to find the area between the curves by evaluating the integral at [-1, 4]:

\(\int{g(x) -f(x) dx}\)

\(\int{(x + 2) - (x^2 -2x - 2) dx}\)

f=function(x) (x + 2) - (x^2 -2*x - 2)
integrate(f,-1,4)
## 20.83333 with absolute error < 2.3e-13
#_________________________________________________
  1. 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.
#________________________________________________

x=lot size

110/x =# orders

x/2= average # stored

Total Cost = Storage cost + order cost Total Cost = 3.75(x/2) + 110/x(8.75)

Max / min problem - take derivative and set to zero and solve.

f=expression((3.75*(x/2))    + (8.75*110/x))
d<-D(f,'x')
d
## 3.75 * (1/2) - 8.75 * 110/x^2

set =0, and solve for x: .1875=962/x^2

s<-(962/.1875)^.5
s
## [1] 71.62867

x=72 lot size # orders, 2 of size 72, 38

#______________________________________________
  1. Use integration by parts to solve the integral below.

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

\(u=ln(9x)\)
\(du=1/x\) \(dv= x^6\) \(v=x^7/7\)

\(\int{udv}=uv-\int{vdu}\)

\(\int{ln(9x)x^6dx}= ln(9x)(x^7/7)-\int{x^7/7(1/x)dx}\)

\(\int{ln(9x)x^6dx}= ln(9x)(x^7/7)-x^7/49+C\)

#_____________________________________________

7.Determine whether f ( x ) is a probability density function on the interval 1, e6 . If not, determine the value of the definite integral.

\(\int{(1/6x) dx}\) \(evaluate on [1,e^6]\)

\((1/6)\int{(1/x) dx}\)

f<-function(x) 1/(6*x)
integrate(f,1,exp(6))
## 1 with absolute error < 9.3e-05

so the area under the curve =1 Probability under the curve = 1 pdf=true