Mathematics with Maple
S.Duzhin
Solutions to problems of Lesson 2.
PROBLEM 1
First let us program this sequence:
> x:=proc(n,a) if n=1 then 1 else (x(n-1,a)+a/x(n-1,a))/2 fi end;
After only 5 iterations for a=2 we get
> evalf(x(5,2));
It looks like the square root of 2. In fact,
> evalf (x(5,2)^2);
Try other numbers: 2,3,4,...,10 (using seq for "sequence"):
> seq(evalf(x(5,n)^2), n=2..10);
After 6 iterations for a=2 we obtain
> seq(evalf(x(6,n)^2), n=2..10);
Now we can formulate the
Conjecture: our sequence converges to the square root of a.
Let us prove this.
Note that a(n) > a^(1/2) by the well known inequality
(A+B)/2 > (A*B)^(1/2).
Then, a(n+1)-a(n)=a/a(n)-a(n+1) < 0 for a > 1 and our sequence decrease monotonically. Hence, there exists a limit of the sequence L. Let us find this limit from the equation L=(L+a/L)/2. This equation has two roots +(a)^(1/2) and -(a)^(1/2) . Therefore a(n) --> (a)^(1/2) as n --> infinity.
PROBLEM 2
We must not forget to renew the variable 'n':
> n:='n';
The following is the procedure to compute the sequence in question:
> a:=proc(n) if n=0 then 3/2 else a(n-1)*(1+1/2^(2^(n))) fi end;
Let us calculate it, for example, for n=7
> evalf (a(7));
It looks like 2. Let us continue
> seq(a(n), n=0..5);
> seq(evalf(a(n)), n=2..7);
Now we can formulate the conjecture: our sequence converges to 2.
Let us prove this fact mathematically, multiplying the given expression by (1-1/2) and applying the rule:
(1-x)*(1+x) = 1-x^2
many times. For example:
(1-1/2)*(1+1/2)*(1+1/4)
= (1-1/4)*(1+1/4)
=1-1/16.
In general, (1-1/2)*a(n)=1-1/2^(2^(n+1)) --> 1 as n --> infinity.
Hence, a(n)=2*(1-1/2^(2^(n+1))) --> 2 as n --> infinity.
PROBLEM 3
Again we start with a little programming:
> a:=proc(n) if n=1 then 0 else (a(n-1)+6)^(1/2) fi end;
and with some computations:
> evalf(a(5));
> seq(evalf(a(n)), n=5..10);
And again we can guess the behaviour of the sequence: it increases monotonically and converges to 3. Since a(1) < 3, then using the induction on n we come to a(n) < 3. Then, we rewrite the relation a(n+1)=(a(n-1)+6)^(1/2) in the form a(n)/a(n+1)=a(n+1)-6/a(n+1) ==> a(n)/a(n+1) < 1, since a(n+1) < 3. In what follows that our sequence is uniformly bounded, it increases monotonically and, hence, has a limit. Now to find this limit we should solve the equation
L=(L+6)^(1/2). The root L=3 is the limit.
PROBLEM 4
Let us program the given sequence:
> n:='n';
> S:=proc(n,x) if n=1 then sin(x) else sin(S(n-1,x)) fi end;
> S(5,1);
> evalf(S(5,1));
> evalf(S(500,1));
> evalf(S(5000,1));
Error, (in S) too many levels of recursion
At this point, I obtained a "too many levels of resursion" message on my computer. This shows that the previous, recursive, definition of S is not quite good. Let us try a different, iterative, approach:
> S:=proc(n,x)
> local s,k;
> s:=x;
> for k from 1 to n do s:= sin(s) od;
> end;
Now we can try to check the conjecture about the rate of growth of the sequence S(n,1) by watching the values of S(n,1)^2*n:
> seq(evalf(S(n,1.0)^2*n), n=1..50);
> seq(evalf(S(n,1.0)^2*n),n=10000);
It looks plausible that S(n,1)^2*n tends to the constant 3 as n goes to infinity. It is very interesting that for any other initial value of x the rate of growth of S(n,x) is the same, only it might take more time until this fact becomes clear:
> seq(evalf(S(n,0.1)^2*n), n=500);
> seq(evalf(S(n,0.1)^2*n), n=5000);
> seq(evalf(S(n,0.1)^2*n), n=50000);
It is not easy to prove rigourously that the limit of S(n,x)^2*n is always equal to 3. Below is an idea of a possible proof.
Let us fix x and consider the sequence q(n)=S(n,x)^2. We will try to find lim n/(1/q(n)). We know that q(n) --> 0.
Applying the L'Hopital's rule to this sequence we obtain
lim n/(1/q(n))
= lim {(n+1)-n}/{1/q(n+1)-1/q(n)}
= lim 1/{1/q(n+1)-1/q(n)}.
Using the fact S(n+1)=sin(S(n))=S(n)-S(n)^3/6+..., we obtain the result: limit equals 3.
Answer: S(n,x) ~= sqrt(3)*n^(-1/2)