Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 lfeaStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started