Lembaga : Universitas Islam Negeri Maulana Malik Ibrahim Malang
Fakultas : Sains dan Teknologi
Jurusan : Teknik Informatika
Kelas : (B) Calculus
NIM : 230605110058
Zero Finding Zero Finding adalah sebuah topik dalam kalkulus yang mencari nilai-nilai x untuk membuat suatu fungsi f(x) menjadi nol. Nilai-nilai x tersebut disebut sebagai akar, nol, atau solusi dari fungsi f(x). Zero Finding dapat digunakan untuk menyelesaikan berbagai masalah Fisika, Matematika, atau Teknik yang melibatkan persamaan non-linear.
Contoh analogi yang digunakan untuk membantu Zero Finding yaitu dengan mengibaratkan fungsi f(x) sebagai sebuah kurva untuk melintasi sumbu x. Nilai-nilai x yang membuat f(x) menjadi nol adalah titik-titik potong antara kurva dan sumbu x. Untuk menemukan titik-titik potong tersebut, kita dapat menggunakan berbagai metode, seperti metode grafik, metode tabel, metode biseksi, metode regula falsi, metode Newton-Raphson, atau metode secant.
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
## The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
## which was just loaded, were retired 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:.
##
## Attaching package: 'mosaicCalc'
## The following object is masked from 'package:stats':
##
## D
g <- makeFun(-5*sin(x^2)+3 ~ x)
slice_plot(g(x) ~ x, domain(x = -3:3)) %>%
gf_hline(yintercept = 0, color = "blue") %>%
gf_vline(xintercept = 0, color = "blue")
slice_plot(g(x) ~ x, domain(x=1:50)) %>%
gf_hline(yintercept = 0, color = "yellow")
g <- makeFun(sin(x)~ x)
slice_plot(g(x) ~ x, domain(x = -3:3)) %>%
gf_hline(yintercept = 0, color = "purple") %>%
gf_vline(xintercept = 0, color = "purple")
f <- makeFun(1.9 - 0.9*x + 0.06*x^2 - 0.002*x^3 ~ x)
function (x) 1.9 - 0.9*x + 0.06*x^2 - 0.002*x^3
## function (x) 1.9 - 0.9*x + 0.06*x^2 - 0.002*x^3
## function (x) 1.9 - 0.9*x + 0.06*x^2 - 0.002*x^3
Zeros(f(x) - 0 ~ x, bounds(x=-25:25))
## # A tibble: 1 × 2
## x .output.
## <dbl> <dbl>
## 1 2.49 0.0000176
slice_plot(f(x) ~ x, bounds(x=-25:25)) %>%
gf_hline(yintercept = ~ 3, color="red")