## Best quality when manually exporting plots as PNG?...

I want to export plots as PNG but found in the past that when using commands to automate the process (and explicitly controlling for image quality) some symbolic notation on the axes or in the plots themselves are translated to 1D.

Anyway, regardless of the reason just provided, I have a preference for exporting plots as PNG manually rather than automatically in some of my scripts. How to do this while ensuring the best quality? By default, manual exports into PNG have quite bad quality.

## how to obtain this simpler solution for this ode...

I was wondering why Maple do not give this simpler solution to this ode. It solves it as exact. But if solved as separable, the solution is much simpler.

I solved this by hand and Maple verifies my solution. You can see the separable solution is much simpler. Any tricks to make Maple gives the simpler solution?

 > interface(version);

 > ode:=diff(y(x),x)^4+f(x)*(y(x)-a)^3*(y(x)-b)^3*(y(x)-c)^2 = 0;

 > infolevel[dsolve]:=5; sol:=dsolve(ode); odetest(sol,ode);

Methods for first order ODEs:

-> Solving 1st order ODE of high degree, 1st attempt

trying 1st order WeierstrassP solution for high degree ODE

trying 1st order WeierstrassPPrime solution for high degree ODE

trying 1st order JacobiSN solution for high degree ODE

trying 1st order ODE linearizable_by_differentiation

trying differential order: 1; missing variables

trying simple symmetries for implicit equations

--- Trying classification methods ---

trying homogeneous types:

trying exact

<- exact successful

 > mysol:=Intat(1/( (_a-c)^(2/3)*(_a-b)*(_a-a))^(3/4),_a = y(x))=Intat( (-f(_a))^(1/4),_a=x)+_C1; odetest(mysol,ode)

Hand solution

Maple 2024

## Structure and number of doubles combinations...

Hi

A padel group organises doubles tournaments with the following structure: 16 players participate in four rounds, with each round consisting of four doubles matches. Players switch partners after each round.

So what I require is some code to generate the first round matches, the second round, the third, the nth .....

note the worksheet I bastardised from Tom Leslie's work.

2_man_teams_doubles.mw

## Strange simplification of sqrt with sin(x) ...

it took me hrs to find this as my solution was failing verification and I did not know why.

What logic do you think Maple used to simplify this:

```expr:=sqrt(1 + sin(x))/x;
simplify(expr)```

To this

How could the above be simpler than

?

Compare to Mathematica

And this is what I expected. I am now scared to use simplify in Maple as I do not know what I will get back.

Is there a way to tell Maple not to do such strange "simplification"? I am doing this in code, and the code does not know what the expression is.

To see an example of the side effect of this, here is one, where if solution to an ode is simplified first, it no longer verifies by odetest without adding extra assumptions:

 > interface(version);

 > restart;

 > ode:=diff(y(x),x)=(cos(x)-2*x*y(x)^2)/(2*x^2*y(x)); sol:=dsolve([ode,y(Pi)=1/Pi]); odetest(sol,ode);

 > odetest(simplify(sol),ode);

One does not expect that simplified solution no longer verfiies the ode.

Sure, I can do

odetest(simplify(sol),ode) assuming real;

and now it gives 0. But the point is that the first one did not need assumptions.

Maple 2024 on windows 10.

I am trying to tidy up cases where a proc returns multiple values. Have being trying Tabulate. I can get it to work when called after the results are returned. I would the procedure to do this but  keep acces to the name(s) assigned to the returned values.

A,B,C:= proc(...)  .....  return a, b, c    end proc.

So basically display a tabulated of a, b, c.

 > restart
 >
 > QQFProj := proc(q12::algebraic, q23::algebraic, q34::algebraic, q14::algebraic,{columns:=[QQFproj,Q13proj,Q24proj]},prnt::boolean:=true) description "Projective quadruple quad formula and intermediate 13 and 24 quads. Useful for cyclic quadrilaterals"; local qqf,q13,q24, sub1,sub2,sub3, R; #uses  DT = DocumentTools; sub1:= (q12 + q23 + q34 + q14)^2 - 2*(q12^2 + q23^2 + q34^2 + q14^2) ; sub2:=-4*(q12*q23*q34+q12*q23*q14+q12*q34*q14+q23*q34*q14)+8*q12*q23*q34*q14; sub3:=64*q12*q23*q34*q14*(1-q12)*(1-q23)*(1-q34)*(1-q14); qqf:=(sub1+sub2)^2=sub3; q13:=((q12-q23)^2-(q34-q14)^2)/(2*(q12+q23-q34-q14-2*q12*q23+2*q34*q14));#check this q24:=((q23-q34)^2-(q12-q14)^2)/(2*(q23+q34-q12-q14-2*q23*q34+2*q12*q14));#check this #if prnt then #return [columns,[qqf,q13,q24]]; if prnt then print(cat(" ",columns[1],"    ",columns[2],"     ",columns[3])) ; end if; return qqf ,q13,q24  end proc:
 > q12:=1/2:q23:=9/10:q34:=25/26:q41:=9/130: #Cyclic quadrilateral  AA:=QQFProj(q12,q23,q34,q41,true); AA[1]; AA[2]; AA[3]
 (1)
 > # Can the below be built into the proc to nicely didplay the results but maintain access to the results as shown when prnt=true.
 > columns:=[QQFproj,Q13proj,Q24proj]: BB:=QQFProj(q12,q23,q34,q41,false): DocumentTools:-Tabulate([columns,[BB]],width=55):#could do with a variable width depending on length of output epression.
 > BB[1]; BB[2]; BB[3]
 (2)
 > dspformat:=(BB,columns)->DocumentTools:-Tabulate([columns,[BB]],width=75);
 (3)
 > CC:=dspformat(BB,columns):#layout not as expected
 > CC[1] ; #  just gives  letters from Tabulate
 (4)
 >

## Standard Deviation ( Calculator/Maple)...

Hi,

I calculate the standard deviation using Maple, which differs from the standard deviation obtained by the calculator (TI). Can you provide an explanation for this difference?

Thanks

StDevQ.mw

## How to transform this sine expression into a more ...

I am trying to get Maple to simplify the following trigonometric expressions (for "generic" parameters) as much as possible

```sineExpr(3) := (
sin(a[2] - b[1])*sin(a[3] - b[1]))/(
sin(b[2] - b[1])*sin(b[3] - b[1]))*sin(a[1] - b[1]) + (
sin(a[3] - b[2])*sin(a[1] - b[2]))/(
sin(b[3] - b[2])*sin(b[1] - b[2]))*sin(a[2] - b[2]) + (
sin(a[1] - b[3])*sin(a[2] - b[3]))/(
sin(b[1] - b[3])*sin(b[2] - b[3]))*sin(a[3] - b[3]);
=

sineExpr(4) := (
sin(a[2] - b[1])*sin(a[3] - b[1])*sin(a[4] - b[1]))/(
sin(b[2] - b[1])*sin(b[3] - b[1])*sin(b[4] - b[1]))*
sin(a[1] - b[1]) + (
sin(a[3] - b[2])*sin(a[4] - b[2])*sin(a[1] - b[2]))/(
sin(b[3] - b[2])*sin(b[4] - b[2])*sin(b[1] - b[2]))*
sin(a[2] - b[2]) + (
sin(a[4] - b[3])*sin(a[1] - b[3])*sin(a[2] - b[3]))/(
sin(b[4] - b[3])*sin(b[1] - b[3])*sin(b[2] - b[3]))*
sin(a[3] - b[3]) + (
sin(a[1] - b[4])*sin(a[2] - b[4])*sin(a[3] - b[4]))/(
sin(b[1] - b[4])*sin(b[2] - b[4])*sin(b[3] - b[4]))*
sin(a[4] - b[4]);
=

```

So far, all of my attempts have failed:

 > restart:
 > kernelopts('version');
 > Physics:-Version();
 (1)
 >
 > combine(simplify(normal(sineExpr(1), expanded), trig), trig);
 (2)
 > combine(simplify(normal(sineExpr(2), expanded), trig), trig); # which can be transformed into sin((a[1]+a[2])-(b[1]+b[2])) only in certain legacy versions!
 (3)
 > combine(simplify(normal(sineExpr(3), expanded), trig), trig);
 (4)
 > CodeTools:-Usage(combine(simplify(normal(sineExpr(4), expanded), trig), trig));
 memory used=244.67MiB, alloc change=0 bytes, cpu time=6.17s, real time=5.49s, gc time=1000.00ms
 (5)
 > CodeTools:-Usage(combine(simplify(normal(sineExpr(5), expanded), trig), trig)): # rather lengthy
 memory used=4.23GiB, alloc change=-32.00MiB, cpu time=2.66m, real time=2.29m, gc time=29.98s

Can , , and  be reduced to , , and  respectively by Maple itself (that is, with as little user-intervention as possible) if one is not aware of such reductions in advance?

Note that because zero testing is frequently considerably easier, `combine` always succeeds in showing that the difference between the simplest possible and the original version is zero.

```combine(sin((a[1]+a[2]+a[3])-(b[1]+b[2]+b[3]))-sineExpr(3));
=
0

combine(sin((a[1]+a[2]+a[3]+a[4])-(b[1]+b[2]+b[3]+b[4]))-sineExpr(4));
=
0
```

However, I wonder if Maple can thoroughly simplify them without knowing those known “simplest possible” form beforehand
I also tried some other functions like `rationalize`, `radnormal`, and ``convert/trig``, yet Maple appears to have not been capable of completely simplifying even the sub-simplest case 𝑚＝2. Is there any workaround?

Of note, it can be demonstrated inductively that m∈ℕ

where none of the denominators is 0. Nevertheless, as mentioned above, is it possible to transform  and  (as well as , if possible) into potentially more elegant forms (Ideally,  is rewritten into ,  is rewritten into , and  is rewritten into .) without any such a priori knowledge
In Mma, these may be done using `TrigReduce` directly (cf. ); unfortunately, I cannot found a Maple equivalent to such functionality.

## Getting u(0,0,3) for pde solutions...

Good everyone,

I am solving a pde problem and I wanted to get the table values for u(0,0.1) but it's just returning the pds. Attach below is the maple worksheet for the code.

Test.mw

## Incomplete math in maple calculator...

When I calculate the edge values of a matrix the result is lengthy expression that could be simplified if evaluated numerically, Why is that not done?

## How to get Help Overview to top of listing?...

I am writing help pages for a package. The inital Overview should be at the top of the listing like in other Maple help directories.

How to I do this? Mine is listing purely alphabetically.

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

## Height of an ideal...

Dear all

I have an ideal, and code its definition  and I compute the height  but no result return. There is an error.

height_ideal.mw

Thank you for you help

## efficient code for number of divides...

Hello

I am looking for an efficient code to divide a given integer n by another integer d as many times as possible.

For example:

For n=294912 and d=8 the answer shoud be 9, because 294912/8^5=9.

## why dsolve does not give this simple solution to f...

THis ode looks complicated

`ode := (2*x^(5/2) - 3*y(x)^(5/3))/(2*x^(5/2)*y(x)^(2/3)) + ((-2*x^(5/2) + 3*y(x)^(5/3))*diff(y(x), x))/(3*x^(3/2)*y(x)^(5/3)) = 0;`

But is actually a simple first order linear ode:

```RHS:=solve(ode,diff(y(x),x));
new_ode:=diff(y(x),x)=RHS;
```

Whose solution is

But Maple gives this very complicated answer as shown below. When asking it to solve as linear ode, it now gives the much simpler solution.

Maple complicated solutions are all verified OK. But the question is, why did it not give this simple solution?

Attached worksheet.  All on Maple 2024

 > restart;

 > interface(version);

 > Physics:-Version();

 > ode := (2*x^(5/2) - 3*y(x)^(5/3))/(2*x^(5/2)*y(x)^(2/3)) + ((-2*x^(5/2) + 3*y(x)^(5/3))*diff(y(x), x))/(3*x^(3/2)*y(x)^(5/3)) = 0;

 > #why such complicated solutions? sol:=[dsolve(ode)];

 > #all solution are correct map(X->odetest(X,ode),sol);

 > RHS:=solve(ode,diff(y(x),x)); new_ode:=diff(y(x),x)=RHS;

 > dsolve(new_ode);

 > #force it to solve it as first order linear ode dsolve(ode,y(x),[`linear`])

## Why doesn't Maple simplify exponents....

I am wondering why Maple simplifies (x^(1/3))^3 to x ,  but not (x^3)^(1/3) .
I even tried the surd function. I believe the surd function is for real number arguments, so it should simplify to x.

 > restart:
 > f:=x->x^3: g:=x->x^(1/3):
 > f(g(x)); g(f(x));
 (1)
 > simplify((x^3)^(1/3))
 (2)
 > simplify(x^(1/3))^3
 (3)
 > simplify(surd(x^3,3))
 (4)
 > simplify(surd(x,3)^3)
 (5)
 >