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
Misalnya, fungsi pemodelannya adalah dan kamu mencari seperti .
f <- makeFun(1.7-0.85*x+0.063*x^2 ~ x)
Zeros(f(x) - 3 ~ x, bounds(x=-4:4))
## # A tibble: 1 × 2
## x .output.
## <dbl> <dbl>
## 1 -1.39 0.00000320
slice_plot(f(x) ~ x, bounds(x=-4:4)) %>%
gf_hline(yintercept = ~ 3, color="red")
Situasi lain yang biasanya dibahas di sekolah menengah adalah membalikkan fungsi polinomial orde rendah. Kita akan mengerjakan masalah tersebut dalam proses menggunakan rumus kuadrat. Untuk menerapkan rumus kuadrat, kita perlu menempatkan soal ke dalam format standar, bukan Tetapi
f <- makeFun(0.063*x^2-0.85*x-1.4 ~ x)
Zeros(f(x) - 0 ~ x, bounds(x=-4:4))
## # A tibble: 1 × 2
## x .output.
## <dbl> <dbl>
## 1 -1.48 -0.0000238
slice_plot(f(x) ~ x, bounds(x=-4:4)) %>%
gf_hline(yintercept = ~ 0, color="red")
Referensi: Kaplan, Daniel. 2022. MOSAIC Calculus. GitHub Pages. https://dtkaplan.github.io/MC2/