Alejandro Jakubi

MaplePrimes Activity


These are replies submitted by Alejandro Jakubi

factor does it (except for pulling the common factor out):

factor(1/6^(1/2)*(3-sqrt(5))^(1/2));
                             1/2    1/2  1/2
                            3      5    3
                          - ---- + ---------
                             6         6

factor(1/6^(1/2)*(3+sqrt(5))^(1/2));

                            1/2    1/2  1/2
                           3      5    3
                           ---- + ---------
                            6         6

Tracing shows that it does it by writing (3-5^(1/2))^(1/2)=-a/2+a*b/2, where a^2=2 and b^2=5, i.e. basically the same idea:

infolevel[all]:=5:
trace(factor):
factor(1/6^(1/2)*(3-sqrt(5))^(1/2));
[...]
radnormal/rational/basis:   basis is   [5, 3, 2]
[...]
          1/2 1/2
    (3 - 5   )    = -1/2 %1 + 1/2 %2 %1],
[...]
               2
%1 := RootOf(_Z  - 2, index = 1)

               2
%2 := RootOf(_Z  - 5, index = 1)
[...]

Then, using factor and applyrule, similarly to the calculation by hand, a simple and uniform approach to all these nine cases is possible, with quite compact results in most of them:

r1:=sin(y::algebraic/2)=sqrt((1-cos(y))/2):
r2:=cos(y::algebraic/2)=sqrt((1+cos(y))/2):
r3:=tan(y::algebraic/2)=csc(y)-cot(y):

(factor@applyrule)([r1,r2,r3],sin(arcsin(2/3)/2)); 1/2 1/2 3 5 - ---- + ---- 6 2 (factor@applyrule)([r1,r2,r3],cos(arcsin(2/3)/2)); 1/2 1/2 3 5 ---- + ---- 6 2 (factor@applyrule)([r1,r2,r3],tan(arcsin(2/3)/2)); 1/2 5 3/2 - ---- 2 (factor@applyrule)([r1,r2,r3],sin(arccos(2/3)/2)); 1/2 1/2 2 3 --------- 6 (factor@applyrule)([r1,r2,r3],cos(arccos(2/3)/2)); 1/2 1/2 10 3 ---------- 6 (factor@applyrule)([r1,r2,r3],tan(arccos(2/3)/2)); 1/2 5 ---- 5 (factor@applyrule)([r1,r2,r3],sin(arctan(2/3)/2)); / 1/2\1/2 | 6 13 | |2 - -------| \ 13 / ---------------- 2 (factor@applyrule)([r1,r2,r3],cos(arctan(2/3)/2)); / 1/2\1/2 | 6 13 | |2 + -------| \ 13 / ---------------- 2 (factor@applyrule)([r1,r2,r3],tan(arctan(2/3)/2)); 1/2 13 ----- - 3/2 2

I think that it is relevant to compare Maple with other CAS in regards to their methods of input for programatic plot labels with typesetted math content.

This is the plot of "Gem 1" in an online Sage worksheet (currently Sage 4.6). The label can be typed in TeX:

plot(x, (x,0,1),color='black',legend_label='$f^{-1}(x)$')

@Axel Vogt In Classic GUI, or the CLI, some typesetting tricks work in the maplet plotter, by using

plotsetup(maplet):

@pagan I do not see any typesetting difference between using uminus0 and minus in the plot legend, do you? So, I have changed the former for the latter. On the other hand, I agree about the first typesetting nicer than the second in the worksheet output. But this is a usage different to Robert Lopez's one (this issue might be discussed elsewhere).

About providing constructors, I see them more likely comming from users than officially from Maplesoft, if "magic" is still needed after so many years (in particular, if TeX-like constructors were wanted). Joe Riel has shown some examples time ago, I have made some more and most likely other people here did similarly.

May be interesting to somebody, this report by Paulina about the "2-D Math interface", including TypeMK.

@pagan I have not interpreted as the brackets being the issue, but if so, in typeMK I would use msup:

plot(x, x=0..1, legend = typeset(`#msup(mi("f"),mn("−1")`(x)), color=black);

For the inverse function, the standard way of representing it, using the repeated composition operator @@ works fine in the Standard GUI:

plot(x, x=0..1, legend = typeset((f@@(-1))(x)), color=black);

I find remarkable the usage of the pen and paper technology for recording these "magic" tricks.

About x+/-1/2, the trick should read caption=typeset(`#mrow(mi("x"),mo("±"),mfrac(mn("1"),mn("2")))`)

@acer It would be arbitrary if it were pure algebra, without additional context information. But the geometrical content of these equations is obvious, and the OP has stated it clearly:

I am trying to go from body-referenced aircraft velocities u, v, w, to angle of attack a, sideslip b, and total speed V

So, an important reason to express e.g. sin(b) as v/V is its geometric interpretation. In short, the geometrical context is the reason not to solve for V.

@acer It would be arbitrary if it were pure algebra, without additional context information. But the geometrical content of these equations is obvious, and the OP has stated it clearly:

I am trying to go from body-referenced aircraft velocities u, v, w, to angle of attack a, sideslip b, and total speed V

So, an important reason to express e.g. sin(b) as v/V is its geometric interpretation. In short, the geometrical context is the reason not to solve for V.

solve can be used directly, just do not solve for V:

solve({eqn1, eqn2, eqn3}, {sin(a),cos(b),sin(b)});
                      u               w cos(a)
         {cos(b) = --------, sin(a) = --------, sin(b) = v/V}
                   V cos(a)              u

solve can be used directly, just do not solve for V:

solve({eqn1, eqn2, eqn3}, {sin(a),cos(b),sin(b)});
                      u               w cos(a)
         {cos(b) = --------, sin(a) = --------, sin(b) = v/V}
                   V cos(a)              u

@Christopher2222 

It was also realized in Mapleprimes 1.

@hirnyk 

It produces a color picture with driver cps.

@hirnyk 

It produces a color picture with driver cps.

@bthur 

There is a Spanish saying fit for this situation: "el que mucho abarca, poco aprieta"

I am not sure about its translation to English, but here you may find some posibilities.

@Ninetrees 

Mapleprimes v2 started at the begining of June, after a beta period and a failed start at May 27. During the beta period and the first two months or so, after its public launch, I have expressed a lot of criticisms, some quite similar to yours. A significant number of regular posters expressed also their share of complaints. Very few of them were addressed since then. So, my posture has been wait and see, reducing my participation sharply. 

First 94 95 96 97 98 99 100 Last Page 96 of 109