Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

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

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 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

 

 

This post presents a work I did to answer this recent question by @AHSAN.

I believe that the two procedures I developed could be of interest to Mapleprimes members. Here they are in their most recent forms. However, I think they can still be improved and completed, and I am open to your suggestions for developing them further in this direction.

BarGraph_2_Categories.mw
Illustration


BarGraph_3_Categories.mw
Illustration

 

Good day.

I am looking into the behaviour of a function, V, that depends on several parameter values; these values are fixed in the attached example. However, I have encountered an issue that is puzzling me and I was hoping that someone may be able to shine a light on this for me.

Basically,  I would like to understand how the solution, V, behaves as the value of exponent, beta, approaches infinity.

Straightforward analysis suggests that the value of V tends to -10 as beta grows infinitely large (s -> C, and beta ->infinity and so, V -> -10 ... so far, so good).

However, when the function is plotted, the solution seems to converge to a value, 6.5, as beta tends to a very large number (10^17).

Now .. here's the mystery .. there appears to be a critical value of around 7.854 x 10^17; here, the limit seems to switch from V=6.5 to -10. Does this phenomenon correspond to a discontinuity or is it related to the computational process? Are there any built-in routines in Maple to check for such potential conditions?

Thanks for reading!

MaplePrimes_Sep_19.mw

Before at most a year i asked about this applying long wave limit which is coming from some kind of series which i am not sure to how get this result from the series but i provide just the two function of series for appyting the long wave limit and then we can generalized to N value of them, i asked to Ai too he give me a good explanation and somehow he did programing but  i am not cool with programing of Ai,  i  am looking for result eq14 and eq 20 , i have a series for eq(12) N=2 and for other N too but by applying long wave limit it is become to eq(14) and then F[4] becone to eq(20) i want that result by don't have any idea how reach it  

Long-wave-limit-testing.mw

Ai-result.mw

update F4

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