TAILIEUCHUNG - A textbook of Computer Based Numerical and Statiscal Techniques part 59

A textbook of Computer Based Numerical and Statiscal Techniques part 59. By joining statistical analysis with computer-based numerical methods, this book bridges the gap between theory and practice with software-based examples, flow charts, and applications. Designed for engineering students as well as practicing engineers and scientists, the book has numerous examples with in-text solutions. | 566 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES b x1 x1 a b 2 printf f x1 The root of the given equation is . ALGORITHM FOR FALSE POSITION METHOD Step 1. Step 2. Step 3. Step 4. Start of the program to compute the real root of the equation Input the value of x0 x1 and e Check f x0 x f x1 0 If no print Error and exit Step 5. x0f xi - x1f x0 If yes compute x - 2 f x1 - f x0 Step 6. Step 7. Step 8. Step 9. Step 10. Step 11. Step 12. Compute f x2 Again if f x2 x f x0 0 Set x1 - x2 Else set x0 - x2 Continue the process step 5 to step 9 till to get required accuracy Print output End of the program. PROGRAMMING FOR FALSE POSITION METHOD 1 Find the Real Root of the Given Equation x3 - 2x - 5 0 include include include void false float float void main float x0 3 x1 4 clrscr false x0 x1 getch void false float x0 float x1 COMPUTER PROGRAMMING IN C LANGUAGE 567 int i float x2 0 a 0 b 0 c 0 for i 0 i 12 i a pow x0 3 -2 x0-5 b pow x1 3 -2 x1-5 x2 x0- x1-x0 b-a a c pow x2 3 -2 x2-5 if c 0 x0 x2 else x1 x2 printf f x2 The root of the given equation is . 2 Find the Real Root of the Given Equation 3x sin x - ex 0 include include include float flase float float void main float a x0 0 x1 1 b x2 clrscr a false x0 x1 b false x2 printf f b getch float false float x0 float x1 float x2 int i for i 1 i 13 i y0 3 x0 sin x0 -pow x0 y1 3 x1 sin x1 -pow x1 x2 x0- x1-x0 y1-y0 y0 y2 3 x2 sin x2 - pow x2 if y2 0 568 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES x0 x2 else x1 x2 return x2 The root of the given equation is 36042. ALGORITHM FOR ITERATION METHOD Step 1. Start of the program to compute the real root of the equation Step 2. Input the value of x0 initial guess Step 3. Input the value of required alllowed error e Step 4. Input the total iteration to be allowed n Step 5. Compute x0 x1 x0 step 7 to 8 are repeated until the procedure converges to a root Step 6. For i 1 to n in step 2 to

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.