Nama : Ahmad Ghiffari Fadhil Saputra
NIM : 220605110067 KELAS : C
Mata Kuliah : Kalkulus
Dosen Pengampu : Prof.Dr.Suhartono,M.Kom
Jurusan : Teknik Informatika
Universitas : Universitas Negeri Maulana Malik Ibrahim Malang
latihan integral dan integrasi
Fungsi yang diintegrasikan dapat memiliki variabel atau parameter tambahan di luar variabel integrasi. Untuk mengevaluasi integral tertentu, Anda perlu menentukan nilai untuk variabel tambahan tersebut.
Misalnya, fungsi yang sangat penting dalam statistik dan fisika adalah Gaussian, yang memiliki grafik berbentuk lonceng:
library(mosaicCalc)
## Loading required package: mosaic
## 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
## Loading required package: mosaicCore
##
## 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
gaussian <-
makeFun((1/sqrt(2*pi*sigma^2)) *
exp( -(x-mean)^2/(2*sigma^2)) ~ x,
mean=2, sigma=2.5)
slice_plot(gaussian(x) ~ x, domain(x = -5:10)) %>%
slice_plot(gaussian(x, mean=0, sigma=1) ~ x, color="red")
Seperti yang Anda lihat, ini adalah fungsi dari , tetapi juga dari parameter dan . x meansigma
Saat Anda mengintegrasikan ini, Anda perlu memberi tahu antiD()atau integral()parameter apa yang akan dipanggil:
erf <- antiD(gaussian(x, mean=m, sigma=s) ~ x)
erf
## function (x, C = 0, m, s)
## {
## F <- makeF(gaussian(x, mean = m, sigma = s))
## evalFun(F, x = x, m = m, s = s, .const = C)
## }
## <environment: 0x000001d66124c1a8>
erf(x = 2, m=0, s=1) - erf(x = 0, m=0, s=1)
## [1] 0.4772499
erf(x = 0, m=0, s=2) - erf(x = 2, m=0, s=2)
## [1] -0.3413447
daftar pustaka :Kaplan, Daniel. 2020. Computer-age Calculus with R. https://dtkaplan.github.io/RforCalculus/index.html?fbclid=IwAR1d_WcAeawvUaBnLKlkRoO2sV4b-6nRX0eNR3DT457DKN7NJV8NV0giSLo