Computer Science, asked by madhuryagowd2869, 3 days ago

Sinx-1/x=0 bisection method

Answers

Answered by keshavshobana
0

Answer:

Given:

sin(x) = 1/x

The root lies between 1 and 1.5

To find:

Approximate root up to 7th iteration.

Solution:

Here sin(x) = 1/x

∴ sin(x) - 1/x = 0

Let f(x) = sin(x) - 1/x

1st Iteration:

Here f(1) = -0.159 < 0 and f(1.5) = 0.331 > 0

∴ Now, Root lies between 1 and 1.5

x₀ = (1 + 1.5) / 2 = 1.25

f(x₀) = f(1.25) = sin(1.25) -  1 /1.25  = 0.149 > 0

2nd Iteration:

Here f(1) = -0.159 < 0 and f(1.25) = 0.149 > 0

∴ Now, Root lies between 1 and 1.25

x₁ = (1 + 1.25) / 2 = 1.125

f(x₁) = f(1.125) = sin(1.125) - 1/1.125 = 0.013 > 0

3rd Iteration:

Here f(1) = -0.159 < 0 and f(1.125) = 0.013 > 0

∴ Now, Root lies between 1 and 1.125

x₂ = (1 + 1.125) = 1.062

f(x₂) = f(1.062) = sin(1.062) - 1/1.062 = -0.068 < 0

4th Iteration:

Here f(1.062) = -0.068 < 0 and f(1.125) = 0.013 > 0

∴ Now, Root lies between 1.062 and 1.125

x₃ = (1.062 + 1.125) / 2 = 1.094

f(x₃) = f(1.094) = sin(1.094) - 1/1.094 = -0.026 < 0

5th Iteration:

Here f(1.094) = -0.026 < 0 and f(1.125) = 0.013 > 0

∴ Now, Root lies between 1.094 and 1.125

x₄ = (1.094 + 1.125) / 2 = 1.109

f(x₄) = f(1.109) = sin(1.109) -  1/1.109 = -0.006 < 0

6th Iteration:

Here f(1.109) = -0.006 < 0 and f(1.125) = 0.013 > 0

∴ Now, Root lies between 1.109 and 1.125

x₅ = (1.109 + 1.125) / 2 = 1.117

f(x₅) = f(1.117) = sin(1.117) - 1/1.117 = 0.004 > 0

7th Iteration:

Here f(1.109) = -0.006 < 0 and f(1.117) = 0.004 > 0  

∴ Now, Root lies between 1.109 and 1.117

x₆ = (1.109 + 1.117) / 2 = 1.113

f(x₆) = f(1.113) = sin(1.113) - 1/1.113 = -0.001 < 0

Therefore, after the 7th iteration, the approximate root is 1.113

Attachments:
Similar questions