## Taylor Series with example cos(x)

The Taylor series is the general case of the Maclaurin Series for calculating the value of a function. It enables you calculate the value of a function at any point if you can find the value of the function and and all its derivatives at any point. This is done as a power series. The series is as follows:

The series is said to be taken about meaning we calculate the derivatives of the function at the point a and then from these we find the value of the function. Because the series is infinite we can never find the value of the function exactly but we can give it to any required degree of accuracy by taking the first i terms of the series. The Maclaurin Series is just the Taylor series about 0.

### Example cos(x)

An example of the Taylor series is to find a power series for cos(x). We can choose to do this about any value of a so in this example we will use . In this example we will look at the first 2 no zero terms.

The first we need to find the value of the derivatives and the function at pi/2.

The first one is:

We now need to differentiate the function to get:

and then take its value at which is:

Similarly for the second term we differentiate again to find the second derivative is:

so at pi/2 this is

Since the last term was zero we need to find the next one which is:

so

Now we have found all the values of the function and its derivative we need for the level of accuracy required we can simply put these values into the series to get

To test this we can try

which is close to the 1/2 it really is.

## Fermat’s Last Theorem

Fermat was a 17th century mathematician who provided a number of theorems and some of their proofs. The most intriguing of hi theorems is Fermat’s Last Theorem which is as follows:

the equation

has no integer (whole number) solutions for n>2

For example a solution for n=2 is x=3, y=4, z = 5 since

however the theorem states that for any n larger than 2 a set of integer solutions such as these cannot be found.

Despite the simplicity of this theorem it took 300 years until 1994 for it to be solved by Andrew Wiles using advanced maths.

A fascinating book on the problem is called Fermat’s Last Theorem (by Simon Singh) which goes through the history of the problem and many of the people who have attempted to solve it.

## Compound tan – tan(A+B)

We can use expressions for cos(A+B) and sin(A+B) to help us find tan(A+B).

Using the identity tanx = sinx / cosx we can write

we can now substitue in

sin(A+B) = sinAcosB + sinBcosA

and

cos(A+B) = cosAcosB – sinAsinB

to get

We can now divide both the top and bottom by cosAcosB to get

or

We can now simplify this by cancelling any cosA and cosB to get

finally by substituting the identity we find our result

And it can be shown that this result can be extended to

## Maclaurin Series with example sin(x)

The Maclaurin series is a way of approximating a function f(x) using a power series of x. It only works on functions you can differentiate but you can gain any level of accuracy by stopping the series at different points. It is equal to the taylor series for a function about 0. One example of a use of the Maclaurin series is to calculate a value for sin(x).

The Maclaurin series for a function f(x) is as follows:

or

### Example sin(x)

An expression for sin(x) can be calculated using this method. Firstly we must decide what level of accuracy to go to, for the example we will go to the 3rdterm. The next step is to differentiate sinx. Firstly let f(x) = sinx

then

We can now combine these into the series to get

which can be used to calculate the value of sin(x) — though only for the radian measure of angle.

eg)

0.8663

Which is approximately the value you would get if you type sin(pi/3) into a calculator.

## Complex roots of unity

Without complex numbers taking the square root of any positive integer, such as 1, will give you two answers, in this case +/- 1, but taking the cube roots will only five you one answer, 1. However when we consider the complex roots you will find that the nth root of any number will give you n roots.

This can be shown using De Moivres theorem. Firstly consider the complex number z = cosΘ + isinΘ and let

z^{n} = 1

(cosΘ+isinΘ)^{n} = 1

which using De Moivres theomrm gives

cos nΘ + isin nΘ = 1

We can now compare the real and imaginary parts to find the values of n

cos nΘ = 1 and sin nΘ = 0

Therefore nΘ = 2pπ for integral values of p

So

which gives

so the roots of unity are

etc

However what is interesting about these is when you plot them on an argand diagram they are evenly spaced around a circle of radius 1 and centred at the origin. An example for n=8 is shown below

This happens becuase the increase in the angle for each successive root is equal since we divided 2pi by n.

## Equations using Polar Co-ordinates

Equations with polar co-ordinates, like those with Cartesian ones, are a relationship between the two co-ordinates. Graphs of these equations can be draw by drawing a line through all the points that satisfy the equation.

**Note// This post assumes you can use polar co-ordinates. **

Examples of some simple polar equations are

**r=**θ

and

**r=3sin**θ

### Tips for Sketching Polar Graphs

There are number fo ways to make it easier to sketch polar graphs. Some of the basic methods are as follows:

- Plot a point for every π/6
- If the graph is a cos function it will be symmetrical about the initial line (since cos(-x) = cosx). This means you only have to calculate from 0 to π and then draw the other side using symmetry.
- If the graph is a sin function it will be symmetrical about the line θ=π/2 so you only need to calculate from -π/2 to π/2 and then flip it.

An applet for sketching these graphs is at http://www.ies.co.jp/math/java/calc/sg_kyok/sg_kyok.html however I recommend that you attempt to sketch the graphs for yourself first and then use it to check. Note that for some graphs it doesn’t seem to give you the sketch for the full range you enter.

### Conversion to and from Cartesian Form

As with points in a 2D plane polar equations can be converted to Cartesian equations and similarly Cartesian equations can be converted to polar ones. To do this we will use the same equations as were need for the conversion of points. These are:

- x = rcosθ
- y=rsinθ
- r
^{2}= x^{2}+ y^{2} - θ = tan
^{-1}(y/x)

We can then substitute the appropriate equations into the one we want to convert to find its equivlinet.

**A Cartesian to polar example**

consider the equation of a straight line in Cartesian co-ordinates

y=3+2x

To write this in polar form we can substitute in equations 1 and 2 to get

rsinθ = 3 + 2rcosθ

which can be re-arranged however you like.

**A polar to Cartesian example**

consider the polar equation

r=3sin θ

Then from 2 we know sinθ=y/r so we get

r = 3y/r

which gives

r^{2} = 3y

but from 3 we know r^{2} = x^{2} + y^{2}

so we get

x^{2} + y^{2} = 3y

## Using Polar Co-ordinates and Converting to and from Cartesian

Polar co-ordinates are a different co-ordinate scheme to the standard Cartesian co-ordinates. Again any point in a 2D plane can be located using only two numbers.

It works by taking an “initial line” (shown in red — the equivalent of the positive x axis in Cartesian co-ordinates) with the origin at one end. Then any point can be found by drawing a line from the point to the origin and quoting the length of this line (the radius) and the angle the line makes with the origin. These numbers are usually written in brackets in the same way as Cartesian co-ordinates with the radius first followed by the angle. For example look at the point (3,π/3) below.

**Note//** The angles are usually measured in radians

### Cartesian Equivalent of Polar Co-ordinates

Since both Cartesian and polar co-ordinates are a way of describing a point position in a 2D plane it is possible to convert between then. When doing this the initial line is taken as the x-axis.

To find the Cartesian co-ordinates we must use trigonometry by drawing a vertical line down from the point to the x-axis to form a right angled triangle. The length of the vertical line then gives the y- coordinate and its distance from the origin gives the x-coordinate.

To find the x and y values for the point (r,Θ) we must therefore use the equations

x = rcosΘ

and

y = rsinΘ

If we want to go in reverse to find the polar co-ordinates of the point (x,y) in a Cartesian system we must solve these equations simultaneously.

We can eliminate Θ by squaring both of the equations to obtain

x^{2} = r^{2}cos^{2}Θ

and

y^{2} = r^{2}sin^{2}Θ

and then adding these equations to get

x^{2} + y^{2} = r^{2}(cos^{2}Θ + sin^{2}Θ)

by substituting the trigonometric identity sin^{2}+cos^{2} = 1 to get

x^{2} + y^{2} = r^{2}

we have removed Θ and can therefore calculate r using

**r =√(x ^{2} + y^{2})**

To find Θ we can divide the two equations given at the start such that the r’s cancel to get

y/x = sin Θ/cos Θ

which using the identity tan Θ=sin Θ/cos Θ gives

** Θ = tan ^{-1}(y/x)**

## Comments