Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

The Maple Conference starts tomorrow Oct. 26 at 9am EDT! It's not too late to register: https://www.maplesoft.com/mapleconference/2023/. Even if you can't attend all the presentations, registration will allow you to view the recorded videos after the conference. 

Check out the detailed conference program here: https://www.maplesoft.com/mapleconference/2023/full-program.aspx

Let us say that I have an expression, x*y*z^2*w^3 for example and I want to know the number of occurrances of x,y,z and w. 

So far I have tried splitting into a list and using nops, but I run into the problem that the z^2 and any power term seems to only be counted as one element (which makes sense).

I have also tried using the numboccur command but I have the same issue. I guess my question is, how can I convert this expression into "x*y*z*z*w*w*w" so that I can count w^3 as 3 occurances rather than 1? 

Thank you in advance for any suggestions!

Can anyone please assist with these errors?

#Clear memory.
restart;

#Initialise variables and arrays.
h:=Pi/10;
n:=10;
k:=0.1;  
m:=6;
t:=Array(0..m):
x:=Array(0..n):
u:=Array(0..n,0..m):

#Initialise the x array and the initial u(x,0) boundary.
for i from 0 to n do
    x[i]:=i*h;
    u[i,0]:=0;
end do:

#Initialise the t array and the u(x,t) side boundaries.
for j from 0 to m do
   t[j]:=j*k;
   u[0,j]:=0;
   u[n,j]:=3*sin*t[j];
end do:

#Use the 2D CTCS explicit wave method.
for i from 1 to n-1 do
   u[i,1]:=(u[i-1,0]/2*Pi^2+sin(x)/10*Pi^2+u[i+1,0]/2*Pi^2)-1;
end do:
 
for j from 1 to m-1 do
  for i from 1 to n-1 do
   u[i,j+1]:=(((u[i-1,j]+u[i+1,j]-u[i,j-1])/Pi^2)-2);
  end do;
end do:

#Display the u(x,t)values.
printf("2D CTCS Explicit Wave Method\n");
printf("----------------------------\n");
printf("x\t\t t\t\t u\n");
for i from 0 to n do
   printf("% f\t% f\t% f\n",x[i],t[m],u[i,m]);
end do;

(1/10)*Pi

 

10

 

.1

 

6

 

Error, invalid input: sin expects its 1st argument, x, to be of type algebraic, but received Array(0..10, [0,1/10*Pi,1/5*Pi,3/10*Pi,2/5*Pi,1/2*Pi,3/5*Pi,7/10*Pi,4/5*Pi,9/10*Pi,Pi])

 

2D CTCS Explicit Wave Method
----------------------------
x                 t                 u
 0.000000         0.600000         0.000000
 0.314159         0.600000        -2.015556
 0.628319         0.600000        -2.198509
 0.942478         0.600000        -2.215724
 1.256637         0.600000        -2.218015
 1.570796         0.600000        

 

Error, (in fprintf) number expected for floating point format

 

NULL


Download Asst_4_Question_2c.mw

Both, Maple and MapleSim in Versions from 2021 to 2023 do not start. A logfile is saved which starts as

# A fatal error has been detected by the Java Runtime Environment:

#

#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000000000000, pid=17256, tid=10520

#

# JRE version: OpenJDK Runtime Environment Temurin-19.0.1+10 (19.0.1+10) (build 19.0.1+10)

# Java VM: OpenJDK 64-Bit Server VM Temurin-19.0.1+10 (19.0.1+10, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)

# Problematic frame:

# C  0x0000000000000000

#

This only occurs when the notebook (on which the error occurs) is connected to the domain network. If the notebook is not connected, Maple and MapleSim can be started and will continue to run when the network is reconnected.

Has anybody seen this before or any ideas what this could be?

Edit: This all happened under Windows 10 on a notebook that has been running Maple for 3 years and only recently displayed this error.

Edit2: Connection via an USB doc which also connects to an external monitor.

Hello.

I would like to find the numerical solution of the Ginzburg-Landau equation for the1D, written in the form 

(diff(z(x), x, x))*kappa^2-(1-d)*kappa^2*(diff(z(x), x))/x+z(x)-z(x)^3 = 0

For d=1 and with the boundary conditions z(-infinity)=0 and z(infinity)=1 the solution is well-known, this is tanh(x) function.

My goal is to undertand the evolution of the numerical solution for the interval of the dimensionality 0<d<1. However, I faced with the problem that even for d=1 (the classical case) I get the error "Error, (in dsolve/numeric/bvp) Newton iteration is not converging".

Here is my simple code

restart;

with(plots):

R0 := (diff(z(x), x, x))*kappa^2-(1-d)*kappa^2*(diff(z(x), x))/x+z(x)-z(x)^3;

kappa := 2; d := 1;

p := dsolve({R0, z(-15) = 0, z(15) = 1}, type = numeric, range = -15 .. 15, maxmesh = 50000):

odeplot(p);

Thank you in advance.

My idea has been written down here, check out

Equivalence_class_of_solvable_Abel_and_Riccati_equation_(2).pdf

[moderator: updated with new approach, as follows, Feb 5, 2024]

Equivalence_rational_transformation_of_Riccati_equation_05022024.pdf
We have found new way to find equivalence transformation that yields a rational differential equation to Riccati equation, therefore computing non-Liouvillian first integral will be possible. This method can be implemented by Maple.

Since I have updated from Maple 2021 to 2023 something is wrong with my stylesheets.

I rephrase my qeustion here:

I like to change the text-style of 2D-Input to courant 12, bold, color x, no italic.

Now it is courant 12, black, italic when opening a new worksheet.

I was going to format, style, 2D-input, modify and then the font has changed when opening a new woksheet but the color is going back to black and its also italic courant when pressing enter in that worksheet.

I When opening a new worksheet, i don't want ot looad an new style set by hand every time.

 

Thanks for support

 

 

How will I use maple 2016 to solve ODEs and showing the steps involved because this will increase my understanding in it. 

The worksheet below includes a sample use of the Mobius transformation which produces a hyperbolic reflection of a point in the Poincare disk, followed by my attempt to produce the same result from first principles in a procedure.

Do I misunderstand the Mobius transformation and its use and/or is my procedure incorrect? 

InversePoint.mw

Is there a way to directly code a complex conjugate such as z with overbar without using the verbose conjugate(z)?

Soit h : [1 ; + ∞[ℝ

1.a°) Complète le tableau ci-dessus et trace la courbe ( Ch) de h dans un repére orthonormé ( O,I,j )

 𝑥 1 2 3 4 5

h(𝑥 )

b°) Montre que h est une bijection

c°) Détermine la bijection réciproque h-¹ de h

d°) Calcule hoh-¹ et h-¹oh ( 𝑥 )

2.) Trace la courbe ( Ch-¹) dans le même repére que ( Ch)

I have solved a simple expression with different built-in methods.... I received differents answers ...What is the exact way to get the same answers by all methods

help_roots.mw.

Hi,

I am looking for a simple code to generate random magic squares (with the sum of integers) of dimensions 4x4 or 5x5.

Thank you

I have a very simple question:

How do I find the index of an list element.

For example to find 96 in the following list which is the 25th element.

R := [1, 2, 4, 8, 16, 32, 64, 31, 62, 27, 54, 11, 22, 44, 88, 79, 61, 25, 50, 3, 6, 12, 24, 48, 96, 95, 93, 89, 81, 65, 33, 66, 35, 70, 43, 86, 75, 53, 9, 18, 36, 72, 47, 94, 91, 85, 73, 49];
max(R);
                               96

So how to find 25 ?

I have the following procedure

export exportCsvMatrix := proc(m:: Matrix, fileName: string)

  ExportMatrix(fileName, m, target=csv):

end:

However, I would like to be able to pass a list of matrices as well.

How can I add a parameter type that is Matrix or list of Matrix?

First 39 40 41 42 43 44 45 Last Page 41 of 2097