Question
1. Use a while loop to print values of the first 100 perfect cubes (whole numbers raised to the third power). 2. Use a
1. Use a while loop to print values of the first 100 perfect cubes (whole numbers raised to the third power). 2. Use a while loop to implement a. Left endpoint rule b. Midpoint rule c. Right endpoint rule to approximate the definite integral cos xdx with a regular partition 0 = x0 < x1 < x2 < X3 < x4 < X5 < X6 < X7 < X8 < X9 < X10 = 2 T xi ih, i = 0, 1, 2,..., 10, and, h = 20 3. Learn from Wikipedia about Bisection Method again. Implement a Python code Using Bisection Method to find a root of the polynomial f(x) =x-x-2 By Intermediate Value Theorem, f(x) has a root on [1, 2]. You may use a while loop with error no more than 1E-6. 4. Learn from Wikipedia about Newton's method. Write a function with name "New- tonMetho", taking arguments 1) a function f, 2) an initial guess xo, 3) error tolerance 1E 6. Use Newton's method to find a root of the polynomial f(x) = x-x-2 You might pick x0 = 1.5, and error tolerance as 1E-6. You may use a while loop.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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