Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi Maple lovers, and others,

I wrote up some simple Maple code that 
checks if an expression (a^3+2) is a prime number.

The output fits on one page of paper.
n_cubed_plus_2.mw

n_cubed_plus_2.pdf

Also, I have an account at mersenneforum.org

Kindest Regards,

Matt

PS Does this help?  The code works.

I have a square matrix of data points. Each point is between 0 to 0.2. I wish to plot it and set the axes to values from 0 to 1. I want the 3D plot to be plotted with a constrained scaling. The two options I have are plots:-matrixplot and plots:-surfdata. 

* matrixplot can constrain the data, but it isn't obvious how to change the axes so that it shows from 0 to 1 in both directions. 

* In surfaceplot, it is easy to adjust the axes values, but scaling=constrained does nothing. 

(I assume someone else might also appreciate the answer. So, instead of me continuing to struggle, I post here and hope someone can answer without the use of many brain cells.) 

Example attached.

restart; N := 20; M := LinearAlgebra:-RandomMatrix(N, generator = rand(0 .. .2))

 

Scaling can be easily controlled, but labels are bad

plots:-matrixplot(N*M, labels = ["x", "y", "V"], scaling = constrained, axis = [tickmarks = [seq(0 .. 1, numelems = 10)]], size = [600, 600])

 

Axes are shown nicely, but scaling cannot be constrained.

plots:-surfdata(M, 0 .. 1, 0 .. 1, labels = ["x", "y", "V"], scaling = constrained, size = [600, 600])

 
 

NULL

Download Scaled_matrix_plot_with_axes.mw

If I understand right, in the following calling an exception should be raised since the return value of the matching coercion procedure is of course not of type “set”: 

restart;
foo := (x::coerce(set, (y::rtable) -> convert(y, list))) -> x:
foo(<0>);
 = 
                              [0]

Did I miss something?

So just like the title illustrates, I found a paper authored by Gary Nicklason in 2022: Autonomous Planar Systems of Riccati Type and in the last section it mentioned about a class of Abel ODE, which belongs to AIA(Abel Inverse Abel) class. It is of First kind and the inverse of it(by swapping variables) is of second kind.

While the first kind is solvable in terms of Airy function, the inverse of it along with its equivalence class is not solvable by the existing dsolve.

I have tested it in my worksheet Nicklason_equation.mw. So is it possible to add this class into the dictionary for solvable Abel ODE, or, maybe there are some bugs within the internal procedure of dsolve, which results in failure for catching the solvable candidates?

I want to remove the Lambert function (LambertW) from my equation, but I don't know how. I tried using the explicit option, but it didn't work. How can I express the equation without LambertW?

restart

with(PDEtools)

with(LinearAlgebra)

NULL

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

declare(u(x, y, z, t))

u(x, y, z, t)*`will now be displayed as`*u

(2)

declare(f(x, y, z, t))

f(x, y, z, t)*`will now be displayed as`*f

(3)

pde := diff(diff(u(x, y, z, t), t)+6*u(x, y, z, t)*(diff(u(x, y, z, t), x))+diff(u(x, y, z, t), `$`(x, 3)), x)-lambda*(diff(u(x, y, z, t), `$`(y, 2)))+diff(alpha*(diff(u(x, y, z, t), x))+beta*(diff(u(x, y, z, t), y))+gamma*(diff(u(x, y, z, t), z)), x)

diff(diff(u(x, y, z, t), t), x)+6*(diff(u(x, y, z, t), x))^2+6*u(x, y, z, t)*(diff(diff(u(x, y, z, t), x), x))+diff(diff(diff(diff(u(x, y, z, t), x), x), x), x)-lambda*(diff(diff(u(x, y, z, t), y), y))+alpha*(diff(diff(u(x, y, z, t), x), x))+beta*(diff(diff(u(x, y, z, t), x), y))+gamma*(diff(diff(u(x, y, z, t), x), z))

(4)

pde_nonlinear, pde_linear := selectremove(proc (term) options operator, arrow; not has((eval(term, u(x, y, t) = a*u(x, y, t)))/a, a) end proc, expand(pde))

0, diff(diff(u(x, y, z, t), t), x)+6*(diff(u(x, y, z, t), x))^2+6*u(x, y, z, t)*(diff(diff(u(x, y, z, t), x), x))+diff(diff(diff(diff(u(x, y, z, t), x), x), x), x)-lambda*(diff(diff(u(x, y, z, t), y), y))+alpha*(diff(diff(u(x, y, z, t), x), x))+beta*(diff(diff(u(x, y, z, t), x), y))+gamma*(diff(diff(u(x, y, z, t), x), z))

(5)

thetai := t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i]; eval(pde_linear, u(x, y, z, t) = exp(thetai)); eq15 := isolate(%, w[i])

t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i]

 

w[i]*k[i]*exp(t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i])+12*k[i]^2*(exp(t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i]))^2+k[i]^4*exp(t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i])-lambda*l[i]^2*exp(t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i])+alpha*k[i]^2*exp(t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i])+beta*k[i]*l[i]*exp(t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i])+gamma*k[i]*r[i]*exp(t*w[i]+x*k[i]+y*l[i]+z*r[i]+eta[i])

 

w[i] = -(t*k[i]^4+gamma*t*k[i]*r[i]+alpha*t*k[i]^2+beta*t*k[i]*l[i]-lambda*t*l[i]^2+LambertW(12*t*k[i]*exp(-(t*k[i]^4+alpha*t*k[i]^2+beta*t*k[i]*l[i]+gamma*t*k[i]*r[i]-lambda*t*l[i]^2-x*k[i]^2-y*k[i]*l[i]-z*k[i]*r[i]-eta[i]*k[i])/k[i]))*k[i])/(t*k[i])

(6)

sol := solve(eq15, w[i], explicit)

-(t*k[i]^4+gamma*t*k[i]*r[i]+alpha*t*k[i]^2+beta*t*k[i]*l[i]-lambda*t*l[i]^2+LambertW(12*t*k[i]*exp(-(t*k[i]^4+alpha*t*k[i]^2+beta*t*k[i]*l[i]+gamma*t*k[i]*r[i]-lambda*t*l[i]^2-x*k[i]^2-y*k[i]*l[i]-z*k[i]*r[i]-eta[i]*k[i])/k[i]))*k[i])/(t*k[i])

(7)
 

NULL

Download remove.mw

I have a system of polynomial equations where the unknowns are real numbers. The set of solutions is infinite (positive-dimensional). How can I compute the real dimension of the solution set (i.e. of a real algebraic variety)?

As it as mentioned in arXiv:2105.10255, this can be done using the RealTriangularize function from the RegularChains package. What is best way of getting the real dimension from the regular_semi_algebraic_system object, which is returned by this function?

I got email to register to "see" Maple 2025 :

for a special advanced look at Maple 2025

But I do not understand what does registering here means. Do I then get a link to some Maple internal URL to watch Video at that time? It says

Date/Time: Tuesday, March 18, 2025 at 11:00 AM
Language: English
Duration: 1 hour

If I register, then what happens?  do I get a link that opens at the time time to watch it? If so, why does one have to register to watch a Maple video? Why is the link not made public for any one to watch? Does one have to be at the browser at that exact time for the link to open?

I just do not know what a Maple webinar means.  Is it like a youtube video?

Hi,

Would someone please help me with how to achieve this cool animation shown here.

3d plot

How i can add lebel inside graph  like this picture for some graph , in somecoding i have but i can't how it work i want add to  my code but i can't do the same as paper did

label.mw

I am trying to find the most compact form of the symbolic matrix exponential of the specific 4x4 input matrix with the following form:

where all variables are non-negative real constants, with the additional problem specific conditions:

1. omega__1 + omega__2 = 1 

2. f__p + f__d1 + f__d2 = 1

There are many mathematically identical subterms at the matrix exponential, so I would like to use a few proper substitute subexpressions, but Maple does not apply it, without any error or warning message.

Moreover, I have no idea how to incorporate above-mentioned additional conditions into the simplification process.

expFT_compact.mw

I will be very happy for any help with this problem.

Michal

I am very interested in problems of integration and limit determination. In order to be able to continue other work with the help of Maple, I would like some advice on solving the following problem. The solution I know of using pen and paper is very tiring, perhaps Maple can make it easier:

To calculate Int(from 0 to 1)[ln(x)*ln(1-x)]dx
or, for obvious reasons, formulated differently:
Let eps, delta>0. Calculate
lim(eps, delta-->0)Int(0+eps to 1-delta)[ln(x)*ln(1-x)]dx

Is there a good way to include subscript(s) to a letter within a 'text' command?  Currently I do this by specifying the coordinates, letter, and font for the letter, then specify the coordinates, number and font for the subscript.  However, with this method the letter and subscript can be compressed if the viewing interval is compressed or expanded.  

Is there another way to include letters with a subscript in a text command?

Hi! A basic issue.

Why view=[-2 ..1, -2 ..5]  is not useful here? According to the output, only the green line meets the view settings. I want to extend the left side of these three lines appropriately (show the intersection)

with(plots)

l := 2*x+y+1 = 0; l1 := 4*x+2*y+2 = 0; l2 := 4*x+2*y-2 = 0; l3 := 4*x-2*y+6 = 0

2*x+y+1 = 0

 

4*x+2*y+2 = 0

 

4*x+2*y-2 = 0

 

4*x-2*y+6 = 0

(1)

 

display({implicitplot(l, color = black, legend = l, thickness = 5, view = [-2 .. 1, -2 .. 5])}, {implicitplot(l1, color = red, legend = l1, view = [-2 .. 1, -2 .. 5])}, {implicitplot(l2, color = blue, legend = l2, view = [-2 .. 1, -2 .. 5])}, {implicitplot(l3, color = green, legend = l3, view = [-2 .. 1, -2 .. 5])})

 
 

NULL

Download The_intersection_parallelism_and_coincidence_of_two_straight_lines.mw

I have an epidemic model and the endemik equilibrium point contains rootOf _Z, here's one of the example

i still don't understand about the _Z and find the "remove_RootOf" command. Does it affect the result or is it an explicit result of Z?

I'm happy to announce the publication of Volume 5, Issue #1 of Maple Transactions.  You can find it at

mapletransactions.org
 

We have a survey paper by Veselin Jungic and Naomi Borwein on teaching Experimental Mathematics courses as our Featured Contribution.  Many of you will find it interesting and useful.

In the refereed paper section we have a paper on Metaprogramming with Maple and C by Ilias Kotsireas; a paper on fast transposed Vandermonde solving by Hyukho Kwon & Michael Monagan; a paper by David Ulgenes (an honours student in Oslo) on Gamma, Pseudogamma, and Inverse Gamma functions; and a paper by John Campbell on applications of Gosper's nonlocal derangement identity (which, if you don't know that the word "derangement" has a technical mathematical meaning, may give you the wrong impression!).

As usual I've also written something, and I hope you like it: it's about Chladni figures and standing modes in an elliptical drum, and visualizing such in Maple.  It uses Mathieu functions in Maple and noodles a bit about zerofinding (but winds up using fsolve because that's so convenient).
 

Keep the papers coming.  This is the 12th issue of Maple Transactions, and I remind you that it has a "Diamond Class" designation, which means there are no page charges to authors, and the articles are free to read for everyone.  This means that there's some volunteer labour needed, of course: you have to write the articles, and what we want is that you write articles that people in the Maple community actually want to read.

I'd also like to thank the copyeditor, Michelle Hatzel, for her very hard work on this issue.  She's really made a difference, and I think you will be able to see it.   

First 24 25 26 27 28 29 30 Last Page 26 of 2211