📜 ⬆️ ⬇️

Some tasks of school mathematics

Based on the article "On one task that is no longer offered at the interview."

To begin, consider the task that still can offer at the interview.

38. Calculate the amount ("Tasks for children from 5 to 15 years")
')

 frac11 cdot2+ frac12 cdot3+ frac13 cdot4+...+ frac199 cdot100


(with an error of not more than 1% of the answer)

The algorithm for calculating the partial sums of this series in the Scheme (Lisp) language in the drRacket environment (drRacket allows you to perform calculations in ordinary fractions):

#lang racket (define series_sum ( lambda (n) (if (= n 0) 0 (+ (/ 1 (* n (+ n 1))) (series_sum(- n 1))) ) ) ) (series_sum 10) (series_sum 100) (series_sum 1000) (series_sum 10000) (series_sum 100000) (series_sum 1000000) (define series_sum_1 ( lambda (n) (if (= n 0) 0 (+ (/ 1.0 (* n (+ n 1.0))) (series_sum_1(- n 1.0))) ) ) ) (series_sum_1 10) (series_sum_1 100) (series_sum_1 1000) (series_sum_1 10000) (series_sum_1 100000) (series_sum_1 1000000) 


The last two examples drRacket calculated with an error



If we consider partial sums in ordinary fractions, we can see that the sum of the series is equal to

 fracnn+1



I recall that  lim fracnn+1= frac11+ frac1n= frac11=1at n to infty

The second volume of the Course of Differential and Integral Calculus 363 (4) deals with the general case

 sum frac1( alpha+n)( alpha+n+1)= frac1 alpha+1



This program can be run at the online ide ide.com and codepad.org .




Let us turn to the main topic of the article.


Consider another example of the problem book.
43. The numbers of rabbits ("Fibonacci"), form a sequence (a1=1),1,3,5,8,13,21,34,...,wherein an+2=an+1+anfor all n=1,2,.... Find the greatest common divisor of numbers a100and a99.

Answer: The two adjacent Fibonacci numbers are mutually simple, i.e.  gcd(un+1,un)=1
(gcd is the greatest common divisor, i.e., gcd).

Proof from the book “Behind the pages of the textbook of mathematics” [10-11]:
Out of equality un+2=un+1+unfollows that  gcd(un+2,un+1)= gcd(un+1,un). Backing away in this way, we come to  gcd(u2,u1)= gcd(1,1)=1, and therefore two adjacent Fibonacci numbers are mutually simple.

Proof that  gcd(un+2,un+1)= gcd(un+1,un)The book is not given, but according to the Euclidean algorithm
 gcd(un+2,un+1)= gcd(un+1,r)
Where r- remainder of the division un+2on un+1

and since for the Fibonacci numbers r=un
that
 gcd(un+2,un+1)= gcd(un+1,un)



Another example from the problem book
53. For a sequence of Fibonacci numbers antask 43 find the relationship limit  fracan+1anaspiring nto infinity:

 fracan+1an=2, frac32, frac53, frac85, frac138, frac2113, frac3421.


The answer is: the "golden section"  frac sqrt5+12 approx$1,61.

Consider the segments representing the difference between two adjacent members of the series  fracan+1an.

Even number members  fracan+1anrepresent growing sequence xn

 frac32, frac85, frac2113,...,



Odd row members  fracan+1anrepresent descending sequence yn

2, frac53, frac138,...,



By the nested intervals lemma (Course of differential and integral calculus, 38)

c= limxn= limyn


For our series at the point cfair equality  fracan+2an+1= fracan+1an

Dividing an+2=an+1+anon an+1get equation  fracan+2an+1=1+ fracanan+1.
Replacing  fracan+2an+1=x, fracanan+1= frac1x, we get a quadratic equation x=1+ frac1x.

If in the program geogebra connect the arcs of a circle point 2 and  frac32,  frac32and  frac53,  frac53and  frac85etc. - we get a self-similar figure





The following example from the problem book
54. Calculate infinite continued fraction.

1 + \ frac {1} {2 + \ frac {1} {1+ \ frac {1} {2+ \ frac {1} {1+ \ frac {1} {2 + ...}}}}



UPD . Consider the equation

 alpha=1+ frac12+ frac1 alpha


According to Theorems 236 and 235 from the book "Theory of Numbers":

 alpha= fracP1 alpha+P0Q1 alpha+Q0


Compiling a table of values Pnand Qnat n=0,1:

one2
Pone3
Qone2


so that  alpha= frac3 alpha+12 alpha+1,2 alpha22 alpha1=0

and since  alpha>0,that

 alpha= frac1+ sqrt32


Consider the problem from the book "Behind the pages of the textbook of mathematics" [10-11]
4. Show the number  sqrt1+ sqrt1+ sqrt1+...equal to the number  varphithat sets the golden ratio.

Consider the option xn= sqrtc+ sqrtc+...+ sqrtc
Course of differential and integral calculus, 35 (2)
In this way xn+1is obtained from xnaccording to the formula

xn+1= sqrtc+xn


... According to the main theorem, option xnhas a finite limit a. To determine it, go to the limit in equality

xn+12=c+xn;


We will get, in such a way that asatisfies the quadratic equation

a2=c+a


This equation has roots of different signs; but the limit of interest acan not be negative, therefore, is exactly the positive root:

a= frac sqrt4c+1+12



From which we can conclude that the "golden section" is a solution to the equation a2=c+a
at c=1.


Next, I would like to consider the algorithm for calculating the inverse of the number given in the textbook

Consider the option xn+1=xn(2xn)


Course in Differential and Integral Calculus, 35 (3)
Let be c- any positive number, and set xn=cyn. The recurrence relation written above will be replaced as follows:

yn+1=yn(2cyn)


Taking the initial value y0under the condition: 0<y0< frac1c, we get that yn, monotonously increasing, will strive for  frac1c. According to this scheme, on the counting machines the number, the inverse, is calculated. c.


Algorithm for calculating the inverse of the number cin Python:
( Ideone.com and codepad.org )
 def reciprocal(c,y0,n): arr=[] for i in range(n): arr.append(y0) y0=y0*(2-c*y0) return arr 

The reciprocal function accepts a number as input. cinitial value y0, number of iterations nand returns an array of "approximations" to the number  frac1c.
y0=0.1at c<10
y0=0.01at 10<c<100
y0=0.001at 100<c<1000
etc.
Examples of the reciprocal function for various c

 >>> reciprocal(3,0.1,10) 

[0.1, 0.17, 0.2533, 0.31411733000000003, 0.3322255689810133, 0.3333296519077525,
0.3333333332926746, 0.33333333333333337, 0.33333333333333337, 0.33333333333333337]

 >>> reciprocal(8,0.1,10) 

[0.1, 0.12, 0.1248, 0.12499968, 0.1249999999991808, 0.125, 0.125, 0.125, 0.125, 0.125]

 >>> reciprocal(5,0.1,10) 

[0.1, 0.150000000000002, 0.18750000000000003, 0.19921875000000003, 0.19999694824218753, 0.19999999995343333, 0.2000000000000000, 0.19999999999999998,
0.19999999999999998, 0.19999999999999998]

Geometric interpretation


Let's try to use the tangent method to approximate the inverse number.
Tangents y=f(x0)(xx0)+f(x0)to the function graph y= frac1xexpressed by the formula y= frac2x0 fracxx02

Substituting numbers 1,2,3,4,...instead x0get the tangent equations

y=2x


y=1 fracx4


y= frac23 fracx9


y= frac12 fracx16


Build these graphics


If you move the hyperbole down on  alphathen it crosses the x-axis at  frac1 alpha.
The tangent equation is converted to y= frac2x0 fracxx02 alpha
Next, equating the tangent equation to zero and expressing xget equation x=x0 fracf(x0)f(x0)

Instead f(x0)substitute  frac1x0 alpha
Instead f(x0)substitute  frac1x02

Get the expression x=x0+( frac1x0 alpha)x02
Opening the brackets, we get x=x0+x0 alphax02

Substitute 0.1into the equation x=x0(2 alphax0)and see what values ​​will "run through" xat  alpha=2get 0.1,0.18,0.29,0.42,0.49,0.5

Substituting these values ​​into the equation y= frac2x0 fracxx022get straight

y=0.111 fracx0.897


y=0.222 fracx0.81


y=0.816 fracx0.504


y=0.857 fracx0.49


y=1.5 fracx0.326


y=2 fracx0.25





Square root extraction


Returning to the irrational expressions, consider the iterative method of extracting the square root.
Write an algorithm using the iterative Heron method

xn+1= frac12(xn+ fracaxn)


 def square_root(a,n): # a -  , n -   x0=1 #    1 arr=[] for i in range(n): arr.append(x0) #      x0=0.5*(x0+a/x0) #      return arr print square_root(2,10) 

codepad.org

Calculating the square root using continued fractions used by Raphael Bombelli

To find the value  sqrtn, first we define its integer approximation:  sqrtn=a pmrwhere 0<r<1. Then n=(a pmr)2=a2 pm2ar+r2. From here it is easy to infer that r= frac|na2|2a pmr. Re-substituting the resulting expression in the formula  sqrtn=a pmr, we get a continued fraction decomposition:

a pm frac|na2|2a pm frac|na2|2a pm frac|na2|2a pm cdots




So we can write the square root algorithm using a continued fraction decomposition
 def square_root(n,a,n_count): # n- , a -    x0=a #    a arr=[] for i in range(n_count): #       a arr.append(x0-a) #  a x0=2*a+(na*a)/x0 return arr print square_root(2.0,1.0,10) 

codepad.org

In general, real numerators and denominators can be real and complex numbers, as well as functions of one or several variables.
The method of extracting the integer part allows us to represent an irrational number in the form of an infinite continued fraction with units in the numerators (with frequent numerators equal to one).
Here is an example of a continued fractional number expansion.  sqrt5from the book "Algebra"

 sqrt52= frac( sqrt52)( sqrt5+2) sqrt5+2= frac1 sqrt5+2



In this way,  sqrt5=2+ frac1 sqrt5+2

Select the integer part of the number  sqrt5+2:E( sqrt5+2)=4. So  sqrt5+2can be represented as 4+ alpha. It's clear that  alpha= sqrt5+24= sqrt52, so  sqrt5+2=4+ sqrt5+2. Again, eliminate the irrationality in the numerator of the second term:

 sqrt52= frac1 sqrt5+2


The result was:

 sqrt5=2+ frac14+ frac1 sqrt5+2


Let's do one more similar step:

 sqrt5=2+ frac14+ frac14+ frac1 sqrt5+2


It is easy to see that the process of isolating the whole part and forming a continued fraction in this example has no end. Each new denominator will appear 4and addend  sqrt52. Therefore, it is clear that  sqrt5is represented as an infinite continued fraction:

 sqrt5=[2,4,4,4,...]




Hypothesis


If a d in mathbbN, sqrtd notin mathbbN, the continued fraction  sqrtd+[ sqrtd]purely periodic.
This hypothesis was proved by Evariste Galois .

Those. if to the non-periodic fraction [1;2,2,2,...]= sqrt2add the whole part [ sqrt2]=1then you get a purely periodic fraction [2,2,2,...].

 sqrt3=[1;1,2,...];
 sqrt3+1=[2,1,...]

 sqrt5=[2;4,4,4,...];
 sqrt5+2=[4,4,4,...]

 sqrt6=[2;2,4,...];
 sqrt6+2=[4,2,...]

 sqrt13=[3;1,1,1,1,6,...];
 sqrt13+3=[6,1,1,1,1,...]

If in the decomposition of the root according to the method of Bombelli

 sqrtn=a pm frac|na2|2a pm frac|na2|2a pm frac|na2|2a pm cdots


add to the first term a, we get a purely periodic fraction

\ sqrt {n} + a = 2a \ pm {\ frac {| na ^ {2} |} {2a \ pm {\ frac {| na ^ {2} |} {2a \ pm {\ frac {| na ^ {2} |} {2a \ pm \ cdots}}}}}



It remains to bring the fraction to a more familiar form (with units in the numerator).
Divide the numerator and denominator of the fraction by |na2|get expression

\ sqrt {n} + a = 2 a \ pm {\ frac {1} {\ frac {2a} {| na ^ {2} |} \ pm {\ frac {1} {2a \ pm {\ frac { 1} {\ frac {2a} {| na ^ {2} |} \ pm \ cdots}}}}}


In this way

 sqrt2+1=2+ frac1 frac21+ frac12+ frac1 frac21+...=[2,2,2,...]


 sqrt3+1=2+ frac1 frac22+ frac12+ frac1 frac22+...=[2,1,...]


 sqrt5+2=4+ frac1 frac41+ frac14+ frac1 frac41+...=[4,4,4,...]


 sqrt6+2=4+ frac1 frac42+ frac14+ frac1 frac42+...=[4,2,...]


 sqrt13+3=6+ frac1 frac64+ frac16+ frac1 frac64+...=[6, frac32,...]


Write a program that calculates the approximation of a continued fraction. [6, frac32,...]
 #lang racket (define continued_fraction ( lambda (n) (if (= n 0) 1 (+ 6 (/ 1 (+ 3/2 (/ 1 (continued_fraction(- n 1)))))) ))) (continued_fraction 4) 

codepad.org
In the fourth step we get 6 frac38186305which is equal to 6.60555114..., while  sqrt13+3 approx6.60555127.




PS Solve the problem ("Tasks for children from 5 to 15 years")
27. Prove that the remainder of dividing the number 2p1on a simple odd number
pequals 1
(examples: 22=3a+1,24=5b+1,26=7c+1,2101=1023=10 cdot93).
This task is discussed in the article The Amazing Adventures of the Kvant Magazine fractions .

Books:
“Tasks for children from 5 to 15 years old”, V.I. Arnold.
"The course of differential and integral calculus", G.M. Fichtengolts.
"Theory of Numbers", A. A. Buchstav.
“Behind the pages of a mathematics textbook”, N. Ya. Vilenkin, L. P. Shibasov, Z. F. Shibasova.
"Digital Arithmetic" Ercegovac Milos D., Lang Tomas.

Source: https://habr.com/ru/post/419237/


All Articles