lemelinm

1490 Reputation

15 Badges

17 years, 322 days

 

 

--------------------------------------
Mario Lemelin
Maple 14.00 Win 7 64 bits
Maple 14.00 Ubuntu 10,04 64 bits
messagerie : mario.lemelin@cgocable.ca téléphone :  (819) 376-0987

MaplePrimes Activity


These are answers submitted by lemelinm

mario.lemelin@cgocable.ca

the command

M[1..-1,1]

please.

mario.lemelin@cgocable.ca

... way so you can use the output

 

> primeCol := proc (m::integer, n::integer)
local L, V; 
L := select(isprime, [seq(m .. n)]); 
V := convert(L, Vector); 
RETURN(V)

end proc;

> Vec := primeCol(1, 20);

 

mario.lemelin@cgocable.ca

for #1

The list "L" must be define before running showCol.

> showCol := proc (L::list)
local x;
for x in L do
print(L[x]);
end do;
end proc;

> showCol(L);
 

for #2

> primeCol := proc (m::integer, n::integer)
local L, i;
L := select(isprime, [seq(m .. n)]);
for i to nops(L) do
print(L[i]);
end do;
end proc;

> primeCol(1, 100);
 

Have you find a shorter way to do it?

mario.lemelin@cgocable.ca

Table := proc () local i, x1, T1, y1, h, Tx1;
h := solve(x1*exp(T)-1, T);
Tx1 := unapply(h, x1);
printf(` T1    y1 \n`);
for i to 10 do x1 := i;
y1 := 3*Tx1(x1);
printf(` %+04.10E %+04.10E`, Tx1(x1), y1); printf(`\n`):
end do:
end proc:

Table()

> Table();
             T1                                      y1
+0.0000000000E+00  +0.0000000000E+00
-6.9314718060E-01     -2.0794415420E+00
-1.0986122890E+00    -3.2958368670E+00
-1.3862943610E+00    -4.1588830840E+00
-1.6094379120E+00    -4.8283137360E+00
-1.7917594690E+00    -5.3752784070E+00
-1.9459101490E+00    -5.8377304470E+00
-2.0794415420E+00    -6.2383246250E+00
-2.1972245780E+00    -6.5916737340E+00
-2.3025850930E+00    -6.9077552790E+00
 

 

mario.lemelin@cgocable.ca

> Y := ((1/2)*x)^(2/3);

                                 1  (1/3)  (2/3)
                            Y := - 2      x     
                                 2              
> eq1 := sqrt(1+(diff(Y, x))^2);

                                              (1/2)
                                  /     (2/3)\     
                                1 |    2     |     
                         eq1 := - |9 + ------|     
                                3 |     (2/3)|     
                                  \    x     /     
>A:= int(eq1, x);

                                 (1/2)                           
              /   (2/3)    (2/3)\                                
           1  |9 x      + 2     |       (1/3) /   (2/3)    (2/3)\
       A:=    -- |-----------------|      x      \9 x      + 2     /
           27 |      (2/3)      |                                
              \     x           /                                

Now you can see a problem at x = 0.  But if you rewrite this way

 

> B := (1/27)*(9*x^(2/3)+2^(2/3))^(3/2);

                                                 (3/2)
                           1  /   (2/3)    (2/3)\     
                      B := -- \9 x      + 2     /     
                           27                         

and you do

 

> subs(x = 2, B)-subs(x = 0, B);

                               20   (1/2)   2 
                               -- 10      - --
                               27           27

You have the anwser.  It seem to me (and that my modest opinion) that Maple is giving hypergeom because it cannot simplify to B.  Since I more interested in the pedagogical use of Maple, I was not able to pass from A to B with Maple but  had to do it by hand, which sometime is OK cause student has to do some work  too  :-)

 

mario.lemelin@cgocable.ca

> eq1 := sqrt(1+(diff(Y, x))^2);

                                 1            (1/2)
                          eq1 := - (64 + 18 x)     
                                 8                 
> int(eq1, x = 0 .. 2);

                                     61
                                     --
                                     27
> evalf(%);

                                 2.259259259

So for the student, this would be the right answer?????

mario.lemelin@cgocable.ca

Form Jakubi,

> eval(%, u = 2);

                                2    20   (1/2)
                              - -- + -- 10     
                                27   27        

evalf(%,5)
                                   2.2683

From Joe,

> subs({A = 0, B = 2}, len);

                           8    (1/2)   25    (1/2)
                         - -- 64      + -- 100     
                           27           54         
evalf(%,5)
                                   2.2592

 

too close for confort.  I, for my part, need a little more explanation since the plot show a very simple curve.

mario.lemelin@cgocable.ca

This modest worksheet should help you to start:

  a start.mw

mario.lemelin@cgocable.ca

but I think the problem is more interesting if we stay with exact solution.  So if you have the following:

> eq := a*x^3+x^2-a*x+1;

                                   3    2          
                          eq := a x  + x  - a x + 1

solve(eq=0,x)

you will have the first solution that is interesting in the fact that if you look under the square root, you need to satisfy (for a real solution)

> eq1 := -3*a^4+33*a^2+3 > 0;

                                       4       2   
                        eq1 := 0 < -3 a  + 33 a  + 3

> solve(%, a);

           /    /                    (1/2)\      /                  (1/2)\\
           |    |  1 /         (1/2)\     |      |1 /         (1/2)\     ||
  RealRange|Open|- - \22 + 10 5     /     |, Open|- \22 + 10 5     /     ||
           \    \  2                      /      \2                      //

you need to stay in the range -3.3302..< x < 3.3302.... If you look with the plot builder with "a" ranging between -5 to 5  you see that in the fonction has one real root an two complex one inside this range.  Outside that range, the  function has 3 real roots.

 

If I had to ask that problem to my students, that's the point I would want to see them talked about.  That is my modest opinion.

mario.lemelin@cgocable.ca

Thanks.

mario.lemelin@cgocable.ca

My problem is that the Excel separate the decimal with a comma instead of a point.  Now I have been able to import with ImportData or readdata.  Sorry for the trouble.....

mario.lemelin@cgocable.ca

Here is my *.txt file created in Excel

1    10,9    118,81
2    12    144
3    15    225
4    17,8    316,84
5    21,2    449,44
6    35,4    1253,16
 

The separator is the Tabulation.  When I want to import it in Maple, here is what I get:

> readdata("D://Data//Data6//Data_plot1.txt", float, 3);

[[1., 10.], [2., 12., 144.], [3., 15., 225.], [4., 17.], [5., 21.], [6., 35.]]

As you can see, even if I tell Maple that they are floating numbers and that there is 3 columns, I get that strange result.

Any ideas?

mario.lemelin@cgocable.ca

> z := 9-5*I;

                                z := 9 - 5 I
> abs(z);

                                     (1/2)
                                  106     
> Im(z);

                                     -5
> argument(z);

                                        /5\
                                 -arctan|-|
                                        \9/
> evalf(%);

                                -0.5070985044
> convert(%, degrees);

                              91.27773079 degrees
                            - -------------------
                                      Pi         
> evalf(%);

                            -29.05460409 degrees

where evalf mean to have the answer in decimal.  % tell Maple to use the last output and the := is to make an assignment to z so each time you une as argument the letter z, it mean for Maple 9-5*I (capital I is for the imaginary part).  Remember that Maple works in radian, not in degree so that's the reason I had to convert to have an idea of the angle.

 

Hope it help?

mario.lemelin@cgocable.ca

According to the text I am reading, the tension in the rope is still wrong.  Look at my new file:

 poulie3a.mw

mario.lemelin@cgocable.ca

First 13 14 15 16 17 18 19 Page 15 of 19