================================================================================

NAMA MAHASISWA : MUHAMMAD FAQIH

NIM : 220605110069

MATA KULIAH : KALKULUS

DOSEN PENGAMPU : Prof. Dr. Suhartono, M.Kom

JURUSAN : TEKNIK INFORMATIKA

UNIVERSITAS : UIN MAULANA MALIK IBRAHIM MALANG

================================================================================

SATU ARGUMEN MENJADI DUA VARIABEL

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
f1 <- makeFun(sin(x ^ 2) ~ x)
f2 <- makeFun(sin(x ^ 2)  +  3 ~ x)
f3 <- makeFun(sin(x ^ 2)  -  100 ~ x)
f1(1)
## [1] 0.841471
f2(1)
## [1] 3.841471
f3(1)
## [1] -99.15853

Mengesampingkan jika fungsi f1(x), f2(x), dan f3(x), masing masing berbeda ,tetapi mereka memiliki turunan yang sama.

df1 = D(f1(x) ~ x)
df2 = D(f2(x) ~ x)
df3 = D(f3(x) ~ x)
df1(1)
## [1] 1.080605
df2(1)
## [1] 1.080605
df3(1)
## [1] 1.080605

INTEGRAL

Turunannya menunjukkan bagaimana suatu fungsi berubah secara lokal. Anti-turunan mengakumulasi nilai-nilai lokal tersebut untuk menampilkan nilai global

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: 0x000001feb2501200>
## <environment: namespace:stats>

Operasi anti-turunan sedikit. Saat menggunakan antiD(), nama variabel fungsi diganti dengan dua argumen: nama asli (dalam contoh ini, x) dan konstanta C:

antiD(f(x) ~ x)
## function (x, C = 0) 
## {
##     F <- makeF(f(x))
##     evalFun(F, x = x, .const = C)
## }
## <environment: 0x000001feb27bb658>
antiD(df(x) ~ x)
## function (x, C = 0) 
## {
##     F <- makeF(df(x))
##     evalFun(F, x = x, .const = C)
## }
## <environment: 0x000001feb2b39f28>

Fungsi yang diintegrasikan dapat memiliki variabel atau parameter tambahan di luar variabel integrasi. Untuk mengevaluasi integral pasti, Kita perlu menentukan nilai untuk variabel tambahan tersebut.

Contoh, fungsi yang sangat penting dalam statistik dan fisika adalah Gaussian

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="purple")

DAFTAR PUSTAKA

https://dtkaplan.github.io/RforCalculus/