Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

r Consider the equation: x+3x - 10 = 0 To find a root of this equation, we rearrange this equation into the form + =

image text in transcribed
image text in transcribed
r Consider the equation: x+3x - 10 = 0 To find a root of this equation, we rearrange this equation into the form + = 10-3x = (10-3x?) and guess a value of x so that the difference between the RHS and the LHS is very small. The procedure is to guess a value for x, substitute this value into the right-hand side of the rearranged equation and thus calculate a new value for x. This new value will then be substituted into the right-hand side, and still another value obtained for x and so on. This is called the iterative process. The procedure will continue until successive values of x become sufficiently close converges) or a specified number of iterations have been completed. The program algorithm is shown below. In the flow diagram, the following symbols have been used: the value of x substituted in the RHS of the equation the newly calculated value of x an iteration counter (I will increase by 1 at each successive iteration the maximum permissible number of iterations X X1 N The first part of the algorithm is as follows: 1 Input X, and N 2 Intiate the counter (set i=1) 3. Compute a value for X1 using the formula X1 = (10 - (3*X)*2)**0.2 Use the flow diagram to write a Python programme to find the root of the above equation. START READ XN 1=1 XI= (10-8-X+2).2 PRINT 1,X1 1-1-1 IS X-X1 0.000017 YES PRINT X1,1 NO XX1 NO IS I=N: YES PRINT I.X1 STOP

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_2

Step: 3

blur-text-image_3

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions