acer

32333 Reputation

29 Badges

19 years, 325 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

pairs := convert(M,listlist);

acer

Two instances of an adjacent pair of bracketed terms are being interpreted as function application, so if you intended them as products then you left out two instances of multiplcation syntax.

The simplest thing, in that case, would be to insert a pair of multiplication symbols.

solve({(1-x)/(1+b) = b*y, (1-y)*(1-a)/(-a*b+1) = b*z, (1-z)*(1-b)/(-a*b+1) = a*x}, {x, y, z});

acer

If the problem is that the grid shown on the rendered surface is too dark in your Maple 13 then how about using one of these option choices for your call to plots:-display?

style = patchnogrid

or

style = wireframeopaque

acer

There are three kinds of problems that I see here.

The first problem is that you have a typo. It is Explore, not EXplore.

The second problem is that your document appears to be using the indexed names I[b] and I[c] to get the subscripted 2D Math.

Both the Explore and the plot commands may have a problem with that. You'd be better off using so-called atomic identifiers (unique names) for those, instead of the indexed names.

In the attached worksheet I've made a replacement right at the end. I used Maple 18, in which in 2D Input I typed the input for the atomic identifiers as I__b (which is I underscore underscore b as the keystrokes). Alternatively you could use atomic identifiers instead of indexed names throughout your whole document (I didn't change the whole thing). If you have an older version than Maple 18 you can still use atomic identifiers but the mechanism for entering them is different. Of course you could also use simple names like Ib and Ic but I'm guessing that the subscripting is important to you. Note that the slider in the exploration might not get its label typeset as 2D Math.

The third problem is that Explore doesn't figure out the underlying names in M[ba] , which has been assigned the expression to be plotted. That's because of special evaluation rules that Explore has on its first argument. One way around this, which I did in the sheet I attach below and which is similar to cases in ?examples,Explore , is to use a simple procedure.

shiboft2_edited.mw

 acer

At Digits<=15 Maple can use double precision (64bit) hardware floats and store Matrices of real or complex floating-point values in contiguous blocks of memory. That's what is called a datatype=float[8] rtable in Maple. And linear algebra computations such as eigenvectors, matrix-matrix products, etc, are then done in specialized compiled libraries such as the Intel Math Kernel Library (MKL). Such optimized versions of standard libraries of functions such as LAPACK and the BLAS are cache-tuned and often make use of chipset extensions such as SIMD and AVX or are otherwise parallelized.

At Digits>15 Maple uses a so-called "software float" representation where such high precision floating-point values are stored internally using big integers. Basic arithmetic can then use GMP et al. But this is much more involved than using optimized or vectorized arithmetic functions built right into the CPU hardware. Linear algebra computations done with such software floats in Maple is accomplished using generic nonparallelized BLAS and LAPACK libraries recompiled to redefine "double" and overload arithmetic with hooks into Maple's kernel.

Yes, the jump in timing is quite steep, at the crossover from hardware to software precision.

It might be possible to soften the blow of the crossover a little, by having a quadruple-precision implementation of the BLAS and LAPACK, to cover a range close to Digits=16 through Digits=30 or so. Or perhaps key generic software float BLAS functions could be parallelized or cache-tuned.

acer

restart:                   

ee := sin(3*arcsin(x)):    

radnormal(convert(ee,exp));

                                        2
                                 -x (4 x  - 3)

That was in Maple 18.01. I notice that Maple 7.00 could do that too.

I also got it with Maple 18.01 using,

radnormal(expand(convert(ee,ln)));

acer

restart:                      
with(LinearAlgebra):                

A:=<<2,4,1>|<1,-1,1>|<3,3,2>>:
b:=<8,5,4>:                         
x:=MatrixInverse(A,method=pseudo).b:

If the rank of Matrix A stacked with the transpose of column Vector x is the same as the rank of A then must not x be in the row space of A?

evalb( Rank(<A,x^%T>) = Rank(A) );

                                     true

What about if x is orthogonal to everything in the null space of A?

andmap(v->v.x=0, NullSpace(A));

                                     true

acer

Change that to cos(x) in the numerator instead.

What you have shown is an expression with multiplication of `cos` and `x` as the numerator (and your plot is an "2-D Implicit Plot" of "variables" `cos` and `x`).

acer

There have been a few reports (here, and here) of this particular error message which seem due to a corrupt Maple installation likely due to a faulty or corrupted Maple product Installer.

I suggest you contact Maplesoft's tech support and get them to provide you with a download link to a fresh and valid installer.

I suggest asking for a "full 18.02 installer" since it might be that the problem is specific to some instance of the 18.02 "upgrade" installer which would get applied to a full 18.00 or 18.01 install.

acer

For this particular example each equation can be isolated for either x or y. The first is of the form y=f(x) and the second is of the form x=g(y). So the first can be plotted directly using the plot command. The second can also be handled directly using the plot command, and if the transformation (x,y)->(y,x) is applied then the second plot can be sensibly displayed with the first plot. I mention this just because it can produce a smooth pair of curves.

Of course you can adjust the ranges, colors, or the scaling and view options to taste. But I expect that you might want to make the ranges used in the plot calls match the respective ranges in the view option.

plots:-display(
  plot(x^3-4*x,x=-2..2,color=red),
  plottools:-transform((x,y)->[y,x])(plot(y^3-3*y,y=-2..2,color=blue)),
  scaling=constrained, view=[-2..2,-2..2]);

acer

restart:

result:=solve({x+y=1,x+2*y=4},{x,y});

                        {x = -2, y = 3}

vals:=eval([x,y],result);

                            [-2, 3]

acer

I'm not sure I understand your issue.

restart:

v:=Vector([Record('l','R')]):                      

TypeTools:-AddType(Element,'record(l,R)'):         
TypeTools:-AddType(ExpandedLine,'Vector(Element)'):

type(v,ExpandedLine);                              

                                     true

type(Vector([Record('s','p')]),ExpandedLine);

                                     false

kernelopts(version);

            Maple 18.01, X86 64 LINUX, Mar 28 2014, Build ID 935137

acer

expr:=I*b+a+x+I*y+I^2*c;   

                         expr := b I + a + x + y I - c

evalc(expr);               

                             a - c + x + (b + y) I

evalc(Re(expr)+I*Im(expr));

                             a - c + x + (b + y) I

acer


:-`&blacksquare;`;

`&blacksquare;`

':-`&blacksquare;`';

`&blacksquare;`

Typesetting:-mrow(Typesetting:-mn(':-`&blacksquare;`',':-mathsize'=30));

"&blacksquare;"

:-`&#9642;`;

`&blacksquare;`

':-`&#9642;`';

`&blacksquare;`

Typesetting:-mrow(Typesetting:-mn(':-`&#9642;`',':-mathsize'=30));

"&blacksquare;"

kernelopts(version);

`Maple 18.02, X86 64 WINDOWS, Oct 20 2014, Build ID 991181`

 


Download blacksquare.mw

acer

Here's another approach.

It'd be a little trickier than this, to make fencing with brackets be fully optional. The display would look nicer fenced, however, when multiplying a pair of such displayed mixed rationals.

If a more complete package to deal with such things were wanted then it might instead be done with objects (ModulePrint, static exports to handle their arithmetic, etc).

I realize that you showed a textplot simply as another way to get the effect using an axes-less plot, and that you may not want plots. But for what it's worth, I show below that the approach given here seems to play ok with textplots anyway.

[edit] See corrected version in comment below, to properly get `value` from a negative example. 

restart:

`print/%mixed` := proc(a,b)
   uses Typesetting;
   #mcomplete(mfenced(mrow(mn(convert(a,string)),mn(" "),Typeset(b))));
   mcomplete(mrow(mn(convert(a,string)),mn(" "),Typeset(b)));
end proc:

%mixed := proc(x::rational)
  if nargs=1 then
    if abs(x)>1 then
      'procname'(trunc(args[1]), abs(args[1]-trunc(args[1])));
    else x; end if;
  else 'procname'(args); end if;
end proc:

mixed := `+`:

%mixed( 17/6 );

%mixed(2, 5/6)

value(%);

17/6

%mixed( -100001/9971 );

%mixed(-10, 291/9971)

value(%);

-99419/9971

%mixed( 17/6 ) + %mixed( 11/5 );

%mixed(2, 5/6)+%mixed(2, 1/5)

value(%);

151/30

plots:-textplot( [ 1, 1, %mixed( 17/6 ) ],
                 size=[200,200], gridlines=false);

 

 

Download mixedrationals.mw

acer

First 229 230 231 232 233 234 235 Last Page 231 of 336