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

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
Get step-by-step solutions from verified subject matter experts
