acer

32333 Reputation

29 Badges

19 years, 325 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Mike Mc Dermott Sorry, I don't see an attachment.

@Mike Mc Dermott 

Using the main menubar,
   View -> Palettes -> Show Palette
will display the submenu with all the available palettes. Not all are visible by default.

@Mike Mc Dermott What do you mean, explicitly, when you write, "...I would like the simplify function to make use of the parallel operator to simplify an expression such as EQ1 into form of EQ2."?

The expression shown in the image beside "Eq 1" in your Question is not mathematically equal (ie. not any reformulation) of this result which attains from your two lines of code for constructing "EQ2".

`//` := (R1, R2) -> R2*R1/(R1 + R2):

`//`(R1, R2)*`//`(R3, R4);  # EQ 2

R2*R1*R4*R3/((R1+R2)*(R3+R4))

Download EQ2.mw

Could you please show us, explicitly with Maple input code or notation the target form into which you want the expression in the "Eq 1" image to be changed?

When you write, "Is there a way to display the function as a binary operator..." do you only mean to allow it as 2D Input?

Or would you also want some way to display such an infix call in an inert manner as 2D Output (which might also be later hit with value, so as to compute the result)?

Also, I don't understand how your image named Eq1 relates to the result of the two code lines you've given. And I don't understand what you mean by simplification here.

@dharr I am pretty sure that you already know why these 2D Math symbols can act as binary infix operators. But I thought that I'd explain it for the benefit of others.

The reason is that these 2D Math symbols are the rendering of special Maple names which have some key features and consequences:
1) They each are also some HTML (or unicode) entity name
2) As consequence of 1), each of their first characters is &
3) As consequence of 3), Maple allows them to be used as binary infix operators

restart;

 

We can use names beginning with & as infix operators, in general.

`&f` := (a,b) -> a/b:

 

R1 &f R2;

R1/R2

 

We can also do something similar in 2D Input.

`⊓`(R1, R2)

`⊓`(R1, R2)

 

That works as an infix call, because the operator's name is also
that of an HTML entity, and thus fortuitously happens to start
with the & character.

lprint(%)

`⊓`(R1,R2)

 

We can also assign to that special name.

`⊓` := proc (a, b) options operator, arrow; a*b/(a+b) end proc

 

`⊓`(R1, R2)

R2*R1/(R1+R2)

Download neutral_infix_entity.mw

@C_R I'm sorry but I don't understand.

Some of your examples involve generated names like _Zxx which represent integers (possibly with further assumptions, eg. range). Other of your examples involve _Z the special placeholder used by RootOf.

Those are two quite different kinds of thing. The former you could programmatically extract/reformat/replace in returned expressions, as you elect. The latter is key to how RootOf works, and cannot really sensibly be changed.

I am confused as to why they'd be discussed together.

note: I suppose the apparent collision is due in part to mathematical conventions. The "Z" in _Zxx is due to the convention of using the (close) symbol for representing the integers, and the "Z" in _Z relates to the convention of using "z" to represent some complex unknown.

You can programmatically extract and manipulate such names.

As a start...

restart;

S:=[solve({cos(x)*tan(x)/x,x>0},allsolutions)[]];

[{x = (1/2)*Pi+Pi*_Z1}, {x = Pi*_Z2}]

K:=[indets(S,And(suffixed(_),satisfies(hasassumptions)))[]];

[_Z1, _Z2]

aK:=map(getassumptions,K);

[{_Z1::(AndProp(integer, RealRange(0, infinity)))}, {_Z2::(AndProp(integer, RealRange(1, infinity)))}]

op(aK[1][1]);

_Z1, AndProp(integer, RealRange(0, infinity))

lprint(%);

_Z1, AndProp(integer,RealRange(0,infinity))

convert(aK,relation);

[{And(_Z1::integer, 0 <= _Z1, _Z1 <= infinity)}, {And(_Z2::integer, 1 <= _Z2, _Z2 <= infinity)}]

lprint(%);

[{And(_Z1::integer,0 <= _Z1,_Z1 <= infinity)}, {And(_Z2::integer,1 <= _Z2,_Z2
<= infinity)}]

Download prog_assump.mw

Hence you can programmatically manipulate and reformat as you choose.

I've changed your Post into a Question.

Please don't spawn a wholly separate new Question thread for this.

If you have followup details (or highly related queries) then please add them here instead.

On a related note, in Maple 2020 (but not earlier) I can get the following,

solve(x*ln(x)=ln(1/2*2^(1/2)));

       1/2, 1/4

I mention that because Maple 2023 (and Maple 2018.2) can get the following,

eq := x^x=1/sqrt(2);

x^x = (1/2)*2^(1/2)

solve( map(log[x], eq) );

1/2, 1/4

Download solve_lgx.mw  (That also attains if some condition like x>0 is included...)

Did you delete an earlier version of this Question (from about Dec 23rd?)

That earlier Question of yours had this worksheet, with problematic usage: streamline_Help.mw

And my Answer worksheet was: streamline_Help_ac.mw. I had to guess at figuring out what you might have meant, in the presence of muddle and very little expanation, about the intended roles of names eta and x.

You eventually attached to that Question thread the exact same worksheet as you've attached here. Unfortunately the explanation of what you intended related to x=0 was still unclear.

The intent is not made any clearer to me merely by your repeating it.

@emendes Your newly described, additional problem with width and formatting seems like a different matter.

The code in my Answer is just a programmatic approach to the originally described page-break issue. That's not going to do anything for width&line-breaking (if data in some row is too wide, at default).

It's possible to construct&embed such a data collection by forcing a smaller font size, so that all the entries in any row can fit in a standard page width if printing/exporting in portrait mode. (Is print-to-file in landscape an option?)

But maybe you could attach your actual worksheet, so that we might test ideas without guesswork or back-and-forth?

@Carl Love I'd interpreted that sentence by the OP as being a well-intentioned comment to provide extra detail. The OP might not be aware that the static export Tabulate of a DataFrame does nothing more than pass along arguments to DocumentTools:-Tabulate.
 

Side note: Does anyone think that DocumentTools:-Tabulate should be made into a top-level command? Does the user-friendliness outweigh robbing it from the global name-space? I see more people here use Tabulate than the command dataplot (added as top-level in 2015).

Please put your followups here, instead of spawning yet more separate new Question threads for this.

@Nicole Sharp Please don't spawn a wholly separate new Question/Post thread for this.

I will submitting a bug report: combine(...,units) pulls the units into Quantity, and convert(...,unit_free) and combine(...,unit) together cannot pull such out so as to cancel, etc.

But it is not helpful to split the topic and details.

(I have deleted that, using a delete-as-duplicate facility.)

First 50 51 52 53 54 55 56 Last Page 52 of 592