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
g <- makeFun(sin(x^2)*cos(sqrt(x^2 + 5 )-x^4) - x + 1 ~ x)
slice_plot(g(x) ~ x, domain(x = -3:3)) %>%
  gf_hline(yintercept  = 2, color = "blue")

g <- makeFun(sin(x^4)*cos(sqrt(x^2 + 7 )-x^2) - x + 4 ~ x)
slice_plot(g(x) ~ x, domain(x = -3:3)) %>%
  gf_area(yintercept =4, color = "green")

penjelasan:

pada penjelasan dibawah fungsi “gf_area(yintercept =4, color =”green”)” menunjukkan area yang di arsir pada operasi matematika. memberikan efek bahwa yang diarsir atau wilayah yang dihitung adalh sekian dari garis line nya.

g <- makeFun(sin(x^2)*cos(sqrt(x^2 + 5 )-x^4) - x + 1 ~ x)
slice_plot(g(x) ~ x, domain(x = -3:3)) %>%
  gf_hline(yintercept  = 1.7, color = "blue") %>%
  gf_vline(xintercept =0.5, color = "green")

library(mosaicCalc)
findZeros(g(x) ~ x, xlim = range(-1000,  1000))
##        x
## 1 0.7588
## 2 0.9376
## 3 1.3934
findZeros( sin(x) - 0.35 ~ x, xlim=range(-20,20) )
##           x
## 1  -12.2088
## 2   -9.7823
## 3   -5.9256
## 4   -3.4991
## 5    0.3576
## 6    2.7840
## 7    6.6407
## 8    9.0672
## 9   12.9239
## 10  15.3504
g <- makeFun(4 + exp(k*t) - 4^(b*t) ~ b, k=0.00035, t=1.5)
findZeros( 3*x^2 + 7*x - 10 ~ x, xlim=range(-100,100))
##         x
## 1 -3.3334
## 2  1.0000
slice_plot(g(x) ~ x, domain(x = -3:3)) %>%
  gf_hline(yintercept  = 6, color = "blue")

g <- makeFun(4 + exp(k*t) - 2^(b*t) ~ b, k=0.00035, t=1)
findZeros(1*x^5 - 3*x^2 - 3*x - 5 ~ x, xlim=c(-5,10))
##        x
## 1 1.8303
slice_plot(g(x) ~ x, domain(x = -3:3)) %>%
  gf_hline(yintercept  = 2, color = "green")%>%
  gf_area(xintercept =4, color = "green")

g <- makeFun(4 + exp(k*t) - 2^(b*t) ~ b, k=0.00035, t=1)
findZeros(1*x^5 - 3*x^2 - 3*x - 5 ~ x, xlim=c(-5,10))
##        x
## 1 1.8303
slice_plot(g(x) ~ x, domain(x = -3:3)) %>%
  gf_area(yintercept  = 2, color = "grey")%>%
  gf_vline(xintercept =4, color = "green")

g <- makeFun(sin(x^2)*cos(sqrt(x^4 + 3 )-x^2) - x + 1 ~ x)
findZeros( 7*x^4 -2*x^3 - 4*x^2 - 3*x - 10 ~ x, xlim=c(-10,10))
##         x
## 1 -1.0628
## 2  1.4123
g <- makeFun(sin(x^2)*cos(sqrt(x^4 + 3 )-x^2) - x + 1 ~ x)
findZeros( 7*x^4 -2*x^3 - 4*x^2 - 3*x - 10 ~ x, xlim=c(-10,10))
##         x
## 1 -1.0628
## 2  1.4123
slice_plot(g(x) ~ x, domain(x = -3:3)) %>%
  gf_hline(yintercept  = 0, color = "red")%>%
  gf_vline(xintercept = 0, color = "yellow")

g <- makeFun(sin(x^2)*cos(sqrt(x^3 + 4 )-x^3) - x + 2 ~ x)
findZeros( 6*x^5-7*x^4 -2*x^3 - 4*x^2 - 3*x - 10 ~ x, xlim=c(-10,10))
##        x
## 1 1.8012
slice_plot(g(x) ~ x, domain(x = -3:3)) %>%
  gf_hline(yintercept  = 0, color = "red")%>%
  gf_vline(xintercept = 0, color = "yellow")
## Warning in sqrt(x^3 + 4): NaNs produced

## Warning in sqrt(x^3 + 4): NaNs produced
## Warning: Removed 24 row(s) containing missing values (geom_path).

g <- makeFun(sin(x^3)*cos(sqrt(x^2 + 1  )-x^2) - x + 1.6 ~ x)
findZeros( 3*x^5-2*x^4 -2*x^3 - 3*x^2 - 3*x - 7 ~ x, xlim=c(-10,10))
##        x
## 1 1.7744
slice_plot(g(x) ~ x, domain(x = -3:3)) %>%
  gf_hline(yintercept  = 2, color = "green")%>%
  gf_vline(xintercept = -1.5, color = "blue")

di garis pada titik ini(gf_vline(xintercept = -1.5, color = “blue”)) diberikan titik yang berada pada mines pada garis x nya

g <- makeFun(2 + exp(k*t) - 3^(b*t) ~ b, k=0.00100, t=4)
findZeros(2*x^6 - 7*x^2 - 3*x - 4 ~ x, xlim=c(-10,10))
##         x
## 1 -1.3652
## 2  1.5209
slice_plot(g(x) ~ x, domain(x = -3:3)) %>%
  gf_hline(yintercept  = 2, color = "green")%>%
  gf_vline(xintercept = 3, color = "blue")

g <- makeFun(4 + exp(k*t) - 2^(b*t) ~ b, k=0.00035, t=1)
findZeros( 3*exp(-t/5)*sin(pi*t) ~ t, xlim=range(1,10))
##    t
## 1  0
## 2  1
## 3  2
## 4  3
## 5  4
## 6  5
## 7  6
## 8  7
## 9  8
## 10 9
slice_plot(g(x) ~ x, domain(x = -3:3)) %>%
  gf_hline(yintercept  = 2, color = "blue")%>%
  gf_vline(xintercept = 0, color = "orange")

g <- makeFun(4 + exp(k*t) - 2^(b*t) ~ b, k=0.00035, t=1)
findZeros( 3*exp(-t/5)*sin(pi*t) ~ t, xlim=range(1,10))
##    t
## 1  0
## 2  1
## 3  2
## 4  3
## 5  4
## 6  5
## 7  6
## 8  7
## 9  8
## 10 9
slice_plot(g(x) ~ x, domain(x = -3:3)) %>%
  gf_hline(yintercept  = 2, color = "blue")%>%
  gf_area(xintercept = 0, color = "orange")

g <- makeFun(4 + exp(k*t) - 3^(b*t) ~ b, k=0.0100, t=0.2)
findZeros( 3*exp(-t/5)*sin(pi*t) ~ t, xlim=range(1,10))
##    t
## 1  0
## 2  1
## 3  2
## 4  3
## 5  4
## 6  5
## 7  6
## 8  7
## 9  8
## 10 9
findZeros( sin(x) - 0.90 ~ x, xlim=range(-20,20) )
##           x
## 1  -11.4466
## 2  -10.5445
## 3   -5.1630
## 4   -4.2614
## 5    1.1198
## 6    2.0218
## 7    7.4030
## 8    8.3050
## 9   13.6861
## 10  14.5882
slice_plot(g(x) ~ x, domain(x = -3:3)) %>%
  gf_hline(yintercept  = 1.3, color = "blue")%>%
  gf_vline(xintercept = 3, color = "orange")