## finite difference and 2 d plot ...

Hello

I would like to solve the two dimensional heat equation in the square [-1,1]^2  using finite difference.

The following code  does not gives me the right answer.

I appreciate any help

heat2dequation.mw

## plot the solution of a complex PDE equation ...

Hello

I solved a complex PDE equation in maple but I can not plot the output.

The manner was like bellow:

PDE := [diff(A(z, t), z)+(1/2)*alpha*A(z, t)+(I*beta[2]*(1/2))*(diff(A(z, t), t, t))-(I*beta[3]*(1/6))*(diff(A(z, t), t, t, t))-I*(GAMMA(omega[0]))(abs(A(z, t))^2*A(z, t)) = 0];
IBC := {(D[2](A))(z, 1), A(0, t) = -sin(2*Pi*t), A(z, 0) = sin(2*Pi*z), (D[2](A))(z, 0) = 2*z};
pds := pdsolve(PDE, IBC, type = numeric, time = t, range = 0 .. 1);
pds:-plot3d(A(z, t)*conjugate(A(z, t)), t = 0 .. 1, z = 0 .. 10, shading = zhue, axes = boxed, labels = ["x", "t", "A(z,t)"], labelfont = [TIMES, ROMAN, 20], orientation = [-120, 40]);

It is solved but there is an error like:

Error, (in pdsolve/numeric/plot3d) unable to compute solution for z>INFO["failtime"]:
unable to store 11.2781250000000+4390.00000040000*I when datatype=float[8]

what is the problem?

## Customized discrete random variables...

Hi everyone,

I seek for creating a discrete random variable with the following characteristics. Let i be an integer between 1 and 100. The random variable is an integer, among i-x, i-x+1, i-x+2..., i-1, i+1, i+2... i+x. For example, with i=20 and x=5, the random variable is an integer between 15 and 25; with i=23 (and again x=5), the random variable is an integer between 18 and 28; and with i=98, the random variable is an integer among 93, 94... 97 and then 99, 100, 1, 2, 3.

Each possible value has the same probability, that is, 1/2x.

Any tips? Thank you in advance.

## solving differential equation...

I have a differential equation which it seems not be solvable. can anyone help me to solve?

Thank you

difeq.mw

## Maple giving back double integral unevaluated...

I am trying to evaluate the following double integral where hypergeom([x,1/2],[3/2],C) is gauss hypergeometric function 2f1. maple gives back it unevaluated. I doubt it may be due to slow convergence of hypergeometric function.

 >
 (1)
 >

## Weird compiler problem...

I have tried to compile a simple program looking for counterexamples to a conjecture by Goldbach that every odd number is a sum of a prime and twice a square. Stern gave the counterexamples 5777 and 5993 a long time ago, so this is mainly for instruction purposes.

My program

othergoldbachFCi:=proc(sieve::Array(1..10000,datatype=integer[4]))
local i,j,M;
M:=10000;
for i from 1 to M do
if(sieve[i] mod 2=0) then
for j from 1 to iquo(M-i,2*i+1) do
sieve[i+j*(2*i+1)]:=2*iquo(sieve[i+j*(2*i+1)],2)+1;
end do;
for j from 1 to floor(sqrt(M-i)) do
sieve[i+j*j]:=2+sieve[i+j*j] mod 2;
end do;
else
if(sieve[i]<2) then
printf("%d is a counterexample\n",2*i+1);
end if;
end if;
end do;
end proc;

works fine and compiles without problems. (I have to pass the array for the sieve because compiled program cannot declare memory, and it has to be 4 bytes even though I only need to use the lower 2 bit).  But the compiled version breaks with

Error, (in compiledOGi) array index out of bounds

already in the first instance of the for loop. After a lot of trial and error I found out that if I replaced the line

sieve[i+j*j]:=2+sieve[i+j*j] mod 2;

by

temp:=iquo(sieve[i+j*j],2);
sieve[i+j*j]:=2+(sieve[i+j*j]-2*temp);

then the problem goes away and the compiled version works beautifully. It is not enough to do the mod 2 computation in temp, and not enough to replace mod by iquo in one line.

This makes very little sense to me. Can anybody explain? I'm still using Maple 2016 and do not know if the issue has been resolved in Maple 2017.

Best,

Soren

## Is this a Bug in Maple...

The equation
-sqrt(k x) = sqrt(k x)
is solved correctly by Maple:

solve(-sqrt(k*x) = sqrt(k*x));
{k = k, x = 0}, {k = 0, x = x}

However, the equation
-sqrt(k x) = sqrt(k x + k - 1)
is apparently not solved correctly:

solve(-sqrt(k*x) = sqrt(k*x+k-1));

{k = 1, x = x}
The variable
x
can not be arbitrary since this equation reduces to the former equation
-sqrt(k*x) = sqrt(k*x);
when  k = 1
.

Maple should return something similar to (4) below.

eval(-sqrt(k*x), k = 1) = eval(sqrt(k*x+k-1), k = 1);
(1/2)    (1/2)
-x      = x
solve({-x^(1/2) = x^(1/2)});
{x = 0}

Can this be explained in some way, or is this a bug?

## I'd like to have some tips about Version Control (...

Hi everybody,

I am presently developing a MAPLE-based application and I need to trace its evolutions through a “version control process”.
For codes written in other languages I use to use GIT (it acts with text files and it has syntactic coloring for different languages).

I suspect the development teams routinely face this version control issue.
Could you advise me,  on the versioning tools you use ?

## How can I find the min and max of modulus of a com...

Let be the number z so that |z+3-2*I| + |z-3-8*I| = 6*sqrt(2). Find min and max of the modulus of z. How can I find min and max of modulus of z with Maple.

## can we start the value of indices in the christo...

right_file.mw

i want to start i from 0 ,1 ,2 , 3 but it does not work I rhink the defaul value is from 1 to 4. can we begin it with zero.

## Critical Point and plotting diagram...

Hi every body,

I have a function "p(v,T)" which I evaluated its critical point. after calculating when I want to plot diagram of "p-v" for some values of "T" around critical value of "T" I expect the shape of diagram for "T" bigger and smaller than critical value of "T" be different. but it not happened. Are here anyone can help me? The function "p(v,T)" is in the file. if you want calculate critical point and check I am right or wrong. Thanks criticalpoint.mw

## Why did the user interface of Maple 2017 change fr...

The Maple 2017 updates look great. I do have a question, though. Why was the user interface (palettes, toolbar icons, etc) changed from 3D to flat? Maple 2015 on Windows 7 Pro looked like a Windows  program. Maple 2017 with it's flat interface looks like it was written 30 years ago for Solaris (when the graphics in Java weren't cross platform).

I really wish there was a way I could get 2017 to look like 2015. I know it's very minor but being a very visual person, I really like the interface graphics.
was way beyond the competition.

Thanks

 >
 >
 (1)
 >
 >
 (2)
 >
 (3)
 >
 (4)

## metric and coordinate change...

Hi,

I want to know is maple helpful to find a cjange coordinate to transform an old coordinate to a new coordinate? details are attached to the file:

changecoor.mw

Thanks guyz