top of page
  • neelkantha42

Trig of the trade: Call Mr. Taylor!

Having had to concentrate on subjects in addition to the subject of all subjects, Maths, I haven't been able to indulge much recently in investigating Taylor and Maclaurin Series. Turning the "pages" of a few old files, I found this write up of some thoughts I had a few summer holidays ago. Here trigonometry meets complex vectors and we find a "real definition" of sin, cos and tan.

So, to recap, sin(x), cos(x) and tan(x), for any right-angled triangle, are shown below:


sin(x) = opposite/hypotenuse

cos(x) = adjacent/hypotenuse

tan(x) = opposite/adjacent (=sin(x)/cos(x))


In a diagram:

Also, tan(x) = | / ___ (opposite side / adjacent side) = sin(x)/cos(x)

Note, x is in radians, not degrees.

We'll come back to this basic trigonometry at a point not so far in the future, but first let's look at another interesting branch of maths: The Taylor/Maclaurin Series. What are these series and how does one form them?


Let's say we have a random function, f(x), that is continuous at all derivatives, (no jumps or gaps) , something like (xe^x + 0.05x) shown below in the graph :



Now say that we can describe this function as a polynomial (we actually can!). The first term in our polynomial (henceforth shown as a blue line) would be a constant term (the constant would be the value of this function at any arbitrary x, for example, x=0):




This is a rubbish approximation. To improve this we could at least make the slope of the polynomial at x=0 the same as the original function:



This is still rubbish, but better! The next step in our polynomial is an x^2 term, with a coefficient that is half of the second derivative of the function (x^2 + 1.05x):


This is even closer, but still no dice! We need to add a cubed term with a coefficient that is one sixth of the third derivative of the function (x^3/2 + x^2 + 1.05x). I will explain these fractions later:


At least for positive x, it is very close. This is the third degree polynomial that fits the original function.


4th degree:

5th degree:


and so on...


10th degree:

20th degree:

...

You see that the sudden upshot to high values (on the left) keeps retreating with every 10th iteration. The infinite-th iteration will retreat infinity steps, thus covering the function completely. The infinite polynomial (the Taylor/Maclaurin series) will equal the function. Any finite polynomial, even to the millionth degree, will only approximate functions that are not polynomials themselves.


Let me explain how I formed these. Let's say the function is f(x), the nth derivative of this function at x is f[n](x), the value of the polynomial at x = p(x) and its nth derivative at x =

p[n](x). The value of the polynomial at x=0, or p(0), should equal f(0). Therefore:


p(x) = f(0) + ...


Then we can try to make the slope of the polynomial at 0, or p[1](0), equal f[1](0). Therefore:


p(x) = f(0) + f[1](0)x + ...


Then we can try to make the second derivative of the polynomial at 0, or p[2](0), equal f[2](0). Therefore:


p(x) = f(0) + f[1](0)x + (f[2](0)/2)x^2 + ...


Using the power rule, p[2](x) = f[2](0) + ax + bx^2... . These non-constant terms are the result of higher-degree terms. When x -> 0, these terms also go to 0. Therefore, p[2](0) = f[2](0).


By this logic, we can conclude that:


p(x) = f(0) + f[1](0)x + (f[2](0)/2)x^2 + (f[3](0)/6)x^3 + (f[4](0)/4!)x^4 ...


Given that f(x) is continuous at all derivatives:


f(x) = p(x) = f(0) + f[1](0)x + (f[2](0)/2)x^2 + (f[3](0)/6)x^3 + (f[4](0)/4!)x^4 ...


We can do this for e^x, sin(x) and cos(x):


e^x = 1 + x + (x^2)/2 + (x^3)/3! + (x^4)/4! + (x^5)/5! + ...

sin(x) = x - (x^3)/3! + (x^5)/5! - (x^7)/7! + ...

cos(x) = 1 - (x^2)/2 + (x^4)/4! - (x^6)/6! + ...


Now consider e^(ix). This will be:


e^(ix) = 1 + ix - (x^2)/2 - i(x^3)/3! + (x^4)/4! + ...

= (1 - (x^2)/2 + (x^4)/4! - (x^6)/6! + ...) + i(x - (x^3)/3! + (x^5)/5! - (x^7)/7! + ...)

= cos(x) + isin(x)


This leads to the most beautiful equation ever:

e^ix shows a complex vector, one that etches a unit circle on the complex plane like this:


Now what would e^(-ix) look like?

Well, e^(-ix) = cos(-x) + isin(-x) = cos(x) - isin(x). This would yield a rotation in the opposite direction:

What if we add e^ix and e^(-ix) together?

Note that e^ix and e^(-ix) are complex conjugates (meaning their imaginary components are equal but opposite in direction) and so their sum has no imaginary component. The sum is real.


The sum is e^ix + e^(-ix) = cos(x) + isin(x) + cos(x) - isin(x) = 2cos(x) (!)


Therefore (Equation 1):


Now what if we subtract e^(-ix) from e^ix?


Well, e^ix - e^(-ix) = cos(x) + isin(x) - cos(x) + isin(x) = 2isin(x) (!)


Therefore (Equation 2):

We can now, instead of thinking of sin and cos as ratios of the sides of triangles, think of them as the sum of complex vectors. This is useful as we can expand the possible value of x from real numbers to complex numbers.


Note cosh(x) (Equation 3):

With rearranging Equations 1 and 3, we can deduce that:


cosh(x) = cos(ix)


And sinh(x) (Equation 4):

With rearranging Equations 2 and 4, we can deduce that:


sinh(x) = isin(-ix)


So now, we have also established a link between ordinary (sin, cos etc.) and hyperbolic (sinh, cosh etc.) trigonometry!


Please share your thoughts in the comments below and C u soon!

18 views

Recent Posts

See All

Comentários


bottom of page