lemelinm

1505 Reputation

15 Badges

18 years, 254 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

in the geometry package:

>?geometry[line]

>?geometry[intersection]

then ask yourself  "Do I know the algebra that Maple use to find the answer?"

if you can use "convert" like Robert said, then you are in buisness.

 

--------------------------------------
Mario Lemelin
messagerie : mario.lemelin@cgocable.ca
téléphone :  (819) 376-0987

I have create a simple "maple.ini" that I have put in the users directory of Maple and containing this simple line:

>libname:=libname,"D:\\Data\\Data7":

the file "algebre.mla" is in that location.  I quit Maple then restart it.  My package is accessible by doing "with(algebre)".

Everytime I modify my module, I execute all the worksheet including those two lines outside the module( ).... end module:

> savelibname := "D:\\Data\\Data7\\algebre.mla":
>LibraryTools[Save](algebre):

I never had problem this way

I agree with you that saving in the directory "lib" of Maple is quite dangerous.  That's why I do it the way I have just showned you.

It was a good thing to post your input for the precision.
 

--------------------------------------
Mario Lemelin
messagerie : mario.lemelin@cgocable.ca
téléphone :  (819) 376-0987

--------------------------------------
Mario Lemelin
messagerie : mario.lemelin@cgocable.ca
téléphone :  (819) 376-0987

Here is the way I did it usually, keeping in mind that I want to use the command "with".  SUppose I create a module name "algebre".  I save it in this manner.

> savelibname := "C:\\Program Files\\Maple 12\\lib\\algebre.mla";
> LibraryTools[Save](algebre);
> restart;
> with(algebre);
(and I have a list of the proc included in aglebre)

Is there a potentiel pitfall this way?

--------------------------------------
Mario Lemelin
messagerie : mario.lemelin@cgocable.ca
téléphone :  (819) 376-0987

Here a simple module:

>test := module ()description "my firts package"; export fonction, couleur; option package;  fonction := proc () local i; for i to nargs do print(args[i]) end do end proc; couleur := proc () local c1, c2; c1 := rhs(args[4])[1]; c2 := rhs(args[4])[2]; plot(args[1], args[2], args[3], color = [c1, c2]) end proc end module:

then add the path where test will be save

libname := libname, "D:\\Data\\Data7\\Advisor\\test.m"

> savelib(test);
> restart;
> with(test);

                             [couleur, fonction]
 

With this info and thoses from Acer, you should be able to create your own package.

--------------------------------------
Mario Lemelin
messagerie : mario.lemelin@cgocable.ca
téléphone :  (819) 376-0987

..when I see thoses kinds of "traps".   Like Acer said, "the downside is that it gives the surface impression that int() works with operators in general (which it doesn't)".  Piecewise seems to be the more safe way to go.

> p := piecewise(x >= 0, cos(x), -cos(x));

                       p :=  / cos(x)        0 <= x  
                            {                        
                             \ -cos(x)      otherwise
> int(p, x = -(1/2)*Pi .. (1/2)*Pi);

                                      0


--------------------------------------
Mario Lemelin
messagerie : mario.lemelin@cgocable.ca
téléphone :  (819) 376-0987

You will see that Boug Meade give the answer

--------------------------------------


Mario Lemelin
messagerie : mario.lemelin@cgocable.ca
téléphone :  (819) 376-0987

Look at  www.mapleprimes.com/forum/vectorfield0#comment-24682

--------------------------------------
Mario Lemelin
messagerie : mario.lemelin@cgocable.ca
téléphone : +1 (819) 376-0987

> with(Student[VectorCalculus]):
>F := VectorField(<y^2 -2*x*y, 3* x* y  -6*x^2>);

dont forget that when you want to signifie to Maple that two terms are multiply, you need to put a space between them ( x  y) or an asterisk ( x*y)

>VectorField(<y^2 -2*x*y, 3* x* y  -6*x^2>,output=plot,view=[-4..4,-4..4],scaling=constrained);
 

Have fun!

--------------------------------------
Mario Lemelin
messagerie : mario.lemelin@cgocable.ca
téléphone : +1 (819) 376-0987

 Simply use the green up arrow.  Find the file on your computer then upload it.  Then the dialog box will write the code so your file will be in your message.  The code will appear in blue.  Just click on OK and the link will be in your post.  So others will be able to look at you file and help you the best they can.

 

>Student[LinearAlgebra][EigenPlotTutor]();

The graph shows the unit circle with yellow unit vectors u.  The red vectors are A u.  Look for the u's for which the red A u aligns with u.  The eigenvectors are shown in blue, so that should give a hint at which directions are left invariant under the action of A.

 It happen to me a couple of time.  I create a worksheet and when I tried to re-open it, Maple told me that my worsheet may be incomplete.  In fact, it was a blank worksheet.  How do you fix this so you can recuperate your work?

 

 

 

 u := <39, -12>; v :=<-26,8>;

 

 

 

For -12

> v := 80;

                                     80
Maple treat all angle being radians
> theta := convert(40*degrees, radians);

                                    2   
                                    - Pi
                                    9   
> vh := v*cos(theta);

                                      /2   \
                                80 cos|- Pi|
                                      \9   /
> vv := v*sin(theta);

                                      /2   \
                                80 sin|- Pi|
                                      \9   /
For -13
> restart;
> u := `<,>`(39, -12); v := `<,>`(-26, 8);
> with(VectorCalculus);
> u.v;

                                    -1110
so they are not orthogonal since it's not equal to zero

for -14
> restart;
> z1 := 2*sqrt(3)-2*I; z2 := -10*I;

                                  (1/2)      
                               2 3      - 2 I
                                    -10 I
a)
> z1p := convert(z1, polar);

                                   /     1   \
                              polar|4, - - Pi|
                                   \     6   /
wich mean
> z1trig := 4*(cos(-(1/6)*Pi)+I*sin(-(1/6)*Pi));

                                  (1/2)      
                               2 3      - 2 I
b)
> z2p := convert(z2, polar);

                                   /      1   \
                              polar|10, - - Pi|
                                   \      2   /
> simplify(z1p*z2p, symbolic);

                                   /      2   \
                              polar|40, - - Pi|
                                   \      3   /
Look carefully at what happen to the modulus and the argument
> simplify(z1p/z2p, symbolic);

                                    /2  1   \
                               polar|-, - Pi|
                                    \5  3   /
For -15, I guess that you want the 5 roots of (1)^(1/5)

> solve(z^5 = 1, z);

                                                        (1/2)  
                  1   1  (1/2)   1    (1/2) /     (1/2)\       
             1, - - + - 5      + - I 2      \5 + 5     /     , 
                  4   4          4                             

                                                       (1/2)  
                 1   1  (1/2)   1    (1/2) /     (1/2)\       
               - - - - 5      + - I 2      \5 - 5     /     , 
                 4   4          4                             

                                                       (1/2)  
                 1   1  (1/2)   1    (1/2) /     (1/2)\       
               - - - - 5      - - I 2      \5 - 5     /     , 
                 4   4          4                             

                                                       (1/2)
                 1   1  (1/2)   1    (1/2) /     (1/2)\     
               - - + - 5      - - I 2      \5 + 5     /     
                 4   4          4                           

 

4 5 6 7 8 9 10 Last Page 6 of 19