Showing posts with label maths. Show all posts
Showing posts with label maths. Show all posts

Thursday, January 22, 2009

Equations of Motion

The 4 equations of motion deal with an object which is travelling with constant acceleration (which can be 0 and therefore constant speed).

The equations are as follows:

(1) v = u + at
(2) s= t(v+u)/2
(3) v2=u2+2as
(4) s = ut + at2/2

Where
a = acceleration – this must be constant for equations to hold
u = initial velocity, ie at the start of the journey
v = final velocity, ie at the end of the journey
s = displacement which is a vector quantity for the distance of the object from its starting point
t = time taken for journey
Any of these values can be found using the equations if at least 3 of the other values are known.

Equation (1) comes from the definition of acceleration as acceleration is the rate of change of velocity and therefore for constant acceleration
a = (v-u)/t which you can rearrange to make
v = u + at

velocity time graph

Equation 2 can be found by either considering a distance time graph or using the average speed. (v+u)/2 gives the average speed during the journey as a is constant and buy multiplying this by t we find the displacement. Or from the graph we can find it as the area under the graph is a trapezium of height t and sides u and v so using the area of a trapezium formulae we find 2.

Equation (4) can be formed by substituting 1 into 2 so
s = t(u+at+u)/2
s = t(2u + at)/2
s= 2ut/2 + at2/2
s = ut + at2/2

Equations 3 can also be found using 1 and 2 by rearranging 2 to get an expression for t we find
t=2s/(u+v)

If we substitute this into v = u+at we get
v=u+2as/(v+u)
And by bringing up the v+u we find
v2+vu = u2+vu + 2as
And because we have vu on both sides we can cancel these to find 3

v2=u2+2as

Sunday, January 11, 2009

Transformations of Graphs

 

This looks at how a given graph will change when the the function is changed slightly eg how the graph y=x will change when it becomes y = 2x.

y = af(x)

The graph f(x) will "steeper" as the y value of each point is multiplied by a. It will appear like a "stretched" version of the graph y=f(x) 

graph transformation y=af(x)

 

 

y =f(x) + a

The graph f(x) will move up by the amount a as a is added to each y value. This means that the points of intersection of the graph and the y axis will increase by the amount a. The intersection of the graph and the x-axis will depend upon the function of the graph.

transformation graph f(x) + a

 

y = f(ax)

This will make the graph appear "narrower" beacuse y is taking the value of f(x) a time across. So if the value of f(x) is 3 when x =12 then the value of f(4x) = 3 when x=3 as 12/4=3.

transformation graph f(ax)

y=f(x+a)

This will shift the graph to the left by a. This is because the value of f(x) at x+a is displayed at the point x so effectively the graph occurs a earlier and therefore shifts to the left.

transformation graph y(x+a)

Saturday, January 10, 2009

Sec, Cosec, Cot

Sec, cosec and cot are all functions in trigonometry. They are simply equal to one over on of the other functions, ie cos, sin and tan.

so

Sec = 1/cos

Cosec = 1/sin

cot = 1/tan

You can remember which is paired with which using the third letter rule. This is that the third letter is the first letter of the corresponding function ie)

sec goes with cos
cosec goes with sin
cot goes with tan

Friday, January 2, 2009

Factorising Quadratics

Factorising quadratics is basically putting them in brackets. In this section we will look at two different ways of factorising quadratics( for simple and complex ones) and when they should be used.


Note/ sometimes a quadratic cannot be factorized using whole numbers, this is when you must use the quadratic equation to find the values of x. See my earlier post and c++ program


Simple type


Use when there is no coefficent of x2


eg)x2+2x-8


start by opening 2 brackets with an x in each

(x )(x )

put the first sign in the first bracket. If the second sign is + put the same sign in both, if its - put the opposite sign in the second bracket

(x+ )(x- )

find the 2 numbers that will add(if both signs in brackets are +) or subtract(if the signs in the brackets are different) to make the middle number(2) and multiply to make the end number(8)

(x+4)(x-2)

and thats your quadratic factorized


Complex Type


Use when there is a coefficent of x2


eg) 8x2-14x-15

Before we can open brackets we need to split up the 14x

8x2 ?x ?x-15

the rule for the signs is the same as in the simple case, put the first sign before the first x term. If the second sign is + put the same sign in both, if its - put the opposite sign before the second x term

8x2-?x+?x-15

we also use the same rule for the to coefficients of x, they must add or subtract to make the middle number(14) but they must times to make the end number times the first(15×8=120)

8x2-20x+6x-15

we then take out the common factor of the first 2 terms(4x)

4x(2x-5) + 6x -15

we use the bracket(2x-5) as the common factor for the second 2 terms and find what we need to multiply by(3)

4x(2x-5)+3(2x-5)

we then take the 2 numbers in front of the brackets(4x and 3) as our second bracket

(4x+3)(2x-5)

and there we have a fully factorized quadratic

Matrix Multiplication

This is a simple tutorial on how to multiply 2 matrices together. You can speed up doing this using my c++ matrix calculator (download matrix calculator) but I strongly recommend learning how to do them long hand first as you should only use formulae and program that you understand how they work. Multiplying matrices is a useful thing to know as it enables complex algebra to be simplified and i used extensively in 3d computer graphics.


What Matrices can i Multiply Together


You may fin it surprising that only certain size matrices can be multiplied together, this is because of the way the multiplication is done and how the size of the answer is determined.


The size of a matrix is given as rows by columns

eg) 2 3 1

3 6 1

is a  2×3 matrix. When multiply matrices the columns of the first matrix must be equal to the rows of the second. The size of the new matrix is given by the rows of the first by the columns of the second


eg) Fig1


demostration of the size of matrix after multiplication


How is the multiplication Done


The way in which matrix multiplication is done is surprisingly simple.  Go to the first point in the new matrix. Look at the row it is in and go to the start of that row in the first matrix and the start of the column it is in in the second matrix. Multiply these to numbers together, then move along one in the first matrix and down one in the second matrix and multiply these together. Keep going till you have reached the end of the row of the first matrix, now add all of these values up and that is the first value for your new matrix.


So you go to the row in the first, the column in the second, times each pair of values and add them up for each value.


In the above diagram (fig 1)

u=ag + bk

v=ah+bl

w=ai+bm

x=cg+dk

y=ch+dl

and so on….


That may sound a little confusing but you’ll soon get used to it and it is very useful. If you want to practise and check your answers please download my c++ matrix calculator, the command for multiply is mlt, though you will have to define you matrices using the dim command first. All the data it needs off you is asked for


If you have any comments please leave them below or email me at woodford_4@hotmail.co.uk

Differentiating Trigonometry

Sine and Cos Graphs Differentiating sin and cos


June 23, 2008




This is the basics of the sine cos and tan graphs and how sine and cos relate to give you tan. It also shows how to differentiate sin and cos.


The output or range of both sine and cos is from -1 to 1 when given any angle. They can be shown on a graph where y = sin(x) and y = cos(x). In these graphs all the angles go along the x axis and you can see a wave type shape is formed


Sine Graph

graph of y=sin(x)


Cosine Graph

cosine graph


As you can see both the sin and cos graphs move periodically between -1 and 1 as the angles change, this pattern continues indefinitely because once you pass 360 degrees or 2 pi radians you will return back to the beginning. If you try to perform sin-1 of a value out side the range -1 to 1 you will get an error.


Differentiate Sin and Cos

also notice that the gradient of the sin graph is the value of the cos graph for the same angle and that the gradient of the cos graph is the -value of the sin graph for that angle. This means that we can differentiate the sin and cos graphs:

if f(x) = sin(x) then f ‘ (x)=cos(x)

and

if f(x) = cos(x) then f ‘ (x) = -sin(x)


however if we use ax instead of x we must differentiate it by bringing the a out, when its just x this doesn’t matter as the differential of x is 1.

ie)

let y = sin(f(x))

now let u = f(x)

du/dx = f ‘ (x)

also

y=sin(u) as u = f(x)

dy/du = cos(u)


from the chain rule


dy/dx = du/dx * dy/du

therefore

if y = sin(f(x))

dy/dx = f ‘ (x)cos(f(x))


and similarly for cos

if y = cos(f(x))

dy/dx = -f ‘ (x)sin(f(x))

Complex and Imaginary Numbers

Most of the time in maths you are working with “real” numbers ie) all the rational numbers so we have 1,3,3.5567,4/7,root 2 etc, however sometimes we will need to extend our field of numbers to imaginary numbers. This is when we want to find the root of a negative number eg root -9, as (-3)2 and 32 both equal 9 we are unable to find the square root of -9. In order to solve this number we can use the “imaginary” number i such that

i = √-1


We then say that √-9 = 3i since √ab = √a √b and therefore √-9=√9 √-1 = 3i . This allows us to solve all equations with negative roots. It is also useful to know what in gives as shown below


i2 = -1

i3=-i

i4=1

i5=i


Complex numbers are made up of both real and imaginary parts,

eg z =a+ib

is a complex number. When comparing complex numbers we need only compare the real and imaginary parts, by equation them to each other,


ie) if the complex number z=a+ib

and 2z = 6+10i


a=3 and b=5


To solve complex equations with fractions we often have to rationalise the fractions, like we would with surd’s, so that there are no imaginary parts on the bottom and we can compare the coefficient’s, this is done by multiplying by the conjugate.


note// the conjugate of z=a+ib is z’ = a-ib


eg) (2+3i)/(4+5i) = (2+3i)(4-5i)/(4+5i)(4-5i) = (23+2i)/41


Complex numbers can be represented on an argand diagram when the y axis is the imaginary part and the x axis is the real part, so that the number a+ib is plotted at (a,b), and a line is draw between this and the origin to represent the number. The length of the line is called the moduls and the angle between the real axis and the line is the argument.

Proof of Pythagoras Theorem

Pythagoras theorem, that the square of the longest side of a right angled triangle is equal to the sum of the squares of the other 2 sides.


Square used to prove Pythagoras theorem

This can be proved quite easily by drawing a square into which fit 4 of the same right angled triangle as shown below


As you can see the area of the whole square is equal to the the sum of the 2 shorter sides squared or (a+b)2. The area of the green square left is the square of the longest side c2. We also know that the area of each of the triangles is 1/2 x base x height = ab/2


From these 3 areas we can prove the theorem. The know that the total area of the square is equal to the area of the green square plus 4 of the triangles ie)


(a+b)2=c2+ 4ab/2

a2 + b2 + 2ab = c2+ 2ab


The 2ab ’s cancel and we are left with Pythagoras theorem

a2 + b2 = c2


View the rest of my posts on this blog or at my website

Tuesday, December 23, 2008

Trigonometry Identities

There a number of “identities” in trigonometry that can be found from the basic ideas of sin, cos and tan as explained in my earlier post. These identities can help in solving equations involving trig functions, especially when there are 2 or more different functions as the often allow you to write the equation in terms of one function, eg sin, that you can then solve.


One of the identities is:

sin2 + cos2 = 1.

To prove this consider a right angled triangle with side a,b and c as shown below



From this we can use Pythagoras theorem to say:

a2+b2=c2

now we know

sin t = b/c so b = csin t

cos t = a/c so a = ccos t


substituting these values in the above equation we get

(csint)2 +(ccost)2 = c2

canceling the c2 we get

sint2 + cost2 = 1




There are trig functions that are equal to 1 over sin, cos and tan called cosec = 1/sin, sec = 1/cos and cot = 1/tan. These can be remembered using the third letter rule as the third letter of each of these corresponds to the the function it is one over.




Using these a cos2 + sin2 = 1 we can calculate other identities

tan2t + 1 = sec2t

We can obtain this by dividing through by cos2 as we know sin/cos = tan, cos/cos = 1 and 1/cos = sec.

Other similar identities can be obtained for cosec and cot.

Wednesday, December 10, 2008

Hyperbolic Functions

Hyperbolic functions are similar to sin,cos tan etc in trigonometry and share many similar rules. Usually hyperbolic functions are written like the trigonometric ones but with a h on the end, eg sinh and cosh.

The hyperbolic functions can be all written in terms of e, sinh and cosh are as follows

sinh(x) = (ex - e-x)/2
cosh(x) = (ex + e-x)/2

And tanh can be defined as sinh/cosh so

tanh = (ex - e-x) / (ex + e-x)

though this is often written as
tanh = (e2x - 1) / (e2x + 1)
by timesing the top and bottom by ex

the other other hyperbolic functions sinh as sech, coth etc can be found in the same way as they would be in trigonometry, by using 1 over the other functions, ie sech = 1/cosh

Most of the identities in trigonometry have a similar identity with hyperbolic functions, however in most of these whenever there is a sin2 it changes to a -sinh2
so
cosh2 - sinh2=1
which you can work out by placing the equations with e’s in the place of sinh and cosh

Friday, December 5, 2008

3D Graphics

This is a brief explanation of how to create basic 3D graphics. There are many different packages that will allow you to program using pre written 3D graphics library's, such as Java 3D but this is aimed at using and understanding the actual formula that can be used to draw the graphics yourself.

This assumes you are looking straight ahead from a single point and will map points in the 3D space in front of you onto a single plane at a fixed distance in front of you, probably 1 unit to keep it simple.

First of all consider the vertical direction, y axis. If we consider the right angled triangle formed by taking the line from you eye to the point, the line from your eye to beneath the point (ie the line where y =0) and the final verical equal to the y cordinate, we can use trigonometry to work out the height that need to be displayed.

From this we can work out the angle at your eye would be tan-1(y/(x2+z2))
This is because the length of the "opposite" is equal to the y co-ordinate and the adjacent can be found using pythagoras from the x and z co-ordinates.

We now can use the angle we have found to work out where the point needs to be displayed in our plane. Again we need to form a triangle similar to the first one but where the top corner is the final position of the point when it is projected. Ie the opposite is the y co-ordinate we need.
therefore,
y = tan(t)((x/z)2+1)
y=y((x/z)2+1)
(x2+z2)