Items tagged with syntax


How i need to write 

>teksbiasa:=`Hello! Bob`;

in button Action When Clicked at simple graphical interface instead of


because when i enter Hello! Bob in %txtTeksBiasa, system pop up 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~=]]

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 !!



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  


 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?


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

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: 

as you can see it has spikes.. and breaks in the curve as well


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


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:





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!! 


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: 

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 :

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:


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

Here is my Maple 16 code:

 I expected to get outuput

a [a,b,c]

a [a,c,b]

But I get no output.






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?


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






eval(a, [l=1])



eval(a, [x=2,l=1])






eval(c, [b=1,l=1])





I have:




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. 





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

Can anyon help me with this?





I've got this huge chunk of code which leads to an optimiazation at the very last line (Bestangles:=minimize(maximize()-minimize))). This minization is taking a very long time (havent solved it yet) and I would very much like to reduce that time. As I've understood maple does optimization by differentiating and then finding all extremes and comparing. Would this mean that since I minimize and optimize within a minimization command, it differentiates a ton of times? And if this is the case, can I somehow do the differentiation beforehand, since it is the same function being differentiate all the time? Or is there some other way I can improve the code? 
Thanks alot!

Heres the full code:

So I am trying to apply the Optimization function to a rather complicated problem I am currently working on, and having some trouble getting maple to cooporate. This is the part of the code that is giving me the error, with error included. All of the variables imputtet when calling OptimizeSpring are constants. If there is any other details I should add, please say so and I will add them promptly :) Thanks alot!
Maple problem

I suspect that it might be related to this suggestion, but I am not sure how to apply it

I would like to plot the following singular double integral, but I cannot due to singularities...


where x>0, t=0.2 and m=0.2.

I defined f(y) function as f:=y->exp(-(y-4.68)^2/0.4):

I attached my file:

Thank you !

There is an error in my implementation as follow:

"Error, (in unknown) incorrect syntax in parse: `*` unexpected (near 1st character of parsed string)"

What I have to do to remove this error?

3 4 5 6 7 8 9 Page 5 of 10