Universitas :“UIN MAULANA MALIK IBRAHIM MALANG”
Jurusan : “Teknik Informatika”
Jawab
4 x - 3 x < 7 -5
x < 2
root_table <- function(f, a, b, N=20){
h <- abs((a+b)/N)
x <- seq(from=a, to=b, by=h)
fx <- rep(0, N+1)
for(i in 1:(N+1)){
fx[i] <- f(x[i])
}
data <- data.frame(x=x, fx=fx)
return(data)
}
tabel <- root_table(f=function(x){4*x-7<3*x-5},
a=0, b=2, N=10)
print(tabel)
## x fx
## 1 0.0 1
## 2 0.2 1
## 3 0.4 1
## 4 0.6 1
## 5 0.8 1
## 6 1.0 1
## 7 1.2 1
## 8 1.4 1
## 9 1.6 1
## 10 1.8 1
## 11 2.0 0
# membuat vektor data
x <- c(0:2); y <- 4*x-7<3*x-5
# membagi jendela grafik menajdi 1 baris dan 1 kolom
par(mfrow=c(1,1))
# loop
type <- c("p","l","b","o","h","s","n")
for (i in type){
plot(x, y, type="l")
}
Jawab
6-7x >= 2x-4 6-7x <= 3x +6
-7x-2x >= -4-6 -7x-3x <= 6-6
-9x >= -10 -10x <= 0
x <= 10/9 x >= 0
jadi Hp nya : 0 <= x <= 10/9 atau Hp nya : 0 <= x <= 1.11
root_table <- function(f, a, b, N=20){
h <- abs((a+b)/N)
x <- seq(from=a, to=b, by=h)
fx <- rep(0, N+1)
for(i in 1:(N+1)){
fx[i] <- f(x[i])
}
data <- data.frame(x=x, fx=fx)
return(data)
}
tabel <- root_table(f=function(x){2*x - 4 -6+7*x+3*x +6},
a=0, b=1.99, N=10)
print(tabel)
## x fx
## 1 0.000 -4.000
## 2 0.199 -1.612
## 3 0.398 0.776
## 4 0.597 3.164
## 5 0.796 5.552
## 6 0.995 7.940
## 7 1.194 10.328
## 8 1.393 12.716
## 9 1.592 15.104
## 10 1.791 17.492
## 11 1.990 19.880
# membuat vektor data
x <- c(1.99:0); y <- 2*x - 4 -6+7*x+3*x +6
# membagi jendela grafik menajdi 1 baris dan 1 kolom
par(mfrow=c(1,1))
# loop
type <- c("p","l","b","o","h","s","n")
for (i in type){
plot(x, y, type="l")
}
jawab
(x+4) (x-3)
x < -4 atau x < 3
jadi Hp nya : x < -4 dan x < 3
root_table <- function(f, a, b, N=20){
h <- abs((a+b)/N)
x <- seq(from=a, to=b, by=h)
fx <- rep(0, N+1)
for(i in 1:(N+1)){
fx[i] <- f(x[i])
}
data <- data.frame(x=x, fx=fx)
return(data)
}
tabel <- root_table(f=function(x){1*x^2+1*x - -12},
a=-4, b=0, N=10)
print(tabel)
## x fx
## 1 -4.0 24.00
## 2 -3.6 21.36
## 3 -3.2 19.04
## 4 -2.8 17.04
## 5 -2.4 15.36
## 6 -2.0 14.00
## 7 -1.6 12.96
## 8 -1.2 12.24
## 9 -0.8 11.84
## 10 -0.4 11.76
## 11 0.0 12.00
# membuat vektor data
x <- c(-4:3); y <- 1*x^2+1*x - -12
# membagi jendela grafik menajdi 1 baris dan 1 kolom
par(mfrow=c(1,1))
# loop
type <- c("p","l","b","o","h","s","n")
for (i in type){
plot(x, y, type="l")
}
jawab
(3x-1) (x-4)
3x <= -1 atau X <= 4
root_table <- function(f, a, b, N=20){
h <- abs((a+b)/N)
x <- seq(from=a, to=b, by=h)
fx <- rep(0, N+1)
for(i in 1:(N+1)){
fx[i] <- f(x[i])
}
data <- data.frame(x=x, fx=fx)
return(data)
}
tabel <- root_table(f=function(x){3*x^2 - 11*x - 4},
a=0, b=4, N=10)
print(tabel)
## x fx
## 1 0.0 -4.00
## 2 0.4 -7.92
## 3 0.8 -10.88
## 4 1.2 -12.88
## 5 1.6 -13.92
## 6 2.0 -14.00
## 7 2.4 -13.12
## 8 2.8 -11.28
## 9 3.2 -8.48
## 10 3.6 -4.72
## 11 4.0 0.00
# membuat vektor data
x <- c(-1:4); y <- 3*x^2 - 11*x - 4
# membagi jendela grafik menajdi 1 baris dan 1 kolom
par(mfrow=c(1,1))
# loop
type <- c("p","l","b","o","h","s","n")
for (i in type){
plot(x, y, type="l")
}
jawab
x+5 <= 0 dan 2x-1 <0
x >= -5 dan X < 1/2
root_table <- function(f, a, b, N=20){
h <- abs((a+b)/N)
x <- seq(from=a, to=b, by=h)
fx <- rep(0, N+1)
for(i in 1:(N+1)){
fx[i] <- f(x[i])
}
data <- data.frame(x=x, fx=fx)
return(data)
}
tabel <- root_table(f=function(x){1*x +5/ 2*x-1},
a=-5, b=0, N=10)
print(tabel)
## x fx
## 1 -5.0 -18.50
## 2 -4.5 -16.75
## 3 -4.0 -15.00
## 4 -3.5 -13.25
## 5 -3.0 -11.50
## 6 -2.5 -9.75
## 7 -2.0 -8.00
## 8 -1.5 -6.25
## 9 -1.0 -4.50
## 10 -0.5 -2.75
## 11 0.0 -1.00
# membuat vektor data
x <- c(-5:0.5); y <- 1*x +5/ 2*x-1
# membagi jendela grafik menajdi 1 baris dan 1 kolom
par(mfrow=c(1,1))
# loop
type <- c("p","l","b","o","h","s","n")
for (i in type){
plot(x, y, type="l")
}
REFERENSI
Suhartono.2015.Memahami Kalkulus Dasar Menggunakan Wolfram Mathematica 9.UIN Maliki Malang: Malang.