Lembaga : Universitas Islam Negeri Maulana Malik Ibrahim Malang

Fakultas : Sains dan Teknologi

Jurusan : Teknik Informatika

NIM : 230605110044

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
## The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
## which was just loaded, will retire in October 2023.
## Please refer to R-spatial evolution reports for details, especially
## https://r-spatial.org/r/2023/05/15/evolution4.html.
## It may be desirable to make the sf package available;
## package maintainers should consider adding sf to Suggests:.
## The sp package is now running under evolution status 2
##      (status 2 uses the sf package in place of rgdal)
## 
## Attaching package: 'mosaicCalc'
## The following object is masked from 'package:stats':
## 
##     D

Invers dari f itu sendiri adalah sebuah fungsi, dan fungsi ini mempunyai argumen yang sama dengan f. Jadi, karena fungsi tersebut didefinisikan memiliki parameter bernama, fungsi yang dibuat juga memiliki parameter bernama (bersama dengan parameter relevan lainnya): f(x) x D(f(x) ~ x)

df
## function (x, df1, df2, ncp, log = FALSE) 
## {
##     if (missing(ncp)) 
##         .Call(C_df, x, df1, df2, log)
##     else .Call(C_dnf, x, df1, df2, ncp, log)
## }
## <bytecode: 0x0000017a3bdb67e8>
## <environment: namespace:stats>

Perhitungan integral tertentu/pasti melibatkan 2 aplikasi anti-turunan. Interval tertentu adalah perbedaan antara anti-derivatif yang dievaluasi dan anti-derivatif yang dievaluasi.

Di dalam perangkat memilih untuk menggunakan nilai default C = 0

fun = antiD( x^2 ~ x )
fun
## function (x, C = 0) 
## x^3/3 + C

Mengevaluasi fungsi pada nilai numerik tertentu untuk argumen tersebut, berakhir dengan “integral pasti”:

fun(x = 6) - fun(x = -3)
## [1] 81

Hal-hal penting yang perlu diingat:

1.Fungsi akan menghitung anti-turunan. antiD(x^2 ~ x) x X.

2.Anti-turunan selalu diambil sehubungan dengan variabel. Integral sehubungan dengan antiD(x^2 ~ x) x X.

3.Integral pasti adalah fungsi dari variabel integrasi. Variabel integrasi muncul sebagai argumen dalam 2 guises karena integral melibatkan 2 evaluasi: (1) X = to dan X = from. Batas-batas yang didefinisikan disebut “wilayah integrasi”.

Integralnya adalah tentang sifat “global” atau “terdistribusi” dari suatu fungsi, “keseluruhan”. Turunannya adalah tentang properti “lokal”.

Menggunakan fungsi dalam statistik dan fisika adalah Gaussian, yang memiliki grafik berbentuk lonceng:

gaussian <- 
  makeFun((1/sqrt(2*pi*sigma^2)) * 
            exp( -(x-mean)^2/(2*sigma^2)) ~ x,
          mean=2, sigma=3)
slice_plot(gaussian(x) ~ x, domain(x = -10:10)) %>%
  slice_plot(gaussian(x, mean=0, sigma=1) ~ x, color="blue")

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: 0x0000017a4311f260>

Dalam matematika, nama sesuatu disebut Fungsi ERror, sama seperti nama fungsi sinus.

1.∫^1 0 erf(x,m = 0,s = 1)dx

erf(x = 1, m=0, s=1) - erf(x = 0, m=1, s=2)
## [1] 0.3413447

2.∫^2 0 f(x,m = 0,s = 1)dx

erf(x = 2, m=0, s=1) - erf(x = 0, m=0, s=1)
## [1] 0.4772499

3.∫^2 0 f(x,m = 0,s = 2)dx

erf(x = 0, m=0, s=2) - erf(x = 2, m=0, s=2)
## [1] -0.3413447