Kalkulus by Prof. Dr. SUHARTONO, M.Kom || Izza Syahri Muharram _ 220605110073 || Teknik Informatika || UIN Maulana Malik Ibrahim Malang
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
summary(cars)
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
You can also embed plots, for example:
Salah satu cara untuk menyelesaikan masalah tersebut adalah dengan mencari invers dari f Jika Anda dapat merencanakan fungsinya f(x) untuk berbagai x, Anda dapat dengan mudah menemukan nol. Temukan saja di mana x di mana fungsi melintasi kamu-sumbu.
Ini berfungsi untuk fungsi apa pun, bahkan yang sangat rumit sehingga
tidak ada prosedur aljabar untuk menemukan solusi. Sebagai ilustrasi,
perhatikan fungsi (g) . Note that the echo = FALSE
parameter was added to the code chunk to prevent printing of the R code
that generated the plot.
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 + 3 )-x^2) - x + 2 ~ x)
slice_plot(g(x) ~ x, domain(x = -3:3)) %>%
gf_hline(yintercept = 0, color = "red")
slice_plot(g(x) ~ x, domain(x=1:2)) %>%
gf_hline(yintercept = 0, color = "blue")
findZeros(g(x) ~ x, xlim = range(1, 2))
## x
## 1 1.8408
Argmen xlim digunakan untuk menyatakan di mana mencari solusi. (Karena bug perangkat lunak, itu selalu dipanggil xlim bahkan jika Anda menggunakan variabel selain x dalam ekspresi Anda.)
============= Fungsi findZeros( )akan mencoba menemukan beberapa solusi jika ada. Misalnya, persamaan memiliki jumlah solusi tak terhingga. Berikut adalah beberapa di antaranya: dosa x = 0.35
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
Seperti namanya, findZeros( )menemukan fungsi nol. Anda dapat mengatur masalah solusi apa pun dalam formulir ini. Misalnya, Anda ingin menyelesaikan untuk , dengan membiarkan parameter menjadi . Anda mungkin, tentu saja, ingat bagaimana mengerjakan soal ini dengan menggunakan logaritma.
g <- makeFun(4 + exp(k*t) - 2^(b*t) ~ b, k=0.00035, t=1)
findZeros( g(b) ~ b , xlim=range(-1000, 1000) )
## b
## 1 2.322
Latihan 1
Selesaikan persamaan untuk . {0.0000,0.1328, 0.2098 ,0.3654,0.4217} Sin (cos(x²)-x)-x=0.5 Untuk x {0.0000,0.1328,0.2098,0.3654,0.4217}
jawab=
findZeros( sin(cos(x^2) - x) -x - 0.5 ~ x, xlim=range(-10,10))
## x
## 1 0.2098
Latihan 2 Find any zeros of the function 3 e ^i/5 Sin (2π/2.t) that are between t = 1 and t=10
jawab=
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
Latihan 4
Gunakan findzeros()
Dimana angka nolnya dari sebuah 1. x = -3.33 2. x = 3.33 3. X = -3.33 4. X = 3.33 5. -1e jawab:
findZeros( 3*x^2 + 7*x - 10 ~ x, xlim=range(-100,100))
## x
## 1 -3.3334
## 2 1.0000
findZeros( 4*x^2 - 2*x - 20 ~ x, xlim=c(-10,10))
## x
## 1 -2.0
## 2 2.5
findZeros(2*x^3 - 4*x^2 - 3*x - 10 ~ x, xlim=c(-10,10))
## x
## 1 3.0363
4.7x⁴-2x³-4x²-3x-10
library(xlsx)
library(mosaicCalc)
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
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
Daftar pustaka 1. https://dtkaplan.github.io/RforCalculus/index.html?fbclid=IwAR1d_WcAeawvUaBnLKlkRoO2sV4b-6nRX0eNR3DT457DKN7NJV8NV0giSLo 2. https://github.com/ProjectMOSAIC/mosaicCalc