Question

Determine the real root of f (x) = −25 + 82x − 90x2 + 44x3 −8x4...

Determine the real root of f (x) = −25 + 82x − 90x2 + 44x3
−8x4 + 0.7x5:

Using python in bisection to determine the root to s = 10%. Employ
initial guesses of xl = 0.5 and xu = 1.0;

pls use python

Homework Answers

Answer #1

"""
  Python program for bisection method
"""

def func(x):
  return (0.7*(x**5) + -8*(x**4) + 44*(x**3) + -90*(x**2) + 82*x - 25)
   
def bisection(xl,xu):
  if (func(xl) * func(xu) >= 0):
    print("Wrong choice for xl and xu")
    return

  x = xl
  while ((xu-xl) >= 0.10):
    # Find middle point
    x = (xl+xu)/2

    # Check if middle point is root
    if (func(x) == 0.0):
      break

    # Decide the side to repeat the steps
    if (func(x)*func(xl) < 0):
      xu = x
    else:
      xl = x

  print("The value of root is : ", x)

a = 0.5
b = 1
bisection(a, b) 

Note: Drop comments, for queries.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Find root of the equation cos (x) = xex using Bisection method. Make calculation for 4...
Find root of the equation cos (x) = xex using Bisection method. Make calculation for 4 iterations. Choose xl= 0 and xu= 1. Determine the approximate error in each iteration. Give the final answer in a tabular form.
1. Use the Intermediate Value Theorem to show that f(x)=x3+4x2-10 has a real root in the...
1. Use the Intermediate Value Theorem to show that f(x)=x3+4x2-10 has a real root in the interval [1,2]. Then, preform two steps of Bisection method with this interval to find P2.
Let f(x) = x^3 + x - 4 a. Show that f(x) has a root on...
Let f(x) = x^3 + x - 4 a. Show that f(x) has a root on the interval [1,4] b. Find the first three iterations of the bisection method on f on this interval c. Find a bound for the number of iterations needed of bisection to approximate the root to within 10^-4
Let f(x)=sin(x)+x^3-2. Use the secant method to find a root of f(x) using initial guesses x0=1...
Let f(x)=sin(x)+x^3-2. Use the secant method to find a root of f(x) using initial guesses x0=1 and x1=4. Continue until two consecutive x values agree in the first 2 decimal places.
Find the root of the function f(x) = 8 - 4.5 ( x - sin x...
Find the root of the function f(x) = 8 - 4.5 ( x - sin x ) in the interval [2,3]. Exhibit a numerical solution using Bisection method.
For the following function, determine the highest real root of f(x) = 2x3 – 11.7x2 +...
For the following function, determine the highest real root of f(x) = 2x3 – 11.7x2 + 17.7x - 5 by using (a) graphical methods, (b) fixed point iteration (three iterations, x0 = 3) (Hint: Be certain that you develop a solution that converges on the root), and (c) Newton-Raphson method (three iterations, x0 = 3). Perform an error check on each of your final root approximations (e.g. for the last of the three iterations).
Consider a function f(x) = 2x3 − 11.7x2 + 17.7x − 5. Identify the root of...
Consider a function f(x) = 2x3 − 11.7x2 + 17.7x − 5. Identify the root of the given function after the third iteration using the secant method. Use initial guesses x–1 = 3 and x0 = 4. CAN YOU PLZ SHOW ALL THE WORK. THANK YOU
Use false-position method to determine the drage coefficient needed so that an 80-kg bungee jumper has...
Use false-position method to determine the drage coefficient needed so that an 80-kg bungee jumper has a velocity of 36 m/s after 4 s of free fall. Note: The acceleration of gravity is 9.81 m/s^2. Start with initial guesses of xl = 0.1 and xu = 0.2 and iterate until the approximate relative error falls below 2%.
Find the root of f(x) = exp(x)sin(x) - xcos(x) by the Newton’s method starting with an...
Find the root of f(x) = exp(x)sin(x) - xcos(x) by the Newton’s method starting with an initial value of xo = 1.0. Solve by using Newton’method until satisfying the tolerance limits of the followings; i. tolerance = 0.01 ii. tolerance = 0.001 iii. tolerance= 0.0001 Comment on the results!
Let f(x)=e^x −x −1 be defined on (−∞,∞). Find a real number a so that a...
Let f(x)=e^x −x −1 be defined on (−∞,∞). Find a real number a so that a is a root of f,that is f(a)=0. Using the Mean Value Theorem, show that there is no other root of f, i.e., show that if there is a real number b so that f(b) = 0, then a = b.