Approximating the value of a function

Therefore, your approximation is accurate to within 1/16. In summary, the question asked for an approximation of the square root of 5 using binary search and the function f(x)=x^2-5 in the domain [2,3] with an accuracy of 1/16. The process involved finding where the function is equal to 0 and calculating values at various points until the answer of 2.1875 was reached. The accuracy of this approximation was determined to be within 1/16.
  • #1
Yankel
395
0
Hello,

I have a problem which I did solve, but I ain't sure of something in it, something small to be honest.

The question is:

Use a binary search and the function f(x)=x^2-5 in the domain [2,3] to find approximation for the value of the square root of 5, with an accuracy of 1/16.

What I did, I tried finding where the function is equal to 0, i.e. x^2-5=0 meaning x is the square root of 5.

I calculated f(2) and f(3), and then f(2.5), f(2.25), f(2.125) and finally f(2.1875), which is the answer (2.1875 is the answer). My simple question is, how, or where, do I see that I am 1/16 accurate ?

Thank you !
 
Physics news on Phys.org
  • #2
Hi Yankel,

You didn't mention the values for f, but either way, the actual root is either between 2.125 and 2.1875, or between 2.1875 and 2.125.
So the maximum deviation from 2.1875 is 0.0625, which is 1/16.
 

FAQ: Approximating the value of a function

What is the purpose of approximating the value of a function?

The purpose of approximating the value of a function is to find an estimated value that is close to the actual value of the function. This is useful in situations where the exact value of the function is difficult or impossible to calculate.

How is the value of a function approximated?

The value of a function can be approximated using various methods such as linear approximation, polynomial approximation, and numerical integration. These methods involve using known values of the function to estimate the value at a specific point.

What are the limitations of approximating the value of a function?

One limitation of approximating the value of a function is that the estimated value may not be completely accurate. Another limitation is that the accuracy of the approximation may decrease as the distance from the known points increases.

Can approximating the value of a function be used in any type of function?

Yes, approximating the value of a function can be used in any type of function, including linear, quadratic, exponential, and trigonometric functions. However, the method of approximation may vary depending on the type of function.

How can the accuracy of the approximation be improved?

The accuracy of the approximation can be improved by using more known values of the function, choosing a more precise method of approximation, and reducing the interval between known points. Additionally, using advanced techniques such as Taylor series can also improve the accuracy of the approximation.

Back
Top