lunes, 23 de abril de 2018

From Real to Imaginary

Complex Numbers

Introduction

Natural numbers are appropriate to express how many elements are in a given collection of objects. The set of natural numbers is N ={0, 1, 2, ...}
An equation like x + a = b can be solved in N, if a ≤ b.
Example: From x + 7 = 12 it is obtained x = 12 - 7 = 5.

An equation of the form x + a = b can be solved without restrictions in the set of integers  which contains zero, positive and negative numbers: Z = {..., -3, -2, -1, 0, +1, +2, +3, ...}.
Example: From x + +9 = -14 it is obtained x = -14 + -9 = -23.

Usually, positive integers +1, +2, +3, ... are identified with the natural numbers 1, 2, 3, ... due to an isomorphism between them. They behave the same way in several instances. The former equation can be written as x + 9 = -14.

In the set Z, an equation of the form x * c = d can be solved  if c is a factor of d.
Example: From  x * 8 = -40  it is obtained x = -40 ÷ 8 = -5.

Rational numbers can be represented in the form a/b, with a, b integers and b ≠ 0. Also they can be represented by means of decimals terminating or periodic.
Examples:  3/8= 0.375. -8/3 = -2.666...

In the set Q of rational numbers, an equation of the form x * c = d  can be solved with the only restriction of c ≠ 0.
Example: From x * (3/4) = -8/7 it is obtained x = (-8/7)*(4/3) = -32/21.

An equation like x2 = 2 has not solution in Q , since √2 is not a rational number. It belongs to I, the set of irrational numbers. An irational number can be represented by means of an infinity not periodic decimal.
Example: √2 = 1.41421356...

The set Q ∪ I constitutes R, the set of real numbers.

An equation like x2 + 1 = 0 has not solution in R, since for every x in R,  x * x cannot be negative.

If the history continues in the same way as before, it will be necessary to have a numeric set in which an equation like the former has a solution. It has to include a number whose square is -1.

Such a number cannot be real. So, in analogous way with the rational-irrational opposition, that number has been called the imaginary unit and it has been symbolized with i.

In analogous way with the ordinary opposite meaning for the words positive-negative, rational-irrational, the situation  with real-imaginary has a historical background of initial reject from the mathematical community.

The set C

As it will be seen,the set of complex numbers, designated by C, has a subset of it which is isomorphic with R, in the same way as Z has a subset of it, which is isomorphic with N, namely the positive integers. Also, Q has a subset isomorphic with Z, namely the rationals that can be represented with 1 as denominator. Examples: 3/1, -7/1.

To get acquainted with the set R, it is very helpful to represent it  geometrically by means of a straight line whose points correspond to real numbers.

In analogous way, to get acquainted with the set C, it will be very helpful to have a geometric representation of it. The complex numbers are nicely represented as points in a plane.

The cartesian plane, in which every point can be identified by an ordered pair of real numbers, will be the adopted representation for C.

The x-axis of the cartesian representation contains the real component of a complex number. The y-axis contains the imaginary part of a complex number.

A complex number z will be represented as z = a + bi.
The corresponding  point z is determined by the  cartesian coordinates (a, b).
Examples: w = 3 + 4i , s = -2 + 3i.

Vectors and complex numbers

Cartesian representation of complex numbers  is connected with representing them by means of vectors in the cartesian plane, since each point (a, b) can be associated with an oriented segment with origin in the point (0, 0) and end-point in (a, b).

Examples: w = 3 + 4i , s = -2 + 3i.


Each oriented segment in the cartesian plane is a representative of a vector in the plane. This means that, for instance, the oriented segment O→W above,  represents a vector in the plane which consists in all of the segments in the plane with same lenght, same direction (parallel) and same orientation as O→W.

In this way, the oriented segment F→G represents the same vector as O→W.

The oriented segments with origin O will be called principal representatives of vectors in the cartesian plane.

In this way, every principal representative of a vector in the cartesian plane can be identified with a complex number.

Addition and subtraction in C

If (a, b) and (c,d) are two points in the cartesian plane then, by definition, 

(a, b) + (c, d) = (a + c, b + d)

Example: (2, 3) + (-3, 1) = (-1, 4)

This can be seen also as addition between the corresponding vectors.

To obtain the result of this addition it can be used the above parallelogram construction, in which the diagonal gives the answer.
Using complex numbers for the above example, (2 + 3i ) + (-3 + 1i) = -1 + 4i.

Subtraction is defined in terms of addition:

                                          (a, b) - (c, d) = (a, b) + (-c, -d) 


Example: (2 + 3i) - (-3 + 1i)  =  (2 + 3i) + (3 - 1i) = (5 + 2i)

To find a representative for the difference between two vectors, it can be used a graphic rule: "complete the triangle" as it can be seen in above example.

Modulus of a complex number

By definition, for the complex number  z = a + bi the modulus of  z is the real number 

Example: if  z = (3,4) then |z| = 5

It follows that for a given z, all the points in the circle centered in (0, 0) have the same modulus as z.

In other words, the set of  complex numbers z such that |z| = r, for a given positive real number r is a circle centered in (0, 0) and radius r in the cartesian plane.

Multiplication in C

The product between two complex numbers can be performed in the same way as it is done in R, between two algebraic expressions, taking in consideration that i *i = -1. 

If z = a + bi and w = c + di, then z * w = a.c - b.d + (a.d + bc)i. 

Or, by definition, (a, b) * (c, d) = (a.c - b.d, a.d + b.c)

Example: (2, 3) * (-3, 1) = (-9, -7)

The imaginary unit i can be identified with the complex number 0 + 1i. So, the correspondent point in the cartesian plane is (0, 1).

Using above definition, (0, 1) * (a, b) = (-b, a). This can be written as i * (a + bi)  = -b + ai.


Example: (0, 1) * (2, -3) = (3, 2)

An important relation between z and i * z can be seen graphically as follows:


By geometric considerations it can be seen that multiplying (a, b) by i determines  a counter-clockwise rotation of 90°, around the point (0, 0), of the vector corresponding to (a, b).

Neutral and inverses in C

If (x, y) is  neutral element for addition in C, then (a, b) + (x, y) = (a, b). 
That is, a + x = a and b + y = b. Conclusion, x = 0 and y = 0. The complex number (0, 0) is neutral for addition.

If z = (a, b)  then its inverse with respect to addition has to be z' = (x, y) such that z + z' = (0, 0). That is, a + x = 0 and b + y = 0. 
Conclusion, x = -a and y = -b.

Example: if z = (-12, 5) then z' = (12, -5), since z + z'= (0, 0).

In this case, z' is ordinary designated by -z.

If (x, y) is  neutral element for multiplication in C, then (a, b) * (x, y ) = (a, b). Using above definition, (a, b) * (x, y ) = (ax - by, ay + bx). This means,

ax - by = a
bx + ay = b

The solution for above system is, x = 1, y = 0.

Example: (-8, 9) * (1, 0) = (-8, 9)

If z = (a, b)  then its inverse with respect to multiplication has to be z' = (x, y) such that z * z' = (1, 0). Using definition for multiplication, again, the system to be solved is

ax - by = 1
bx + ay = 0
The solution is

x = a/(a2 +b2 )

y = -b/(a2 +b2 )

Where a2 +b2 has to be different from zero. This means that (0, 0) is the only complex number that has not inverse with respect to multiplication.

Example: if z = (2, 3), then z' = (2/13, -3/13).

In this case, z' is ordinary designated by 1/z.

An equation like Az + B = D, has solution in C, for any complex numbers A, B, D, and A ≠ (0, 0).

Example: (2, -3)z + (-4, 5) = (2/3, -8)
Solution: z = [(2/3, -8) - (-4, 5)] ÷ (2, -3) = (14/3, -13) * (2/13, 3/13) = (145/39, -12/13)

Trigonometric representation


For a complex number z =  (a, b)  for which |z| = r and


the point corresponding to z = (a, b) can be determined by

a = r.cos θ
b = r.sin θ

where θ is the oriented angle with origin in the positive x-axis and end in the line between (0,0) and the point (a, b).

The representation a + bi takes the form r.(cos θ + i.sin θ) which can be simplified as r.cis θ.

Example: 


z = -3 + 4i

tan θ = 4/-3

arctan (4/-3) = 126° 52' 11.63'' = θ

r = 5 

z = 5.cis θ


Multiplication and trigonometric representation

If z = r.cis θ and w = s.cis β then the product z *w can be obtained as follows:

z *w = [r(cos θ + i.sin θ)] * [s(cos β + i.sin β] = 

(r s)[(cos θ * cos β - sin θ * sin β) + i(cos θ * sin β  + sin θ * cos β)] =

(rs)[cos (θ + β) + i sin (θ + β)] = (rs)cis (θ + β)

Example: z = 3.cis 30°. w = 2 cis 45°. z * w = 6 cis 75°


De Moivre's Formula

Multiplication of a complex number by itself  can be extended (by induction) more than twice to obtain the so called De Moivre's Formula.

If z = r cis θ then zn = rn cis nθ

Example: z = 2 cis 30°;  z3 = 8 cis 90°


Roots for the equation zn = w

If the De Moivre's formula were extended for rational exponents then it would be possible to solve an equation like z4 = (0, -1), that is, z4 = 1 cis π.
In this case, w = 1. cis π and z = 11/4 cis (π/4) or simply, cis π/4. 

An equation witth grade 4 has 4 solutions, according with the fundamental theorem of algebra.

To obtain all such solutions is necessary to consider not only the value π/4 but (π/4 + 2n π)/4, for n = 0, 1, 2, 3.

For n = 0, the corresponding solution is z(0) =  cis π/4
For n = 1, the corresponding solution is z(1) =  cis 3π/4
For n = 2, the corresponding solution is z(2) =  cis 5π/4
For n = 3, the corresponding solution is z(3) =  cis 7π/4

These solutions can be represented graphically as follows:






lunes, 26 de marzo de 2018

Approach to Irrational Numbers

Irrational numbers

Introduction

As in the case of rational numbers, this article begins with a visit to a dictionary. The word irrational in The American Heritage Dictionary gives (as adjective): 1.a. Not endowed with reason. b. Affected by loss of usual or normal mental clarity; incoherent, as from shock. c. Marked by a lack of accord with reason or sound judgement: an irrational dislike. ... 3.Mathematics. Of or relating to an irrational number.

There is also a definition for irrational number: Any real number that cannot be expressed as an integer or as a ratio between two integers.

Historically, the adjective irrational corresponds to the pythagorean reject to numbers different from integers or quotients (ratios) between them.

Geometric theorems  like the following could lead to think that relations between two lengths can always be expressed by means of a quotient between integers, This was a belief  for pythagoreans.


If D, E are mid points of sides of triangle ABC, then DE = (1/2)AB, or DE/AB = 1/2

If lines FL and HJ are medians for the triangle FGH, then HK = (2/3)HJ, or HK/HJ = 2/3.

However, a situation like the following contradicts such assumption: If polygon ABCD is a square, and BD is a diagonal then...


 
BD/AB = ?

The so called Pythagorean Theorem establish that  


Now, the question is if the square root of 2 is a rational number or not.

It will be proved, by contradiction, that the square root of 2 is not a rational number. 

Suppose that square root of 2 is rational. Then it can be expressed as the quotient of two integers , a, b. The fundamental theorem of arithmetic states that an integer can be expressed in terms of their prime factors, in a unique way. If the considered integer is prime, say p, it can be expressed as 1 * p.


In above equation the left side and the right side are expressions of the same number. In the left side there are a total of 2s +1 prime factors (since the prime factor 2 is included). In the right side there are a total of 2t prime factors. In this way it has obtained two different expressions for the same integer: one with an odd number of prime factors and the other with an even number of prime factors.

This contradiction with the fundamental theorem of arithmetic comes from the supposing about rationality of √2. The conclusion is that √2 is not a rational number. This result was catastrophic for the pythagorean brotherhood, but it opened a window to a new kind of numbers.

Above kind of proof of irrationality for square root of 2 can be used to demonstrate that if p is a prime number then square root of p is irrational..

Decimal representation of irrational numbers

Using an algorithm to obtain rational approximations to square root of two it can be obtained decimal expressions of this irrational number.

To obtain √2, an archaic method is

A calculator gives directly 1.41421356...

A computer program can do an impressive result like

1.41421356237309504880168872420969807856967187537694807317667973799073 ...

where it cannot ever found a repeating period. If it happened the number could be represented in quotient form a/b.

Some notable irrational numbers

As well as √2, there are other notable irrational numbers.

π = 3.141592653589793238462643383279502884197169399375... is associated with C/D, where C is the length of a circle and D is the length of its diameter.

e = 2.718281828459045235360287471352662497757247093700 ...is associated with the limit when n tends to infinity in
 For n = 1 the value is 2. For n = 2 the value is 9/4 = 2.25. For n = 3 the value is 64/ 27 =2.3703. Former values are rational, but as n ttakes greater values periodicity tends to disappear.

The so called golden ratio is an irrational number too: (1 + √5)/2 = 1.61803398...

Some operations with irrational and rational numbers

It is clear that addition, multiplication, subtraction and division  between two rational numbers give a rational number as a result. But, what happen when rational and irrational numbers are involved?

Let A be a rational number and B an irrational. If A + B = C then C has to be rational or irrational. If C is rational, then C - A = B and B would be rational which gives a contradiction. The conclusion is, C is irrational. Example: 4 + √3 is irrational.

What happen with A + B if both of them are irrationals? The result could be or not a rational. 

Example (1): A = 2/3 + √5, and B = 1/2 - √5. A + B = 7/6. 

Example (2): A = 1 + √3, and B = -1 -2√3, A + B = -√3 

In example (2) above it is accepted that 2√3 is irrational. This will be justified.

If M is rational and J is irrational then M * J  has to be irrational. If M * J = T and T were rational, then T/M = J would be rational, which is contradictory.

The product of two irrationals could be rational.

Example: (3 + √2) * (3 - √2) = 7

Construction of irrational numbers

Construction or design of irrational numbers represented in decimal non periodic form is possible if a rule is given that allows to know the next digit in any given place.

Example: In a decimal representation, after a given place there is: 2 and one 8, 2 and two 8s, 2 and 3 8s, ...:
3.428288288828888...
Clearly there are not period in that development and so, this is an irrational number located between 3.4 and 3.5 on the number line.

In the same way irrationals can be placed in points which does not correspond to any rational number. 

Those numbers are filling the points which are free in the rational number line, despite the fact that the set of rationals is dense everywhere.

Density of irrational numbers

The set of irrational numbers is dense in the same way as rationals. Between any two irrational numbers there is at least one irrational. For instance between two designed irrationals like

3.428288288828888... and 3,537377377737777,,,

1t can be found , for instance , 3.4320200200020000...

Real numbers

The theory on rational and irrational numbers constitutes a challenge for the intuition since the model of points on a line to represent them has advantages at the beginning but becomes far from intuition in grasping the concept of density.

The set of rational numbers together with the set of irrational numbers constitute the set of real numbers which fills completely the number line.







viernes, 23 de marzo de 2018

Notes on Rational Numbers

The Set of Rational Numbers

Introduction

The word "ratio" comes from Latin and it can be found in dictionaries, like American Heritage, with the meanings of: (1) Relation in degree or number between two similar things. (2) The relative value of silver and gold in a currency system that is bimetallic. (3)Mathematics. The relation between two quantities expressed as the quotient of one divided by the other. The ratio of 7 to 4 is written 7:4 or 7/4.

Also the word "rational" can be found in dictionaries with the meanings of: (1) Having or exercising the ability to reason. (2) Of sound mind; sane. (3) Manifesting or based upon reason; logical. (4) Mathematics. Designating an algebraic expresion no variable of which appears in an irreducible radical or with a fractional exponent.

The above (4) meaning does not reflect  the concept to be developed in this article. A rational number  will be understood as a number  which can be expressed as a quotient between two integers a, b,  that is a/b, with b different from zero. Examples: 2/3, 8/5, -3/7.

A quotient between two integers is not the only way to represent a rational number. It can be represented as a decimal. Example: 12/5 can be expressed as 2.4

Fractions and rational numbers

Examples of fractions are

Those symbols have the same meaning as 2/3 and 8/5 and correspond to concrete situations like the following:

A plane rectangular region  has been taken as a unit. There has been shaded two thirds of it. (A proper fraction of a unit)


A plane rectangular region U has been taken as a unit. This unit has been divided in 5 equal parts. It has been constructed a second plane rectangular unit with eight rectangular regions, each one  of 1/5 of the original unit. (An improper fraction).

These examples correspond to an early approach to rational numbers.

Rational numbers and number line

Integers can be represented on a number line, by means of equally spaced points.


It is possible too the representation of rational numbers as points on a line.




In the expression a/b the numerator is a and the denominator is b. The denominator indicates the number of equal parts in the unit segment [0, 1]. The numerator indicates the number of parts taken in consideration.

Quotient representation

The representation 2/3 means the same as 4/6. since in the latter case it means that the unit has been divided in 6 equal parts and it has been taken, or considered 3 of them.

In general, a/b means the same as ka/kb,with k ≠ 0

When numerator and denominator are multiplied by the same number k, different from zero, the fraction is said to have been amplified by k.

When numerator and denominator are divided by the same number k, the fraction is said to have been simplified by k.

A necessary and sufficient condition for a/b an c/d represent the same rational number is:

a ∗ d = b ∗ c

Example: 3/7 = 12/28 (3/7 has been amplified by 4)

If a and b have common factors, different than one. the representation a/b can be expressed as a'/b', where a' = ad and b' = bd and  d is the greatest common factor between a and b

Example: 135/765 = 3/17 . In this case, 45 is the GCF of 135 and 765. The fraction 135/765 has been simplified by 45.  Also, it can be verified that 17 times 135 = 3 times 765.

Introduction to decimal notation

It consists in two sequences of digits separated by a point called decimal point.

The decimal point separates the integer part of the number, at the left of that point, and the decimal part of the number to the right of that point.

The digits to the right of the decimal point are  decimal fractions of a unit. They can be read, from left to right as times 1/10, times 1/100, times 1/1000, ...

Examples:
1.5 means 1 + (5/10)
3.25  means 3 + (2 /10) + (5/100)
0.625 means 0 + (6/10) + (2/100) + (5/1000)

Calculators give directly  decimal notations for  fractions given in quotient notation.

Examples: 
3/2 = 1.5 
1/16 = 0.0625 
25/8 = 3.125
5/3 = 1.6666... (cases like this one will be discussed later)

Terminating decimal notation

If the denominator of a fraction has 2 or 5 as their only  factors (the prime factors of ten) then the fraction can be expressed  directly with a denominator which is is a power of 10.

Examples: 3/2 = 15/10 (amplifying by 5) , 7/4 = 175/100  (amplifying by 25), 8/25 = 32/100 (amplifying by 4), 5/8 = 625/1000 (amplifying by 125).

When the denominator is a multiple of 10 there are rules to represent the fraction in decimal notation.

If the denominator is 10, the decimal point will be placed one step to the left in the numerator. Example: for 15/10 the result is 1.5

If the denominator is 100, the decimal point will be placed two steps to the left in the numerator. Example: for 175/100 the result is 1.75

If the denominator is 1000, the decimal point will be placed three steps to the left in the numerator. Example: for 625/1000 the result is 0.625

If the number of steps to the left is greater than the number of figures of the integer, complete with zeros.
Example: ( Remember that 45 is the same as ...000000045)

For 45/10000, the result is 0.0045

It can be seen that multiplicaion by 10 corresponds to one step displacement to the right of the decimal point. Division by 10 corresponds to  one step displacement to the left of the decimal point.
Examples:
 1.56 ∗ 10 = 15.6
1.56/10 = 0.156

Left zeros before of the first digit different from zero in an integer maybe ignored. For example, 000103 means the same as 103. Right zeros after the lasd digit differente from zero in a decimal representation may be ignored. For instance, 0.05 means the same as 0.050 or 0,0500 or 0.05000, or...

0.05 = 5/100; 0.050 = 50/100

This examle shows that the  addition of a zero after the last digit in a decimal representation means the same as amplifying by 10 the corresponding qoutient representation. It does not change its value.

Non terminating decimal notation

If the denominator of a fraction has at least one factor different from 2 or 5 the corresponding decimal notation does not terminate.To decide cut it at a given point depends of the considered problem or situation.

Example: 5/3 = (3/3) + (2/3) = 1 + (2 /3)

2/3 = (20/3) ∗ (1/10)  
20/3 = (18/3) + (2/3) = 6 + (2 /3). 
Then, 2/3 = [6 + 2/3)]∗(1/10) = 6∗(1/10) + (2/3)∗(1/10) = (6/10) + (2/3)∗(1/10)
That is, 2/3 = (6/10) + (2/3)∗(1/10)
Then, 2/3 = (6/10) + [(6/10) + (2/3)∗(1/10)]∗(1/10) = (6/10) + (6/100) + (2/3)∗(1/100)
Now, 2/3 = (6/10) + (6/100) + [(6/10) + (2/3)∗(1/10)]∗(1/100)
That is, 2/3 = (6/10) + (6/100) + (6/1000) + (2/3)∗(1/1000)
Until now the result is, 2/3 = (666/1000) + (2/3)∗(1/1000) = 0.666 + (2/3)∗(1/1000)

This process can be iterated without end. So,  1.666666... is the decimal notation for 5/3

Alternatively it can be used the division algorithm, taken the dividend as 5.000000... and the divisor as 3.

Periodic decimal notation

In above example one repeated numeric figure apears in the decimal notation of 5/3. The repetition can occur for two or more numeric figures as in the following examples. Every repeated sequence of digits is called a period.

103/33 = 3.12121212... The period is 12 and it begins next to decimal point.

1253/495 = 2.531313131...The period is 31 and it does not begin next to decimal point.

In what follows, the repeating sequence of digits, the period, will be underlined.

Examples:
 1.66666... = 1.6
2.12121212... = 3.12
2.53131313131... = 2.531


Decimal to quotient notation

In the following examples it is described how to express in the form a/b a rational number written in decimal representation.

Example (1) 2.345
This means 2 + 345/1000 , that is (2000 + 345)/1000 = 2345/1000 = 469/200

Example (2) 3.214
To find the fraction F corresponding to this non terminating periodic decimal, a suitable process is the following:
3.214 = F
3214.214 = 1000 ∗ F 
Subtracting in former equations, 3211 = 999 ∗ F
F = 3211/999

Example (3) 12.345
F = 12.345
100 ∗ F = 1234.5
1000 ∗ F = 12345.5
Subtracting in former equations, 900 ∗ F = 11111
F = 11111/900

These processes can be turned systematic by means of a computer program with instructions like the following:

Write the integer part and the decimal part,before the first period, without the decimal point. Call it N1.
Write the same digits, as before, and add the first period. Call it N2.
Numerator = N2 - N1
Write a series of nines a number of times equal to the number of digits of the period and a series of zeros a number of times equal to the number of digits after the decimal point and before the first period. Call it Denominator.
F = Numerator/Denominator.

Example (4): F = 5.3417

N1 = 534
N2 = 53417
Numerator = 52883
Denominator = 9900
F = 52883/9900

Example (5): F = 145.72

N1 =145
N2= 14572
Numerator = 14427
Denominator = 99
F = 14427/99 = 1603/11 


Density of rational numbers

Given an integer number n, it can be determined its next, n + 1. If the number considered is a rational this cannot be possible. Example: If the number is 4.5, somebody could think that 4.6 is its next. However, 4.53, for instance, could be placed between 4.5 and 4.6 on the number line.

In general, given two rational numbers f, g, there is at least a rational number between them. One of those rational numbers is (f + g)/2. Example: 4.55 is in the middle between 4.5 and 4.6. And 4.525 is in the middle between 4.5 and 4.55. This can be done for ever.

This property of rational numbers is called density. The set of rational numbers is dense everywhere. This means that between any two rational numbers there is at least one rational number. Indeed there are an infinity of them.

Above discourse could suggest that every point of a number line corresponds to a rational number. This is not the case. There are points of a number line with no correspondent in the set of rational numbers. This will be discussed in an article about irrational numbers.

Algebraic properties of rational numbers

Addition and multiplication are operations that can be performed in the set of rational numbers. 

The set of integers is a notable subset of rational numbers. In the quotient form, an integer is a fraction which can be represented with 1 as denominator. Examples: 6/1, -13/1.

In decimal form, an integer is represented with one or more zeros after the decimal point. Examples: 6.00, -13.0000

An equation of the form a ∗ x + b = c , with a ≠ 0, has always a unique solution for x. The solution is 


x = (c - b) ∗ a', where a' is the multiplicative inverse of a. It satisfies the equality a´∗ a = 1. Zero is the only number that has not multiplicative inverse.

Example: (2/3) ∗ x + 5/7 = -4/9. Solution: x = (-4/9 - 5/7) ∗ (3/2) = -73/42

Using decimal representation, 0,6 ∗ x + 0.714285 = -0.4
The multiplicative inverse of 0.6 is 1.5
x = (-0.4 - 0.714285) ∗ 1.5 = -1.738095238

Order in rational numbers

Let's consider non negative rationals.

A criterion to know if a/b ≤ c/d  is the following: a/b ≤ c/d iff  a ∗  d ≤ b ∗ c.

Example: To establish an order relation between 13/7 and 12/5, a method could consist in expressing those rationals with the same denominator: 65/35 and 84/35. 
Now it is easy to establish that 65/35 ≤ 84/35, that is, 13/7 ≤ 12/5

Above general criterion can be aplied too: 13 ∗ 5 ≤ 7 ∗ 12.

If the rationals are given in decimal representation, 13/7 = 1.857142  and 12/5= 2.4

For rationals  represented in decimal form, compare the integer parts. If the integer parts are equal, compare the digits after the decimal point from left to right.

Example: f = 2.5689, g = 2.5791. It can be seen that f ≤ g.

If a/b ≤ c/d then d/c ≤ b/a

Example: 5/3 ≤ 7/4; 4/7 ≤ 3/5

1.6 ≤ 1.75; 0.571428 ≤ 0.6

For negative rationals analogous rules can be deduced.















jueves, 8 de marzo de 2018

Integers as Coordinates

A theorem on integers as coordinates

Introduction

The points in a plane with integers as coordinates are called lattice points. In this article is described the origin of a theorem concerning those special points. A program in Python 3.2 gives a fast solution for a particular case. Finally, it is stated the announced theorem.

Origin of the theorem

The following geometric problem gave the central idea for an interesting and curious result.

Given a straight line segment with end potints A and B whose coordinates are known, determine the coordinates of a point C which is the third vertex of an isosceles right triangle


To solve this problem, let's draw the straight line BC perpendicular to the straight line AB and the circle with center in B and radius AB. This circle will cut the straight line BC in two points, one of which will be C.

An alternative way to do this is to consider the orthogonal vectors 
A→B and B→C whose norms are equal and their scalar product is equal to zero. This leads to the following equations:
|(c - a, d - b) . (x – c, y – d)| = 0

|(c – a, d - b)| = |(x – c, y – d)|

Solving for x and y, the following results are obtained:

Solution (1):  x = b + c – d, y = c – a + d

Solution (2): x = c – b + d, y = a – c + d

Surprisingly (?) if the original coordinates are integers, the coordinates of point C are integers too.

Vectors B→A and B→C’ could be considered too, and this would lead to new solutions. C' being symmetrical of C, with respect to B.

A program as the following, in Python 3.2 leads quickly to the solutions we are looking for.

The program will be used for the points
 A = (-1, 2) and B = (2, 3).


print("third vertex of isosceles rectangular triangle") 
print("given vertices:(a,b),(c,d)")
print("write successively the values a,b,c,d")
a=float(input())
b=float(input())
c=float(input())
d=float(input())
print("solution(1)",'(',b+c-d,',',c-a+d,')')
print("solution(2)",'(',c-b+d,',',a-c+d,')')
print("solution(3)",'(',d+a-b,',',a-c+b,')')
print("solution(4)",'(',a-d+b,',',c-a+b,')')

Running the program:
write successively the values a,b,c,d
-1
2
2
3
solution(1) ( 1.0 , 6.0 )
solution(2) ( 3.0 , 0.0 )
solution(3) ( 0.0 , -1.0 )
solution(4) ( -2.0 , 5.0 )

Graphically, the results are:




The points obtained are,
(1, 6), (3, 0), (0, -1), (-2, 5)


From results as the former, it can be derived the following theorem:

If the end points of a segment of a straight line, A, B, have integers as coordinates, then the vertices of the squares having segment AB as one of their sides have also integer coordinates.

This result can be extended to all of the squares in the plane, which are connected with the two squares related with the segment AB.







miércoles, 28 de febrero de 2018

Some measures of areas and lengths

Areas and lengths for special cases

Measure of lengths

To obtain the measure of the length for a line segment, straight or not, it is appropriate to use integration. It can be used a formula for lines represented by continuous functions.

If  y = f(x) is a continuous function in the closed interval [a, b], and there is a continuous derivative in that interval, then the measure of the length for the line segment represented by the above function for x in [a, b] is the real number s given by


This formula is based in calculus themes like the intermediate value theorem and Rolle's theorem. Essentially, this formula comes from inscribing polygonals in the considered curved line. The sum of the measure of lengths of the polygonal sides approximates the  looking for lenght. Such approximation will be better for poligonals better adjusted to the considered curved line. The number of sides for the inscribed polygonal increases as the length of each side decreases.

Measure of the length for a straight line segment

To apply above formula in the case of a straight line segment, let consider the segment with end points P, Q, in the straight line represented by f(x) = mx + h.

Then P = (a, f(a)), Q = (b, f(b)). The distance formula used in coordinate geometry gives,

That is,
in the situation of next illustration where b is greater than a.



To apply the integration formula, if  f(x) = mx + h, then f ‘(x) = m.

Taking the established limits of the integral, PQ is (as before)



If PQ is parallel to x axis, then m = 0 and the result is  PQ =b – a.

Measure of the length for a segment of a parabola


For a parabola whose focus is F = (0, p) the corresponding function is f(x) = (1/4p)x2, for x in [0, 2p], for instance.

Then  f ‘(x) = x/2p and 1 + [f ‘(x)]2 = (4p2 + x2)/4p2

To find the measure of the length of the considered arc, calculate:



Using a table of integrals or a program ( like Mathematica),


Where K is an indeterminate real number which appears with every indefinite integral.
If limits of integration ( 2p, 0) are applied,


For example, if  p = 2, 4.591 is an approximation for the measure of the length of the considered arc, in the used lenght units (inches, centimeters, ...)

For a more general situation, if x varies in the interval [0, c], where c is a positive real number,

 

If the focus of the parabola is  (0, 2) and c = ½ then s ≈ 2.0052 in the used lenght units.

Measure of the length for a circular arc

For a circle represented by  x2 + y2 = r2, it will be considered  the function


 defined for x in [0, r]  that is the arc included in the first quadrant.


then,

It has to be done

If x = r sin t, then dx = r cos t dt, and r2 – x2 = cos2 t.

If x = 0, r sen t = 0 and t = 0.

If x = r,  r = r sin t, that is, 1 = sin t and t = π/2.

The integral to be calculated is:

The result of integration is r.t, with the given limits,  r(π/2 - 0) = (π/2)r.

The measure for the circle is 4 times the former result, that is 2πr.

Measure of the length for a segment of an ellipse

Given the ellipse represented by  (x/a)2 + (y/b)2 = 1, it can be done a process similar to that of  a circle and consider the following function for x in [0, a], corresponding to the part of the curve in the first quadrant.



In this way,

The integral for this function of x is one of the so called elliptic integrals, which are not calculated by conventional means. It has to be used infinite series or a computer program like the above mentioned to obtain for this case,



A similar situation happens for an arc of hyperbola
 A una situación similar se llega si se quiere calcular la medida de la longitud de un arco de hipérbola.

Measure of the area for a plane elliptic region

An ellipse with coordinate axes as symetry axes is represented on the cartesian plane by

 (x/a)2 + (y/b)2 = 1,

from which it is obtained, 
The former equation includes two functions which represent, respectively, the line in the half-plane for which y ≥ 0 and the one for which y ≤  0.

Because of the symetry of the curve, it is necessary to determine the measure of the area for the convex shaded region and take it 4 times.




Using integral calculus,

The result can be obtained by means of an adequate computer program:


In the following schema,


Then it can be written,  x = a sen t,  c = a cos t, dx = a cos t dt.

but cos2 t = (1 + cos 2t)/2.

Then,

 Now, for


2t = u  and  du = 2dt, dt = (1/2)du.

Then,


and

where  K2 = (a2/2)K1; K1 is an arbitrary constant

From above schema,

 t = arcsin (x/a)  and sin 2t = 2( sen t)(cos t) = 2(x/a)(c/a) =  2xc/a2

Now,

K  is an arbitrary constant.

Finally, for the definite integral, x takes the value of a:

(a2/2)arcsin (1) + (1/2)a.0  = (a2/2)(π/2) = πa2/4. If x takes the value of 0, the result is 0.  Then,



 The measure of the total elliptic region is πab expressed in area units.