C_R

3577 Reputation

21 Badges

6 years, 96 days

MaplePrimes Activity


These are replies submitted by C_R

You have to expand a bit on your question. What calculation do you want to do? In Maple sets are formed by these paratheses {}. To select an element of a set you can add an index

{1, 2, 3}[3];
                               3

This is how you perform a union in Maple

A := {1, 2, 3};
B := {4, 5, 6};
A union B;
                         A := {1, 2, 3}

                         B := {4, 5, 6}

                       {1, 2, 3, 4, 5, 6}

A[3];
                               3

@acer 

The technique that you described is what I was looking for. The use of the colon makes a huge difference.

I can now quite easily see what I suspected. Neither collect_and_recurse nor common_factors return the original expression.

(a + b)*(c + d)+ (e + f)*(g + h)

This also gives more insight in a related question from @sursumCorda (without analysing whether the two mentionned procedures are designed to spot a common factor that only differs in sign. It would be nice if simplify could do this).

Thank you for the answer!

I am interested in tracing Maple library procedures. Here is a example where I tried do understand why Maple does not return the orginal expression.

restart;
trace(`simplify/size`);
(a + b)*(c + d)+ (e + f)*(g + h);
expand(%);
simplify(%);

I assume that the simplification happens in `simplify/size` but where exactly is unclear. I could now trace all the procedures that `simplify/size` potentially calls or I could apply a local printlevel (if that exists).
I tried

trace(`simplify/size`,printlevel=100);

@Joe Riel 

On a note book:

  • Start Maple (2k internal display in my case with 125% font scaling) and create a document.
  • Connect external Monitor with different scaling (4k in my case with 150% font scaling)
  • Try to close the document (Crtl-F4) with changes that are not saved

 

  • Open the the laptop (display is duplicated on both monitors). On both monitors the dialouge is back to normal

 

  • Close save dialouge and notebook
  • Close document (now on external monitor)

 

When both monitors are  set with the same scaling, clipping does not manifest.

My conclusion: Unless the Java virtual machine can handle scaling changes, this effect will not dissapear.

@Carl Love 

I agree that this is an option as long as the mserver.exe can be identified. Maple GUI allows to change the order of worksheet tabs, which may make it impossible to uniquely identify the assigned mserver.

A forced kill option in the GUI could solve this. However, this would only make sense in cases when mserver.exe is in a state where it effectivly cannot interrupt an operation. I don't know if that is technically possible. Maybe a call to an external third party library could cause such a situtation.

One reason not to kill could be results that mserver.exe remembers. Does Maple remember calls to elementary or special functions (for example) that were executed during the interrupted operation?  Are they still available when Maple is Ready again? This could speed up new operations within a session. I could not yet find out (test code missing) whether Maple keeps such results when an operation is interrupted.

@Kitonum 

No. Thumbs up for you!

Sol := fsolve(Sys, {s = 0 .. Pi, t = -Pi .. Pi})

@Kitonum 

If I flip the direction of action of one of the prismatic joints (to define the constraint AC=BD) in the model (edit: and increase the initial angle B to 120 deg) I can reprocude your solution.

@Christopher2222 

A variant of Carls statement that separates commands/functions from the argument for the expense of beeing slightly longer

(numer@(lhs - rhs) = 0)(eq);

Carls statement is probably the shortes possible

@Carl Love 

All works fine now and thank you for this nice piece of code.

I still cannot find out what went wrong with the file below when I came to the black box conclusion

blackbox_simplify.mw

If I paste from this file

printlevel:=1000
                   

simplify((x2 - x3)*x1 - x2*x4 + x3*x4 + (y1 - y4)*(y2 - y3));

I get the expected huge ammount of information but if I re-execute the file not much is printed.

 

Update:

No need to investigate. simplify remembered the old output...

@acer 

Thanks for the tweak. I hope we will see this integrated one day.👍

@Christopher2222 @Scot Gould @Ronan 

Just an observation:

I have a Maple 2024 session running for more than a week with many worksheets open and no signs of icons dissapearing.

What I did yesterday: I configured (in the NVIDIA control pannel) my computer (Maple 2024 still running) such that Maple 2023 uses exclusively the NVIDIA graphics processor. Et voila

All this without any extended use of Maple 2023. Maple 2024 is not configured to use a particular processor and the system can chose the graphics processor. I cannot tell at the moment which resources the Maple 2024 session is using.

What is maybe more important: I started Maple 2023 in laptop mode (i.e. only the internal 2k display available). Now I am back in the office and have a 4k external monitor connected).

New: mouse over and minimizing do not bring all icons back

 

Concerning Java, there are IDE alternatives to Eclipse. By coincidence I talked to a software engineer who told me that his Java team recently switched to IntelliJ IDEA for a windows application. So there are options

 

 

@Carl Love 

I tried printlevel:=1000 and alternatively

trace(simplify);
simplify((x2 - x3)*x1 - x2*x4 + x3*x4 + (y1 - y4)*(y2 - y3));

From that I could not understand at which code line the simplification stopped. For other commands (like dsolve) I had more success with printlevel and trace. Can I do better here?

@vv 

I like this more than my current solution (that I did not wanted to share in advance)

eval(ineq*(-2),-2=c);# case c<0
                             b < a

To flip a < b to b < a for c<0

map(`*`, ineq, -c)*(-1);# case c<0
                             b < a

Thanks

@sursumCorda 

Simplify cannot be traced. Whatever simplify does I cannot imagine a reason why simplify should not perform a recursive operation on the remainder of subexpressions that were not simplified yet  as

simplify(- x2*x4 + x3*x4 )
                         -(x2 - x3) x4

This extra step is not a modification of existing simplifications, its just an addition.
For the time beeing collect has to be used

simplify((x2 - x3)*x1 - x2*x4 + x3*x4 + (y1 - y4)*(y2 - y3)):
collect(%,x4);
       (-x2 + x3) x4 + (x2 - x3) x1 + (y1 - y4) (y2 - y3)

@Scot Gould 

Maple 2024 uses a JDK

different from Maple 2020

I looks to me that this change was required because future support was not guaranteed.

I think future Maple versions will still be Java based because I do not see an alternative for a multiplatform "WORA" application. Even Microsoft supports Java.

Let's hope for a better Java Virtual Machine and/or Microsoft OS interfaces.

First 31 32 33 34 35 36 37 Last Page 33 of 70