{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE)
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
{r cars} summary(cars)
You can also embed plots, for example:
{r pressure, echo=FALSE} plot(pressure)
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.
Bab 8 Integral dan integrasi Anda telah melihat operator kalkulus dasar, diferensiasi, yang diimplementasikan oleh mosaicCalcfungsi R/ D(). Operator diferensiasi mengambil sebagai input fungsi dan variabel “sehubungan dengan”. Outputnya adalah fungsi lain yang memiliki variabel “sehubungan dengan” sebagai argumen, dan kemungkinan argumen lain juga.
library(mosaic)
library(mosaicCalc)
f
df
antiD(f(x) ~ x)
antiD(df(x) ~ x)
8.3.1.1 Latihan 1 Tentukan nilai numerik dari setiap integral tertentu berikut. MENJAWAB:
f = integral(exp(2*x) ~ x)
f(from=1,to=4)
f = integral(exp(abs(2*x)) ~ x)
f(from=-2,to=2)
8.3.1.2 Latihan 2 8.3.1.3 Latihan 3
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")
erf <- antiD(gaussian(x, mean=m, sigma=s) ~ x)
erf
erf(x = 1, m=0, s=1) - erf(x = 0, m=0, s=1)
erf(x = 2, m=0, s=1) - erf(x = 0, m=0, s=1)
erf(x = 0, m=0, s=2) - erf(x = 2, m=0, s=2)
erf(x = -Inf, m=3, s=10) - erf(x = 3, m=3, s=10)
erf(x = Inf, m=3, s=10) - erf(x = -Inf, m=3, s=10)
Daftar Pustaka : https://dtkaplan.github.io/RforCalculus/integrals-and-integration.html#the-integral