Question: need the code or what i need to add to the code Ln 52, Col (General) Private Sub Newtons_Click() Dim x, Step, yo, yl, xSlope


Ln 52, Col (General) Private Sub Newtons_Click() Dim x, Step, yo, yl, xSlope x - Val (InputBox("Input guess of x to evaluate Newtons Method at")) epsilon - 0.0000001 Step 0.00001 diff = epsilon 2 i-0 Do While diff > epsilon i = i + 1 Cells (20, 7) = x Cells (20 + 1, 1) - 1 Cells (20 + 1, 2) - X Cells (20 + 1, 3) = flx (x) Calculate Central derivative of X yo = flx(x - Step) yl - flx (x + Step) xSlope = (yl - yo) / (2 * Step) Cells (20, 6) - xSlope xl = x - f1x (x)/xSlope dirt = Aba (x - xl) x = x1 Loop End Sub Function flx (ByVal x) Define function here Must define function in the following line Elx - XX - 5 Ilx = Log(x) - 2 + 3 End Function 1. Using the Newtons Method Do-While program that was covered in class, write a program to implement the Secant Method for the following function Use the starting points of 1.2 and 2.3 to initialize the program. f(x) = ln(x) x2 + 3 Newtons Method f(x) 8.77914 X 2.12937 0.00000 i 1 2 3 xi 2.000000 2.147654 2.129707 2.129373 2.129372 -1.000000 0.163504 0.002938 0.000001 0.000000 4 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
