Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Language: Python Problem A.4. Finding with Newton's method It is common knowledge that 3.14, but in this exercise you will use Newton's method and knowledge

Language: Python

image text in transcribed

Problem A.4. Finding with Newton's method It is common knowledge that 3.14, but in this exercise you will use Newton's method and knowledge of the sine function to improve an approximation of . Newton's method can be written as a difference equation defined f(In-1) In = In-1-f(n-1) and is used to find roots of f(r), based on the function f(x), the derivative of the function f'(x) and an initial guess Io. Consider the function f(x) = sin(I). Finding the functions derivative f'(x), should be trivial. This function has infinitely many roots, which we know are located at x = km, where k is an integer. This exercise will focus on the root for k = 1, and use Newton's method to approximate 1. For Newton's method to converge towards the correct root, the initial condition, to, needs to be set close to the value of . Set Xo = 3.14 and calculate 11 and 12 following Newton's method. Print out 20, 1 and 22, as well as the value of numpy.pi with 13 decimals. You should print them in a tidy way such that the values are easy to compare. If Newton's method was used correctly, your values for should improve

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions