Calculus The problems have been computed by hand as well on a separate pdf document.
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
#________________________________________________
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
#_________________________________________________
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
#______________________________________________
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
#_________________________________________________
#________________________________________________
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
#______________________________________________
\(\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