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
## 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
Apa yang dimaksud dengan integral ? Dalam kbbi sendiri integral/in·teg·ral/ a 1 mengenai keseluruhannya; meliputi seluruh bagian yang perlu untuk menjadikan lengkap; utuh; bulat; sempurna: masalah itu akan diselesaikan secara – , tidak secara sebagian-sebagian; 2 tidak terpisahkan; terpadu: Bimbingan Penyuluhan merupakan bagian – dari pendidikan
f <- makeFun( A * x ^ 2 ~ x, A = 0.5)
f(1)
## [1] 0.5
f(2)
## [1] 2
f(3)
## [1] 4.5
df <- D(f(x) ~ x)
df(1)
## [1] 1
df(2)
## [1] 2
df(3)
## [1] 3
slice_plot(f(x) ~ x, domain(x = -1:1)) %>%
gf_labs(title = "Original function f(x)")
pada Gambar diatas menunjukkan grafik dari f(x) – kurva smiley – dan turunannya df(x).
Antiturunan Operator invers ini diimplementasikan dalam R/ mosaicCalcsebagai antiD()fungsi. antiSeperti yang disarankan akhiran, antiD()“membatalkan” D()melakukan. Seperti ini:
df(2)
## [1] 2
df(3)
## [1] 3
Satu variabel menjadi dua argumen beberapa properti global atau terdistribusi dari suatu fungsi: bukan hanya nilai pada suatu titik, tetapi nilai yang terakumulasi pada seluruh rentang titik. Sifat antiturunan global atau terdistribusi inilah yang membuat antiturunan sedikit lebih rumit daripada turunan, tetapi tidak lebih dari itu.
Inti masalahnya adalah ada lebih dari satu cara untuk “membatalkan” turunan. Pertimbangkan fungsi-fungsi berikut, yang masing-masing berbeda:
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
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
Jadi, selama Anda tidak memedulikan konstanta penjumlahan, antiturunan dari turunan suatu fungsi mengembalikan fungsi aslinya.
Integral Derivatif memberi tahu bagaimana suatu fungsi berubah secara lokal. Anti-derivatif mengumpulkan nilai-nilai lokal tersebut untuk memberi Anda nilai global; itu mempertimbangkan tidak hanya properti lokal dari fungsi pada satu nilai input tertentu tetapi juga nilai pada rentang input.
f
## function (x, A = 0.5)
## A * x^2
## <bytecode: 0x0000022166ee03d0>
df
## function (x, A = 0.5)
## 2 * A * x
## <bytecode: 0x0000022167d66938>
antiD(f(x) ~ x)
## function (x, A, C = 0)
## (x^3 * A)/3 + C
antiD(df(x) ~ x)
## function (x, A, C = 0)
## A * x^2 + C
fun = antiD( x^2 ~ x )
fun
## function (x, C = 0)
## x^3/3 + C