Artikel ini menggali penggunaan bahasa pemrograman R untuk eksplorasi dan visualisasi fungsi dua variabel dalam konteks kalkulus. Eksplorasi dilakukan melalui implementasi kode R yang memvisualisasikan fungsi-fungsi matematika yang bergantung pada dua variabel. Dengan memahami setiap blok kode dan hasil grafiknya, pembaca diharapkan dapat lebih mendalam dalam memahami konsep kalkulus dua variabel.

library(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
library(mosaicCalc)
## Loading required package: mosaicCore
## 
## Attaching package: 'mosaicCore'
## The following objects are masked from 'package:dplyr':
## 
##     count, tally
## The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
## which was just loaded, will retire in October 2023.
## Please refer to R-spatial evolution reports for details, especially
## https://r-spatial.org/r/2023/05/15/evolution4.html.
## It may be desirable to make the sf package available;
## package maintainers should consider adding sf to Suggests:.
## The sp package is now running under evolution status 2
##      (status 2 uses the sf package in place of rgdal)
## 
## Attaching package: 'mosaicCalc'
## The following object is masked from 'package:stats':
## 
##     D

Pernyataan ini memuat paket mosaic dan mosaicCalc, yang menyediakan fungsi-fungsi dan fitur tambahan untuk analisis dan visualisasi data dalam konteks kalkulus.

1.Grafik Fungsi Satu Variabel:

slice_plot(
  95 - 73*exp(-.2*t) ~ t, 
  domain(t = 0:20)
)

Eksplorasi dimulai dengan memvisualisasikan fungsi satu variabel 95 - 73exp(-.2t) terhadap variabel t dalam domain t dari 0 hingga 20. Grafik ini memberikan gambaran perubahan fungsi terhadap satu variabel.

2.Grafik Kontur Fungsi Dua Variabel:

contour_plot(
  sin(2*pi*t/10)*exp(-.2*x) ~ t & x, 
  domain(t = range(0,20), x = range(0,10))
)

Selanjutnya, dilakukan eksplorasi dengan grafik kontur dari fungsi dua variabel sin(2pit/10)exp(-.2x) terhadap variabel t dan x. Visualisasi ini memberikan informasi tentang pola perubahan fungsi terhadap dua variabel.

3.Grafik Interaktif Fungsi Dua Variabel:

interactive_plot(
   sin(2*pi*t/10)*exp(-.5*x) ~ t & x, 
   domain(t = 0:20, x = 0:10)
)

Artikel ini juga membahas grafik interaktif dari fungsi dua variabel sin(2pit/10)exp(-.5x) terhadap variabel t dan x. Fungsi ini memungkinkan pengguna untuk secara interaktif menjelajahi grafik, mendapatkan wawasan lebih mendalam tentang perubahan fungsi.