Can't assign values from a procedure...

I defined a procedure, OrderB(0,b,c), that essentially determines the order of a group that is defined by 2 parameters (the first parameter is always zero), so the output is an integer and the procedure is defined for every integer value of both parameters. I wanted to structure the outputs into a matrix with columns that represent one parameter and rows that represent the other. However, whenever I try to apply a method of defining the matrix, Maple returns the values of the procedure and then gives me an empty matrix.

>f:=proc (i, j) -> OrderB(0, i, j+3);
>Matrix(3, f);
1
4
1
1
4
1
1
4
1
[NULL,NULL...]

I tried a second method where I defined a set s such that:

s:={(0,0)=OrderB(0,0,0) , (0,1)=OrderB(0,0,1).....}

but upon execution, maple returns:

1
4
1
....
s:={(0,0)=( ), (0,1)=( )...}

Please Help. I don't know what I'm mising in the code that is keeping Maple from putting the outputs of my procedure into the matrix.

Why does Maple 2016.1 improperly treat x^2?...

When experimenting with Maple 2016.1, I found several issues. One I have seen on MaplePrimes before (regarding "Error, incorrect syntax in parse: `;` unexpected (near 4th character of parsed string)" when evaluating an integral, for example, or trying to plot something), but another I have not seen - it may be related to the previous issue. Below is a document that contains some of the various errors I found. What is going on? It evaluates certain things correctly, but, in the integral, it treats "x^2" like a whole new variable (the integral of x^2 with respect to x from 0 to 2 it says is 2x^2, not 8/3). The same thing results in trying to plot x^2 (not shown), giving the same error if I were to say something like "plot(t,x=0..2)" - it cannot determine the plotting variable.

Any ideas? Are the two things (the Error, incorrect syntax in parse: `;` unexpected (near 4th character of parsed string) message and the bad integral value) related?

Simple graphical interface in Maple ...

How i need to write

>teksbiasa:=`Hello! Bob`;

in button Action When Clicked at simple graphical interface instead of

Do(teksbiasa=%txtTeksBiasa);

because when i enter Hello! Bob in %txtTeksBiasa, system pop up ERROR

Error

Error in Component button with caption "Botton":

(in unknown) incorrect syntax in parse: missing operator or

`;`(near 7th character of parsed string)

Thank you~=]]

Plotting problem...

I have the following problem : plotting with the squareroot function somehow stops showing the whole graph as soon as the range of the input allows values less than -10, I have attached two pictures that show the transition:

This is still fine:

But here is an example where the graph is cropped:

How can I change this to get the whole graph ? Thanks a lot for your help !!

Nested for loops...

So, I am working in a partial differeital equations course and we are doing image processing. I am taking an image and pixel by pixel applying the heat equation to smudge out noise. I created a for loop for the equation and it works, I need to itterate it over and over again. Here is my code:

for t from 1 to 20 do

for j from 2 to 149 do

for k from 2 to 149 do

`tile2__j,k`:=dellT/(h^(2))*(`tile__j+1,k`-4*`tile__j,k`+`tile__j-1,k`+`tile__j,k-1`)+`tile__j,k`

end do

end do

for m from 2 to 149 do

for n from 2 to 149 do

`tile__m,n`:= `tile2__m,n`

end do

end do

t := t+1

end do

Sorry, I could not get the Maple Math editor to work so I just copied my code. Apologize. I keep getting the error "Error, Invalid loop statement termination." Help?

Problem with implicitplot3d...

Hi, I have defined two functions:

ex1 := (x,t,z) -> -1.132*10^(11)* exp(9.9*10^(6)*x)*exp(sqrt(-1)*(1.95*10^6*z-2.98*10^15*t))

ex2 := (x,t,z) -> -2.82*10^(12)* exp(2*10^(6)*sqrt(-1)*x)*exp(sqrt(-1)*(1.95e*10^(6)*z-2.98*10^(15)*t));

And then tried the command:

implicitplot3d( ex1, x = -10..0, t = 0..10, z = 0..10, axes = boxed, style = patchcontour, scaling = constrained, shading =z);

But the boxes are entirely blank! What is the problem here?? It should be some kind of sine curve

Modelling solitons...

Hi guys, I'm currently having a lot of trouble with Maple and can't seem to get stuff to work. I have the task of solving and modelling the Klien Gordon equation, with a chosen potential. The equation I'm trying to solve is:

> KGE := diff(psi(x, t), x, x)-(diff(psi(x, t), t, t))-12*psi(x, t)^5+10*psi(x, t)^4+6*psi(x, t)^3-3*psi(x, t)^2-psi(x, t) = 0

I'm doing this by changing the pde into an ode via a transformation

>tr := {t = tau, x = c*tau+z, psi(x, t) = U(z)}

>ode1 := dchange(tr, KGE, [z, tau, U(z)])

>ode1 := collect(ode1, diff(U(z), z, z))

>c := 1/4

>ode2 := subs({U(z) = U, diff(U(z), z, z) = V(U)*(diff(V(U), U))}, ode1)

>sol := dsolve({ode2, V(0) = 0}, V(U))

>sol1:= sol[2]

>z := -c*t+x = int(1/rhs(sol2), U)

>solwave := psi(x, t) = solve(z, U)

I then checked if my solution, solwave actually solved the pde via pdetest(solwave,KGE) and it did. Hence this is what I took as one of the kinks. Although the kink solution looks hideous and I have no idea how to try and take the limit as x goes to infinity, as to show it tends to a vacuum of the potential. I've tried taking the limit but all Maple does is replace all the x with infinity signs...

I then tried animating it to see if it worked, but it just looks wrong, there are breaks within the curve and also very random spikes which I cannot explain at all..

I tried this code exactly for the Sine Gordon equation and it works perfectly, it just all goes wrong when I try to change the potential.

Here is a picture of the frame:

----------------------------------------------------------------------------------------------

Another issue I had was with dealing with the potential on it's own, every time I try inputting

>1/2(u^2)(1-u)^2(1+2u)^2

into maple it changes the expression into something completely different and wrong, it somehow comes out with an exponential of 8.. This is what I get:

(1/2)*(u(1-u))(1+2*u)^8

----------------------------------------------------------------------------------------------

I also have a problem integrating, I try and plug in a value, i.e.

>int(1/(x(1-x))(1+2*x), x)

but all this does is show me what I inputted but with a integral sign...

I'm very very new to Maple and have spent over a week doing this, but it just isn't working out at all :( Please help!!

Function "subs repeated"...

Hello,

I look for a maple function / or a piece of code which enable to do repeated substitutions. In other words, repeat substitutions until there is no more possible substitution.

How can I do to make repeated substitutions ?

Here a example I would like to solve with maple

Equation on which I would like to conduct variables changements:

 Code: eq := sin(psi[1](t)+gamma0(t))*cf+sin(gamma0(t)+theta[1](t)+psi[1](t))*mf-sin(gamma0(t))*hf-cos(gamma0(t))*lf+xp[1](t) = sin(psi[2](t)+gamma0(t))*cf+sin(gamma0(t)+theta[2](t)+psi[2](t))*mf-sin(gamma0(t))*hf-cos(gamma0(t))*lf+xp[2](t)

Definition of variables changement :

 Code: ChgtVariables:=psi[1](t)=Psi[1](t) - theta[1](t) + gamma[1](t),psi[2](t)=Psi[2](t) - theta[2](t) + gamma[2](t);psi[3](t)=Psi[3](t) - theta[3](t) + gamma[3](t),psi[4](t)=Psi[4](t) - theta[4](t) + gamma[4](t),theta[1](t)=Theta[1](t)+gamma[1](t),theta[2](t)=Theta[2](t)+gamma[2](t),theta[3](t)=Theta[3](t)+gamma[3](t),theta[4](t)=Theta[4](t)+gamma[4](t);

Application of subs function:

 Code: subs(ChgtVariables,eq);

The problem is that only one step of substitutions is conducted.

Here the expected result :

(sin(theta[1](t))-theta[2](t))*cf - (sin(gamma[1](t)-sin(gamma[2](t)))*mf  + xp[2](t) - xp[1](t) = 0

Thanks a lot for your hemp

Why Unexpected Lack of Output?...

Here is my Maple 16 code:

I expected to get outuput

a [a,b,c]

a [a,c,b]

But I get no output.

Why?

How do I fill an Array?...

Hi,

I'm trying to fill an Array but I don't know the correct syntax, and Maple help isn't much use.

How do I form an Array, A, which has 10 rows and 2 columns. Where one column is say the row number squared and the other column is the row number cubed.

So A would be:

[1 1]
[4 8]
[9 27] .....

Also, I'm using the square and cube numbers as an example. But is there a general format for doing this, whatever the values I want to put in the array are?

Thanks

Evaluation gone wrong...

Why does "eval(c, [b=1,l=1])" turn out to be "1" not "1/1+x"??? its driving me cracy. THX

 > restart
 >
 > a:=(1/(1+x/l))
 (1)
 > eval(a, [l=1])
 (2)
 > eval(a, [x=2,l=1])
 (3)
 > c:=(1/b(1+x/l))
 (4)
 > eval(c, [b=1,l=1])
 (5)
 >

Error when plotting spacecurve...

I have:

r:=t-><4cos2t+4sint,5cos3t+4cost,(sin3t+2sint)^2>

with(plots):

then I tried:

spacecurve(r(t), t = 0 .. 2*Pi, thickness = 2, color = black, axes = normal, labels = [x, y, z], numpoints = 150)

But I keep getting the error: Warning, unable to evalute the function to numeric values in the region.

But I thought <4cos2t+4sint, 5cos3t+4cost, (sin3t+2sint)^2> was defined on the region t=0 to 2Pi???

I'm using Maple 2015 if that helps.

Parametrical symmetry analysis ...

Iam a newbie, just two weeks into my 30-days trial. I have been exploring the symmetry aspect of PDEtools, gone through materials in the help section but still having problem in some of my analysis. The answer to the titled question "Symmetry analysis with parameters" was really helpful but did not work out for me when the parameters are more than one. Attached is a sample question.

sample_question.mw

Error in dsolve...

hello

i write this set of differential equation in maple and get the following error?

Can anyon help me with this?

thanks