Function kx(x)
kx = x ^ 2 + x - 6
End Function
Function lx(x)
lx = 2 * x + 1
End Function
Sub NewtonRapson()
x0 = Cells(1, 1)
Do
i = 1
x1 = x0 - (kx(x0) / lx(x0))
i = i + 1
x0 = x1
Loop While kx(x0) > 0.001
Cells(2, 1) = "Penyelesaiannya Adalah"
Cells(2, 2) = x1
End Sub
kx = x ^ 2 + x - 6
End Function
Function lx(x)
lx = 2 * x + 1
End Function
Sub NewtonRapson()
x0 = Cells(1, 1)
Do
i = 1
x1 = x0 - (kx(x0) / lx(x0))
i = i + 1
x0 = x1
Loop While kx(x0) > 0.001
Cells(2, 1) = "Penyelesaiannya Adalah"
Cells(2, 2) = x1
End Sub
0 tanggapan:
Posting Komentar