at but all we know about this function is this:
Let's say want to computer the value of a function
and
One way to do this to use linear approximation repeatedly with a defined step size (say h). The lesser will be the value of step, the better approximation we can have.
Let's take an example,
Let's use the step size of
Using, a step size of or , we can first compute the value at and then at f(1) which we ultimately require.
Generally, linear approximation states:
and this can go forever.
To approximate the value of f(1) using a step size of that is for , we can do it like this:
First, we compute value of at like this:
Secondly, we can use the value of at to computer like this:
Now, write a program to find the value of using a step size of or with repeated linear approximations.
The approximation of using this program is:
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
f(20) is just (1+0.05)^20 = 2.6532977051444213..., no need to write a program. Indeed, as the step size -> 0, this value becomes e, since (1 + 1/n)^n = e for as n -> ∞
Of course, for other functions, it isn't as simple as this.