Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi,

have some Maple code to share.

prime_triplet_0_4_6.mw

prime_triplet_0_4_6.pdf

Enjoy

Matthew

ps Prime numbers are fun

see https://t5k.org/

 

We are a week away from the submission deadline for the Maple Conference!  
Presentation proposal applications are due July 25, 2025.

We are inviting submissions of presentation proposals on a range of topics related to Maple, including Maple in education, algorithms and software, and applications. We also encourage submission of proposals related to Maple Learn. You can find more information about the themes of the conference and how to submit a presentation proposal at the Call for Participation page.

We hope to see there.

I want to define a multivariate function f(x1,x2) and its gradient f1(x1,x2) in order to calculate

f(X)=f(X[0])+grad(f(X[0])*(X-X[0])

I try in this way:

with(LinearAlgebra);
f := x -> x[1]^2 + x[2]^2
f1 := x -> <diff(f(x), x[1]), diff(f(x), x[2])>
A := <2,3>
f(A)
     13
f1(A)
     Error, (in f1) invalid input: diff received 2, which is not valid for its 2nd argument
 

What is wrong and how could I define f1(x) in order to write f1(A) for the gradient of f calculated  at A?
Thanks

I intend to use LinearAlgebra package to do some calculations. I want to compute the basis for large Matrices. My discovery is that the linalg[kernel] command, which the document claims is deprecated, could do such computation significantly faster than the LinearAlgebra[NullSpace] command. For a 200 x 500 large random matrix, linalg[kernel] clocked 33 secs, while the LinearAlgebra[NullSpace] takes 200 secs, as shown in the worksheet NullSpace_vs_kernel.mw.

I wanna know what makes the difference, or is there a misuse for LinearAlgebra[NullSpace].

Hi,

Don't laugh.

Some of you are not familair with Wagstaff Prime Numbers

see Wolfram Math World

also, this Maple code is esentially, a loop and the isprime() function

for your edification

b

have a look

just wanted to contribute my two cents to the Maple community

good day

Hi everyone,

I am trying to solve a system of coupled ODEs numerically. My worksheet runs and produces results, but when I look at the graphs, it seems that the boundary conditions are not being satisfied correctly. Could anyone help me identify the issue and  fix my implementation?

BCs_help.mw

I need to export an image in high resolution in JPEG, JPG, and PDF formats. Right now, I'm using screenshots, which results in low clarity. Could you please help me with the correct syntax to generate a high-resolution, downloadable image in these formats? I'm attaching the file below:

q_new.mw

Hi

I'm trying to duplicate this graph in Maple. Any suggestions on how to place the textplot labels (n=0, n=1, etc.) to the right of 0.8, just like in the original graph?

how to place the textplot labels (n=0, n=1, etc.)

Thanks

S7MAA_Dveloppement_Limit.mw

I constructed a density function, and I am certain it shows me what I want.  The problem I am having is parsing the Elliptic functions. Is there a way to "get rid" of the ones I don't want or need.

I generated a plot of the function -- the plot tells me what I expected based on simulation. I need to know if there is a way to express the density function (y) as a function of t and without the elliptic functions..  Even a numerical solution would be fine.

I assume the denomenator term is correct. I also assume that I don't need complex values. My input file is below.

Basics.mw

I have set a style for my Maple 2023 sheets

2D-Input, Font: Times Roman 28 pt.

In the the past when I reopened the file, it would come back with the same 2D input font.

Starting today, when I reopen the file, the whole sheet is changed to. 

Maple-Input, Font: Courier New 12 pt. 

You can see it flash on the original stylem then reset to the Courier font. 

I tried resetting the Display options, but no luck.

Any thoughts?

I tried to open some existing worksheets. 

If I enter, e.g.,r f:=x, I get 

"Typesetting:-mprintslash([(f := x)],[x])"

I cannot change the style set. 

It seems that when I open old worksheets, some of the text imput, e.g., processes, is lost.

I upgraded to Maple 2025, but have the same issues. 

Any suggestions?

The two profit functions intersect at a certain point, but the graph is not clearly visible in the range of Cb​ from 30,000 to around 60,000. How can I adjust the plot to make this range more visible? What can i do such that two lines are seen distinct in that area?

Sheet:Q_12.mw

I'm solving the 1D heat equation using two different approaches, both involving Fourier transforms.

  1. First Attempt: Using pdsolve the Fourier method. This code either takes a very long time or doesn't produce a plot at all.
  2. Second Attempt: Manual Fourier transform. This one works fine and quickly plots the result.

Why does the first version using pdsolve(..., method = Fourier) result in slow or non-responsive behaviorplot3d, while the second version (manual transform) runs efficiently? Is the pdsolve result too symbolic or unevaluated for plotting? How can I make the first approach plot correctly?

Thanks for any insights!

ft1.mw

In this system of differential equation i have two questions
1- i want find thus parameter containing in S[1] and S[2] to be 1 or -1 how find find all other parameter inside thus for finding that?

2-when equalibroium point are complex the conservative quantity not shown thus point ? why is not shown in  diagram there is trick which i don't know How i can show in global? 
L1.mw

finding each parameter to set the point be one like this picture

 

 

Hi. how can i plot this function (FF) ?

restart

 

NULL

FF := evalf((5.00000*10^(-1))*sqrt(2.00000*10^0)*sqrt((-(2.86309*10^0)*P1-(1.66947*10^5)*(-(1.78626*10^(-6))*P1+(-1.03200*10^(-6)-I*(2.12871*10^(-209)))*P1)*exp(-(3.24175*10^(-1))*x)-(1.66947*10^5)*(-(4.18761*10^(-119))*P1+(-2.41935*10^(-119)-I*(4.99043*10^(-322)))*P1)*exp((3.24175*10^(-1))*x)+(4.83452*10^3+I*(9.71800*10^2))*((4.91783*10^(-20)+I*(4.44752*10^(-19)))*P1-(7.23576*10^(-19))*P1)*exp((4.17729*10^(-2)+I*(3.63246*10^(-2)))*x)+(4.83452*10^3+I*(9.71800*10^2))*((-1.86327*10^(-5)+I*(5.29561*10^(-5)))*P1+(2.76726*10^(-4))*P1)*exp((-4.17729*10^(-2)-I*(3.63246*10^(-2)))*x)+(4.83452*10^3-I*(9.71800*10^2))*((-1.86327*10^(-5)-I*(5.29561*10^(-5)))*P1+(2.76726*10^(-4))*P1)*exp((-4.17729*10^(-2)+I*(3.63246*10^(-2)))*x)+(-1.00000*10^(-200)-I*(1.00000*10^(-403)))*P1+(-7.80021*10^(-2750)-I*(3.11940*10^(-2750)))*((-3.43175*10^2733+I*(1.99678*10^2732))*P1+(5.08514*10^2734)*P1)*exp((4.17729*10^(-2)-I*(3.63246*10^(-2)))*x))^(2.00000*10^0)+(-(1.53846*10^5)*(-(6.46014*10^(-7))*P1+(-3.73229*10^(-7)-I*(7.69863*10^(-210)))*P1)*exp(-(3.24175*10^(-1))*x)-(1.53846*10^5)*(-(1.51448*10^(-119))*P1+(-8.74976*10^(-120)-I*(1.80482*10^(-322)))*P1)*exp((3.24175*10^(-1))*x)+(2.51785*10^0)*P1+(-6.25305*10^3+I*(3.19024*10^3))*((-1.86327*10^(-5)+I*(5.29561*10^(-5)))*P1+(2.76726*10^(-4))*P1)*exp((-4.17729*10^(-2)-I*(3.63246*10^(-2)))*x)+(-6.25305*10^3+I*(3.19024*10^3))*((4.91783*10^(-20)+I*(4.44752*10^(-19)))*P1-(7.23576*10^(-19))*P1)*exp((4.17729*10^(-2)+I*(3.63246*10^(-2)))*x)+(-6.25305*10^3-I*(3.19024*10^3))*((-1.86327*10^(-5)-I*(5.29561*10^(-5)))*P1+(2.76726*10^(-4))*P1)*exp((-4.17729*10^(-2)+I*(3.63246*10^(-2)))*x)+(5.94458*10^(-2750)+I*(1.03769*10^(-2749)))*((-3.43175*10^2733+I*(1.99678*10^2732))*P1+(5.08514*10^2734)*P1)*exp((4.17729*10^(-2)-I*(3.63246*10^(-2)))*x)+(-4.53057*10^(-1)-I*(9.34527*10^(-204)))*P1+(4.43548*10^4)*(-(1.78626*10^(-6))*P1+(-1.03200*10^(-6)-I*(2.12871*10^(-209)))*P1)*exp(-(3.24175*10^(-1))*x)+(4.43548*10^4)*(-(4.18761*10^(-119))*P1+(-2.41935*10^(-119)-I*(4.99043*10^(-322)))*P1)*exp((3.24175*10^(-1))*x)+(-1.53846*10^5-I*(3.36949*10^(-198)))*((-1.28153*10^(-7)-I*(3.64224*10^(-7)))*P1+(1.90328*10^(-6))*P1)*exp((-4.17729*10^(-2)+I*(3.63246*10^(-2)))*x)+(1.20721*10^(-220)+I*(7.88859*10^(-221)))*((-4.28969*10^203+I*(2.49597*10^202))*P1+(6.35642*10^204)*P1)*exp((4.17729*10^(-2)-I*(3.63246*10^(-2)))*x)+(-1.53846*10^5+I*(3.36949*10^(-198)))*((3.38241*10^(-22)+I*(3.05893*10^(-21)))*P1-(4.97664*10^(-21))*P1)*exp((4.17729*10^(-2)+I*(3.63246*10^(-2)))*x)+(-1.53846*10^5+I*(3.36949*10^(-198)))*((-1.28153*10^(-7)+I*(3.64224*10^(-7)))*P1+(1.90328*10^(-6))*P1)*exp((-4.17729*10^(-2)-I*(3.63246*10^(-2)))*x))^(2.00000*10^0)+(-(1.53846*10^5)*(-(6.46014*10^(-7))*P1+(-3.73229*10^(-7)-I*(7.69863*10^(-210)))*P1)*exp(-(3.24175*10^(-1))*x)-(1.53846*10^5)*(-(1.51448*10^(-119))*P1+(-8.74976*10^(-120)-I*(1.80482*10^(-322)))*P1)*exp((3.24175*10^(-1))*x)-(3.45235*10^(-1))*P1-(1.22592*10^5)*(-(1.78626*10^(-6))*P1+(-1.03200*10^(-6)-I*(2.12871*10^(-209)))*P1)*exp(-(3.24175*10^(-1))*x)-(1.22592*10^5)*(-(4.18761*10^(-119))*P1+(-2.41935*10^(-119)-I*(4.99043*10^(-322)))*P1)*exp((3.24175*10^(-1))*x)+(-1.41853*10^3+I*(4.16204*10^3))*((4.91783*10^(-20)+I*(4.44752*10^(-19)))*P1-(7.23576*10^(-19))*P1)*exp((4.17729*10^(-2)+I*(3.63246*10^(-2)))*x)+(-1.41853*10^3+I*(4.16204*10^3))*((-1.86327*10^(-5)+I*(5.29561*10^(-5)))*P1+(2.76726*10^(-4))*P1)*exp((-4.17729*10^(-2)-I*(3.63246*10^(-2)))*x)+(-1.53846*10^5-I*(3.36949*10^(-198)))*((-1.28153*10^(-7)-I*(3.64224*10^(-7)))*P1+(1.90328*10^(-6))*P1)*exp((-4.17729*10^(-2)+I*(3.63246*10^(-2)))*x)+(-1.41853*10^3-I*(4.16204*10^3))*((-1.86327*10^(-5)-I*(5.29561*10^(-5)))*P1+(2.76726*10^(-4))*P1)*exp((-4.17729*10^(-2)+I*(3.63246*10^(-2)))*x)+(-1.53846*10^5+I*(3.36949*10^(-198)))*((-1.28153*10^(-7)+I*(3.64224*10^(-7)))*P1+(1.90328*10^(-6))*P1)*exp((-4.17729*10^(-2)-I*(3.63246*10^(-2)))*x)+(-1.53846*10^5+I*(3.36949*10^(-198)))*((3.38241*10^(-22)+I*(3.05893*10^(-21)))*P1-(4.97664*10^(-21))*P1)*exp((4.17729*10^(-2)+I*(3.63246*10^(-2)))*x)+(1.20721*10^(-220)+I*(7.88859*10^(-221)))*((-4.28969*10^203+I*(2.49597*10^202))*P1+(6.35642*10^204)*P1)*exp((4.17729*10^(-2)-I*(3.63246*10^(-2)))*x)+(-4.53057*10^(-1)-I*(9.34527*10^(-204)))*P1+(-1.85563*10^(-2750)+I*(7.25748*10^(-2750)))*((-3.43175*10^2733+I*(1.99678*10^2732))*P1+(5.08514*10^2734)*P1)*exp((4.17729*10^(-2)-I*(3.63246*10^(-2)))*x))^(2.00000*10^0)+(6.00000*10^0)*(-(2.25126*10^5)*(-(1.78626*10^(-6))*P1+(-1.03200*10^(-6)-I*(2.12871*10^(-209)))*P1)*exp(-(3.24175*10^(-1))*x)+(2.25126*10^5)*(-(4.18761*10^(-119))*P1+(-2.41935*10^(-119)-I*(4.99043*10^(-322)))*P1)*exp((3.24175*10^(-1))*x)+(1.79100*10^3-I*(5.22310*10^2))*((-1.86327*10^(-5)+I*(5.29561*10^(-5)))*P1+(2.76726*10^(-4))*P1)*exp((-4.17729*10^(-2)-I*(3.63246*10^(-2)))*x)+(-1.79100*10^3+I*(5.22310*10^2))*((4.91783*10^(-20)+I*(4.44752*10^(-19)))*P1-(7.23576*10^(-19))*P1)*exp((4.17729*10^(-2)+I*(3.63246*10^(-2)))*x)+(1.79100*10^3+I*(5.22310*10^2))*((-1.86327*10^(-5)-I*(5.29561*10^(-5)))*P1+(2.76726*10^(-4))*P1)*exp((-4.17729*10^(-2)+I*(3.63246*10^(-2)))*x)+(2.06743*10^(-2750)+I*(2.41391*10^(-2750)))*((-3.43175*10^2733+I*(1.99678*10^2732))*P1+(5.08514*10^2734)*P1)*exp((4.17729*10^(-2)-I*(3.63246*10^(-2)))*x))^(2.00000*10^0))-250)

.7071067810*((-2.86309*P1-166947.0000*(-0.1786260000e-5*P1+(-0.1032000000e-5-0.2128710000e-208*I)*P1)*exp(-.3241750000*x)-166947.0000*(-0.4187610000e-118*P1+(-0.2419350000e-118-0.4990430000e-321*I)*P1)*exp(.3241750000*x)+(4834.52000+971.80000*I)*((0.4917830000e-19+0.4447520000e-18*I)*P1-0.7235760000e-18*P1)*exp((0.4177290000e-1+0.3632460000e-1*I)*x)+(4834.52000+971.80000*I)*((-0.1863270000e-4+0.5295610000e-4*I)*P1+0.2767260000e-3*P1)*exp((-0.4177290000e-1-0.3632460000e-1*I)*x)+(4834.52000-971.80000*I)*((-0.1863270000e-4-0.5295610000e-4*I)*P1+0.2767260000e-3*P1)*exp((-0.4177290000e-1+0.3632460000e-1*I)*x)+(-0.1000000000e-199-0.1000000000e-402*I)*P1+(-0.7800210000e-2749-0.3119400000e-2749*I)*((-0.3431750000e2734+0.1996780000e2733*I)*P1+0.5085140000e2735*P1)*exp((0.4177290000e-1-0.3632460000e-1*I)*x))^2.00000+(-153846.0000*(-0.6460140000e-6*P1+(-0.3732290000e-6-0.7698630000e-209*I)*P1)*exp(-.3241750000*x)-153846.0000*(-0.1514480000e-118*P1+(-0.8749760000e-119-0.1804820000e-321*I)*P1)*exp(.3241750000*x)+2.51785*P1+(-6253.05000+3190.24000*I)*((-0.1863270000e-4+0.5295610000e-4*I)*P1+0.2767260000e-3*P1)*exp((-0.4177290000e-1-0.3632460000e-1*I)*x)+(-6253.05000+3190.24000*I)*((0.4917830000e-19+0.4447520000e-18*I)*P1-0.7235760000e-18*P1)*exp((0.4177290000e-1+0.3632460000e-1*I)*x)+(-6253.05000-3190.24000*I)*((-0.1863270000e-4-0.5295610000e-4*I)*P1+0.2767260000e-3*P1)*exp((-0.4177290000e-1+0.3632460000e-1*I)*x)+(0.5944580000e-2749+0.1037690000e-2748*I)*((-0.3431750000e2734+0.1996780000e2733*I)*P1+0.5085140000e2735*P1)*exp((0.4177290000e-1-0.3632460000e-1*I)*x)+(-.4530570000-0.9345270000e-203*I)*P1+44354.80000*(-0.1786260000e-5*P1+(-0.1032000000e-5-0.2128710000e-208*I)*P1)*exp(-.3241750000*x)+44354.80000*(-0.4187610000e-118*P1+(-0.2419350000e-118-0.4990430000e-321*I)*P1)*exp(.3241750000*x)+(-153846.0000-0.3369490000e-197*I)*((-0.1281530000e-6-0.3642240000e-6*I)*P1+0.1903280000e-5*P1)*exp((-0.4177290000e-1+0.3632460000e-1*I)*x)+(0.1207210000e-219+0.7888590000e-220*I)*((-0.4289690000e204+0.2495970000e203*I)*P1+0.6356420000e205*P1)*exp((0.4177290000e-1-0.3632460000e-1*I)*x)+(-153846.0000+0.3369490000e-197*I)*((0.3382410000e-21+0.3058930000e-20*I)*P1-0.4976640000e-20*P1)*exp((0.4177290000e-1+0.3632460000e-1*I)*x)+(-153846.0000+0.3369490000e-197*I)*((-0.1281530000e-6+0.3642240000e-6*I)*P1+0.1903280000e-5*P1)*exp((-0.4177290000e-1-0.3632460000e-1*I)*x))^2.00000+(-153846.0000*(-0.6460140000e-6*P1+(-0.3732290000e-6-0.7698630000e-209*I)*P1)*exp(-.3241750000*x)-153846.0000*(-0.1514480000e-118*P1+(-0.8749760000e-119-0.1804820000e-321*I)*P1)*exp(.3241750000*x)-.3452350000*P1-122592.0000*(-0.1786260000e-5*P1+(-0.1032000000e-5-0.2128710000e-208*I)*P1)*exp(-.3241750000*x)-122592.0000*(-0.4187610000e-118*P1+(-0.2419350000e-118-0.4990430000e-321*I)*P1)*exp(.3241750000*x)+(-1418.53000+4162.04000*I)*((0.4917830000e-19+0.4447520000e-18*I)*P1-0.7235760000e-18*P1)*exp((0.4177290000e-1+0.3632460000e-1*I)*x)+(-1418.53000+4162.04000*I)*((-0.1863270000e-4+0.5295610000e-4*I)*P1+0.2767260000e-3*P1)*exp((-0.4177290000e-1-0.3632460000e-1*I)*x)+(-153846.0000-0.3369490000e-197*I)*((-0.1281530000e-6-0.3642240000e-6*I)*P1+0.1903280000e-5*P1)*exp((-0.4177290000e-1+0.3632460000e-1*I)*x)+(-1418.53000-4162.04000*I)*((-0.1863270000e-4-0.5295610000e-4*I)*P1+0.2767260000e-3*P1)*exp((-0.4177290000e-1+0.3632460000e-1*I)*x)+(-153846.0000+0.3369490000e-197*I)*((-0.1281530000e-6+0.3642240000e-6*I)*P1+0.1903280000e-5*P1)*exp((-0.4177290000e-1-0.3632460000e-1*I)*x)+(-153846.0000+0.3369490000e-197*I)*((0.3382410000e-21+0.3058930000e-20*I)*P1-0.4976640000e-20*P1)*exp((0.4177290000e-1+0.3632460000e-1*I)*x)+(0.1207210000e-219+0.7888590000e-220*I)*((-0.4289690000e204+0.2495970000e203*I)*P1+0.6356420000e205*P1)*exp((0.4177290000e-1-0.3632460000e-1*I)*x)+(-.4530570000-0.9345270000e-203*I)*P1+(-0.1855630000e-2749+0.7257480000e-2749*I)*((-0.3431750000e2734+0.1996780000e2733*I)*P1+0.5085140000e2735*P1)*exp((0.4177290000e-1-0.3632460000e-1*I)*x))^2.00000+6.00000*(-225126.0000*(-0.1786260000e-5*P1+(-0.1032000000e-5-0.2128710000e-208*I)*P1)*exp(-.3241750000*x)+225126.0000*(-0.4187610000e-118*P1+(-0.2419350000e-118-0.4990430000e-321*I)*P1)*exp(.3241750000*x)+(1791.00000-522.31000*I)*((-0.1863270000e-4+0.5295610000e-4*I)*P1+0.2767260000e-3*P1)*exp((-0.4177290000e-1-0.3632460000e-1*I)*x)+(-1791.00000+522.31000*I)*((0.4917830000e-19+0.4447520000e-18*I)*P1-0.7235760000e-18*P1)*exp((0.4177290000e-1+0.3632460000e-1*I)*x)+(1791.00000+522.31000*I)*((-0.1863270000e-4-0.5295610000e-4*I)*P1+0.2767260000e-3*P1)*exp((-0.4177290000e-1+0.3632460000e-1*I)*x)+(0.2067430000e-2749+0.2413910000e-2749*I)*((-0.3431750000e2734+0.1996780000e2733*I)*P1+0.5085140000e2735*P1)*exp((0.4177290000e-1-0.3632460000e-1*I)*x))^2.00000)^(1/2)-250.

(1)

NULL

with(plots, implicitplot, complexplot)

[implicitplot, complexplot]

(2)

 

implicitplot(FF, x = 0 .. 200, P1 = 0 .. 800)

 

NULL

 

NULL

Download PLOT11.mw

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