MaplePrimes Questions

I created an image by a matrix 8x8:

M:=1/255*RandomMatrix(8,generator=0..255):
G:=convert(M,image):
Embed(G)

but the image dispayed is very small, of course. Is there a way to visualize the 8x8 pixel image larger, so I can see the pixels?

While solving for i1 encounter too many terms. How can I simplify it so that only " Pn,Pr and w" remain, with all other variables grouped into constants, so that the equation for the optimal i1​ becomes small and manageable?

restart

kernelopts(version)

`Maple 2019.1, X86 64 WINDOWS, May 21 2019, Build ID 1399874`

(1)

Pi1 := (w-i1)*(1/2+(i1-i2)/(2*tau))*(1-(Pn-Pr)/(1-delta))+(s-i1-Crr)*(1/2+(i1-i2)/(2*tau))*((Pn-Pr)/(1-delta)-(-beta*i1*upsilon+Pr)/delta)+Ce*rho0*(((Pn-Pr)/(1-delta)-(-beta*i1*upsilon+Pr)/delta)*eta+1-(Pn-Pr)/(1-delta))

(w-i1)*(1/2+(1/2)*(i1-i2)/tau)*(1-(Pn-Pr)/(1-delta))+(s-i1-Crr)*(1/2+(1/2)*(i1-i2)/tau)*((Pn-Pr)/(1-delta)-(-beta*i1*upsilon+Pr)/delta)+Ce*rho0*(((Pn-Pr)/(1-delta)-(-beta*i1*upsilon+Pr)/delta)*eta+1-(Pn-Pr)/(1-delta))

(2)

diff(Pi1, i1) = 0

-(1/2+(1/2)*(i1-i2)/tau)*(1-(Pn-Pr)/(1-delta))+(1/2)*(w-i1)*(1-(Pn-Pr)/(1-delta))/tau-(1/2+(1/2)*(i1-i2)/tau)*((Pn-Pr)/(1-delta)-(-beta*i1*upsilon+Pr)/delta)+(1/2)*(s-i1-Crr)*((Pn-Pr)/(1-delta)-(-beta*i1*upsilon+Pr)/delta)/tau+(s-i1-Crr)*(1/2+(1/2)*(i1-i2)/tau)*beta*upsilon/delta+Ce*rho0*beta*upsilon*eta/delta = 0

(3)

solve(%, i1)

-(1/3)*(Crr*beta*delta*upsilon-beta*delta*i2*upsilon-beta*delta*s*upsilon+beta*delta*tau*upsilon-Crr*beta*upsilon+beta*i2*upsilon+beta*s*upsilon-beta*tau*upsilon-delta*Pr+delta^2-(6*Ce*beta^2*delta^2*eta*rho0*tau*upsilon^2-12*Ce*beta^2*delta*eta*rho0*tau*upsilon^2+6*Ce*beta^2*eta*rho0*tau*upsilon^2+Crr^2*beta^2*delta^2*upsilon^2+Crr*beta^2*delta^2*i2*upsilon^2-2*Crr*beta^2*delta^2*s*upsilon^2-Crr*beta^2*delta^2*tau*upsilon^2+beta^2*delta^2*i2^2*upsilon^2-beta^2*delta^2*i2*s*upsilon^2-2*beta^2*delta^2*i2*tau*upsilon^2+beta^2*delta^2*s^2*upsilon^2+beta^2*delta^2*s*tau*upsilon^2+beta^2*delta^2*tau^2*upsilon^2-2*Crr^2*beta^2*delta*upsilon^2-2*Crr*beta^2*delta*i2*upsilon^2+4*Crr*beta^2*delta*s*upsilon^2+2*Crr*beta^2*delta*tau*upsilon^2-2*beta^2*delta*i2^2*upsilon^2+2*beta^2*delta*i2*s*upsilon^2+4*beta^2*delta*i2*tau*upsilon^2-2*beta^2*delta*s^2*upsilon^2-2*beta^2*delta*s*tau*upsilon^2-2*beta^2*delta*tau^2*upsilon^2+Crr^2*beta^2*upsilon^2+3*Crr*Pn*beta*delta^2*upsilon-2*Crr*Pr*beta*delta^2*upsilon+Crr*beta^2*i2*upsilon^2-2*Crr*beta^2*s*upsilon^2-Crr*beta^2*tau*upsilon^2+2*Crr*beta*delta^3*upsilon-3*Pn*beta*delta^2*s*upsilon+3*Pn*beta*delta^2*upsilon*w-Pr*beta*delta^2*i2*upsilon+2*Pr*beta*delta^2*s*upsilon+Pr*beta*delta^2*tau*upsilon-3*Pr*beta*delta^2*upsilon*w+beta^2*i2^2*upsilon^2-beta^2*i2*s*upsilon^2-2*beta^2*i2*tau*upsilon^2+beta^2*s^2*upsilon^2+beta^2*s*tau*upsilon^2+beta^2*tau^2*upsilon^2+beta*delta^3*i2*upsilon-2*beta*delta^3*s*upsilon-beta*delta^3*tau*upsilon+3*beta*delta^3*upsilon*w-3*Crr*Pn*beta*delta*upsilon+Crr*Pr*beta*delta*upsilon-4*Crr*beta*delta^2*upsilon+3*Pn*beta*delta*s*upsilon-3*Pn*beta*delta*upsilon*w+2*Pr*beta*delta*i2*upsilon-Pr*beta*delta*s*upsilon-2*Pr*beta*delta*tau*upsilon+3*Pr*beta*delta*upsilon*w-2*beta*delta^2*i2*upsilon+4*beta*delta^2*s*upsilon+2*beta*delta^2*tau*upsilon-6*beta*delta^2*upsilon*w+Crr*Pr*beta*upsilon+2*Crr*beta*delta*upsilon+Pr^2*delta^2-Pr*beta*i2*upsilon-Pr*beta*s*upsilon+Pr*beta*tau*upsilon-2*Pr*delta^3+beta*delta*i2*upsilon-2*beta*delta*s*upsilon-beta*delta*tau*upsilon+3*beta*delta*upsilon*w+delta^4-2*Pr^2*delta+4*Pr*delta^2-2*delta^3+Pr^2-2*Pr*delta+delta^2)^(1/2)+Pr-delta)/(beta*upsilon*(-1+delta)), -(1/3)*(Crr*beta*delta*upsilon-beta*delta*i2*upsilon-beta*delta*s*upsilon+beta*delta*tau*upsilon-Crr*beta*upsilon+beta*i2*upsilon+beta*s*upsilon-beta*tau*upsilon-delta*Pr+delta^2+(6*Ce*beta^2*delta^2*eta*rho0*tau*upsilon^2-12*Ce*beta^2*delta*eta*rho0*tau*upsilon^2+6*Ce*beta^2*eta*rho0*tau*upsilon^2+Crr^2*beta^2*delta^2*upsilon^2+Crr*beta^2*delta^2*i2*upsilon^2-2*Crr*beta^2*delta^2*s*upsilon^2-Crr*beta^2*delta^2*tau*upsilon^2+beta^2*delta^2*i2^2*upsilon^2-beta^2*delta^2*i2*s*upsilon^2-2*beta^2*delta^2*i2*tau*upsilon^2+beta^2*delta^2*s^2*upsilon^2+beta^2*delta^2*s*tau*upsilon^2+beta^2*delta^2*tau^2*upsilon^2-2*Crr^2*beta^2*delta*upsilon^2-2*Crr*beta^2*delta*i2*upsilon^2+4*Crr*beta^2*delta*s*upsilon^2+2*Crr*beta^2*delta*tau*upsilon^2-2*beta^2*delta*i2^2*upsilon^2+2*beta^2*delta*i2*s*upsilon^2+4*beta^2*delta*i2*tau*upsilon^2-2*beta^2*delta*s^2*upsilon^2-2*beta^2*delta*s*tau*upsilon^2-2*beta^2*delta*tau^2*upsilon^2+Crr^2*beta^2*upsilon^2+3*Crr*Pn*beta*delta^2*upsilon-2*Crr*Pr*beta*delta^2*upsilon+Crr*beta^2*i2*upsilon^2-2*Crr*beta^2*s*upsilon^2-Crr*beta^2*tau*upsilon^2+2*Crr*beta*delta^3*upsilon-3*Pn*beta*delta^2*s*upsilon+3*Pn*beta*delta^2*upsilon*w-Pr*beta*delta^2*i2*upsilon+2*Pr*beta*delta^2*s*upsilon+Pr*beta*delta^2*tau*upsilon-3*Pr*beta*delta^2*upsilon*w+beta^2*i2^2*upsilon^2-beta^2*i2*s*upsilon^2-2*beta^2*i2*tau*upsilon^2+beta^2*s^2*upsilon^2+beta^2*s*tau*upsilon^2+beta^2*tau^2*upsilon^2+beta*delta^3*i2*upsilon-2*beta*delta^3*s*upsilon-beta*delta^3*tau*upsilon+3*beta*delta^3*upsilon*w-3*Crr*Pn*beta*delta*upsilon+Crr*Pr*beta*delta*upsilon-4*Crr*beta*delta^2*upsilon+3*Pn*beta*delta*s*upsilon-3*Pn*beta*delta*upsilon*w+2*Pr*beta*delta*i2*upsilon-Pr*beta*delta*s*upsilon-2*Pr*beta*delta*tau*upsilon+3*Pr*beta*delta*upsilon*w-2*beta*delta^2*i2*upsilon+4*beta*delta^2*s*upsilon+2*beta*delta^2*tau*upsilon-6*beta*delta^2*upsilon*w+Crr*Pr*beta*upsilon+2*Crr*beta*delta*upsilon+Pr^2*delta^2-Pr*beta*i2*upsilon-Pr*beta*s*upsilon+Pr*beta*tau*upsilon-2*Pr*delta^3+beta*delta*i2*upsilon-2*beta*delta*s*upsilon-beta*delta*tau*upsilon+3*beta*delta*upsilon*w+delta^4-2*Pr^2*delta+4*Pr*delta^2-2*delta^3+Pr^2-2*Pr*delta+delta^2)^(1/2)+Pr-delta)/(beta*upsilon*(-1+delta))

(4)

simplify(%)

Error, (in simplify/do) invalid simplification command

 
 

``

Download Q_Simplify.mw

any idea what match fail on this example? is somethinbg wrong I am doing?

interface(version);

`Standard Worksheet Interface, Maple 2025.1, Linux, June 12 2025 Build ID 1932578`

restart;

A:=2*y(3)^4+5;
match(A=k1*y(k2)^k3+k4,y,'la')

2*y(3)^4+5

false

patmatch(A,k1::anything*y(k2::anything)^(k3::anything)+k4::anything,'la');
la

true

[k1 = 2, k2 = 3, k3 = 4, k4 = 5]

Download why_match_fail_sept_21_2025.mw

Update:
I think match can only do it if the main "variable"   is a variable and not a "function". In this example y(.) is function, so that is why it failed to match. For example this works:

A:=2*y^3+4;
match(A=k1*y^k2+k3,y,'la')

And gives true, since "y" here is not a "function".

But this makes match not very useful to use for parsing. patmatch seems a little more practical to use.

in this method i don't know in most of short equation i try to find the parameter but is just evaluating and nothing come up i don't know my way is wrong or write but i think i am right  but parameter not coming out, beside this in this equation give  me a warning regarding the parameters which say number of solution is more than 100 and dint show me that , how i can find the solution better than this?

f-p-.mw

I want to convert an XYZ file into a hydrogen-depleted heavy-atom molecule in Maple. Since XYZ has only coordinates, I’ll infer bonds by comparing inter-atomic distances to the sum of covalent radii ± tolerance, then remove hydrogens and output a heavy-atom molecule with only these bonds. What tolerances are sensible, and is there any built-in way in Maple to do this? Kind help with a maple code to do this.

Why is maple so useless? It can't even display a simple matrix equation without hours of user/forum intervention. I've never had this problem in the past. How does anyone get any work done? See example and compare with screenshot below.   why_is_maple_so_useless.mw

The left hand side contains the correct information but won't display it when evaluated. I even tried disabling matrix scrolling.

The default font size in the code edit region box of my worksheet is too small. I would like to change it without changing font sizes outside of the code edit region. I would be glad if I could do this within an individual worksheet, but it would be better if I could make this global in Maple 2025.

There doesn't seem to be any obvious way of doing this?

Hi,

I am looking for an idea to build a mixed and randomized series on unit conversions (volumes, surface, capacity, areas) in the form of two tables (2 columns & 8 rows). The first table would contain the questions, and the second one the solutions, so that students can use it for self-assessment. Do you have any ideas to suggest? Thanks!

I installed the latest 2025 recently and I encountered this issue. I never encountered this issue in 2024.

I also reset the configuration and reinstalled maple flow but it didn't solve anything.

I wanted to check that the input  has the pattern   symbol(symbol), which will match any of   y(x), or f(x) or A(B) and so on.

But using patmatch does not work. Using patmatch(h(z),y::symbol(x::symbol),'la');  or even patmatch(h(z),'y'::anything('x'::anything),'la'); all return false. I know I can do patmatch(h(z),func::function(name),'la'); and this returns true, but this matches h(z,r) and matches h(z,r,t) and matches h(z,r,t,u) and so on. 

I wanted to match only   SYMBOL(SYMBOL), i..e. one symbol followed by "(" followed by one symbol followed by closing ")"

For reference, this is what I am looking for 

I know I can use other ways in Maple to do this (may be typematch and and others). But wanted to see if patmatch works on this and why it is failing.

Can this be done using patmatch?

I need to isolate i1​ and move the remaining terms to the other side. However, I’m encountering an error while doing this.

Note: All parameters are non-negative (positive or equal to zero).

Attaching sheet: Question_Isolate_i1.mw

Maple 2025.1 unable to solve this ode. Sympy gives the following two solutions which Maples verifies are correct.

Any trick or option that can help dsolve find these solutions?
 

interface(version);

`Standard Worksheet Interface, Maple 2025.1, Linux, June 12 2025 Build ID 1932578`

restart;

ode:=diff(y(x),x) = (1+cos(x)*sin(y(x)))*tan(y(x));

diff(y(x), x) = (1+cos(x)*sin(y(x)))*tan(y(x))

sol:=dsolve(ode);

sol_1:=y(x)=arcsin( 2*exp(x) / ( c__1 + sqrt(2)*exp(x) * sin(x+Pi/4) ) ) + Pi

y(x) = arcsin(2*exp(x)/(c__1+2^(1/2)*exp(x)*sin(x+(1/4)*Pi)))+Pi

odetest(sol_1,ode)

0

sol_2:=y(x)=arcsin( 2*exp(x) / ( c__1 - sqrt(2)*exp(x) * sin(x+Pi/4) ) ) ;

y(x) = arcsin(2*exp(x)/(c__1-2^(1/2)*exp(x)*sin(x+(1/4)*Pi)))

odetest(sol_2,ode)

0

 


 

Download How_to_find_solution_sept_20_2025.mw

update:

OK, found out how. Needed transformation u(x)=sin(y(x)). Maple probably did not have this in one of the things to try.

 

restart;

ode:=diff(y(x),x) = (1+cos(x)*sin(y(x)))*tan(y(x));
sol:=dsolve(ode);

diff(y(x), x) = (1+cos(x)*sin(y(x)))*tan(y(x))

tr:=y(x)=arcsin(u(x));
PDEtools:-dchange(tr,ode,[u(x)]):
dsolve(%);
sol:=y(x)=arcsin(rhs(%));
odetest(sol,ode)
 

y(x) = arcsin(u(x))

u(x) = -2/(-2*exp(-x)*c__1+sin(x)+cos(x))

y(x) = -arcsin(2/(-2*exp(-x)*c__1+sin(x)+cos(x)))

0


 

Download How_to_find_solution_sept_20_2025_V2.mw

 

 

int(lambda*exp(-lambda*t), t=0..infinity) 

will get the integration result of 1

if we replace lambda with real numerical value of 1e5

we will get the integration result of 1

if we replace lambda with real numerical value  of1e6

we will get 0

but if we set lambda with an integer

lambda:= 1000000

the integration would be correct and equal to 1

why is this ?

Why when given IC for this ode, where the IC do not really makes much sense, so was not used. But the question is on the format of the output of the Maple dsolve. It gives solution as [{y(t) = c__1}]  instead of y(t) = c__1
 

interface(version);

`Standard Worksheet Interface, Maple 2025.1, Linux, June 12 2025 Build ID 1932578`

restart;

ode:=diff(y(t),t)=0;
IC:=y(0)=t;
sol:=dsolve(ode)

diff(y(t), t) = 0

y(0) = t

y(t) = c__1

sol:=dsolve([ode,IC])

[{y(t) = c__1}]


 

Related question. Since Maple did not use the IC, should there have been warning message generated that IC was ignored?

 

Download strange_format_of_solution_sept_19_2025.mw

 

 

I have a matrix that I am using for the entries in a drop down list to select.

When I type in the following text

"FBE (CDS 1), 3 LPE (CDS 2) and 3 LPP (CDS 3) with concrete"

(including the quotation marks), I get an error "unable to delimit strings/identifiers"

What is going on?  Why is Flow not treating the entry as text, and trying to parse the contents?

ExampleMatrixText.flow.zip

1 2 3 4 5 6 7 Last Page 3 of 2433