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!!

Well I am asked to do this : (VBA EXCEL) Write a

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= 50 Then Exit Do Loop Bisectx Sheets("Q3" Cells(4, 7) End Function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!