NIM : 220605110070

KELAS : C

MATKUL : KALKULUS

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

JURUSAN : TEKNIK INFORMATIKA

LEMBAGA : UNIVERSITAS ISLAM NEGERI MAULANA MALIK IBRAHIM MALANG

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

#Contoh 1

slice_plot(4 * x - 7 ~ x, domain(x = range(0, 9)))

#Contoh 2

m = -6
b = -5
slice_plot(m * x + b ~ x, domain(x = range(0, 8)))

#Juga bisa ditulis dengan

slice_plot(-6 * x + (-5) ~ x, domain(x = range(0, 8)))

#Contoh 3

A = 90
slice_plot( A * x ^ 2 ~ x, domain(x = range(-3, 4))) 

A = 7
slice_plot( A * x ^ 2 ~ x,  domain(x = range(2, 5)),  color="red" )

slice_plot( cos(t) ~ t, domain(t = range(0,7*pi) ))

#Bisa juga ditulis dengan

slice_plot( 90 * x ^ 2 ~ x, domain(x = range(-3, 4))) 

slice_plot( 7 * x ^ 2 ~ x,  domain(x = range(2, 5)),  color="red" )

slice_plot( cos(t) ~ t, domain(t = range(0,7*pi) ))

#Contoh 4

g  <- makeFun(5*x^2 - 5*x + 3 ~ x)
slice_plot(g(x) ~ x , domain(x = range(-2, 4)))

#Contoh 5

slice_plot(sqrt(abs(g(x))) ~ x, domain(x = range(-3,7)))

Sumber Referensi : https://dtkaplan.github.io/RforCalculus/graphing-functions.html