Question: Well I am asked to do this : (VBA EXCEL) Write a user-defined vba function to determine the real root of f(x) = 5x^3 -
Well I am asked to do this : (VBA EXCEL)
Write a user-defined vba function to determine the real root of f(x) = 5x^3 - 5x^2 + 6x - 2 when xl = 0 xu = 1 and es = 1%.
Below is my code, and I do not know why it is not working or what is wrong with it. It does not work. Please help!!

Function f(x) f=5*x^3-5*x^2+6*x-2 End Function Function Bisect(xl, xu, es) Performs Bisection method Dim xrold As Double, test As Double su=1 tsl = f(xl ) ea-100 Relative Error to test xtold =su 'Initial guess of the root loops 0 'Will be used for counting Do While ea eAnd loops 50 XC = (x1 +xy) / 2 loops loops +1 If O Then End If test-f(xl) * f(&W If test 0 Then Else End If lfea
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
