How can $\sin(2)$ be approximated?

176 Views Asked by At

How can I approximate the $\sin(2) ≈ 0.909297\dotso$ using Taylor expansion in different ways?

I feel like this would produce a lot of digits, I'd have to use a calculator. Also, is there a way to automate the function, i.e. that it takes the expansion order n as an argument?

I've been studying calculus for a while, however I would appreciate an explanation as I am a bit rusty and trying to get back into it.

1

There are 1 best solutions below

1
On

It seems like you're looking for a general form of the Taylor polynomial. Taylor's theorem itself is proven rigorously, but I'm going to ignore the proof and stick to the "what is it" part.

First, the whole point is to approximate some difficult to compute function, $f(x)$, at some point $x = a$, using simpler to compute functions. In the case of Taylor, these "simpler" functions are polynomials. The issue is that some functions require an infinite number of terms to be approximated to arbitrary accuracy, but that's an issue for the proof.

We can begin with a rather obvious statement: there is a "zeroth" order Taylor polynomial, which is:

$$f(x) \approx f(a)$$

This just assumes that $f$ is constant. It's REALLY boring, and doesn't do much for us. However, it reveals something important: we need to know the value of the function at some point, $x=a$, in order to do the Taylor approximation. In fact it's worse than that - you also need to know the derivatives of the function there. Let's explore.

The higher order Taylor polynomials add higher order derivatives. Let's go a bit deeper into the first order Taylor approximation to see what's going on here intuitively:

$$f(x) \approx f(a) + f'(a)(x-a)$$

What does this mean? Well, think about it this way: when $x = a$, then $(x-a) = 0$ and we get $f(a) = f(a)$, which is good! It's at least accurate at the right point.

Now, in a small neighbourhood around $x = a$, the first derivative is the slope of the line that best approximates $f(x)$. That slope is approximated by:

$$f'(x) \approx \frac{f(x)-f(a)}{(x-a)}$$

or, a bit simpler, "delta y over delta x". it's that "delta y" thing that's important. We are saying that, at points close to but not exactly $a$, the function is given by the value at the known point $x = a$ plus some small change in function value - delta y.

The intuition doesn't really hold the exact same way for higher derivatives, but it's similar enough - take what you know, add a small correction to it (the delta y in the first order approximation).

The general formula is this:

$$f(x) \approx f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \cdots + \frac{f^{(n)}}{n!}(x-a)^n$$

So in that sense, there is your answer. For a given $n$, find all of the $n$ derivatives, and plug it into the formula.

The residuals or remainders can't be computed exactly, but can be bounded. If we could compute them exactly then we'd be able to figure out what the function is by just adding them to the Taylor approximation.