Items tagged with syntax



Is there any syntax highlighting for the "code edit region"?



I have some numerical data, which are very accurate (500 digits) and want to copy them on a text file.

For pratical reason I would like the procedure writefile to write just 20 digits figures: which is the right syntax to use?


As a piece of work, I am required to define a function, and plot it in 3d.

The problem is regarding the 'gamma' function. We have to define it as:

myGamma:= x->int(exp(-t)*t^(x-1),t=0..infinity);

Then a later part of the questions asks you to define phi as the following function:



at first I have to admit, that I'm totaly new to maple and have only few experience with the programm.


That's the problem. I've got an old maple-code which I want to rewrite in the 2d-Math-syntax. In the code there are a lot of variables of the type "numerical integer" with a form like




--> with index in the name

It's a code for a physical-/chemical- process so the...

I have 91 points and to take the sum of the y-coordinates, I do



But if I want to take the sum of the points on just the even indeces i.e k=2, 4, 6, 8, 10...etc, I try to do


but Maple gives me an error. I'm doing something wrong here. Help me please me fix the syntax error!!

Hi all,

I am now helping with the first year maple session in my university. Recently, some of the student are learning both 1-d and 2-d input.

Now we have something like this:


Is this some sort of bug?

I know it has something to do with the 1-d or 2-d or math input, but in short, that's what happens.


dsolve event handling looks like a great tool, but I can't understand how it works and it's not sufficiently popular to google my way to examples online. There are two things I'd like to do: 1) interrupt the computation once some variable leaves a certain range, 2) interrupt the computation if the solver gets stuck into an infinite loop. Both are documented in the help, but I don't understand it. Suggestions welcome, thanks!

I'm new to Maple and find some aspects of the syntax and UI confusing.  The manual isn't much help.  In the case of "e"...

1) If I type in:    evalf(e^1,10) by just typing the letter e from the keyboard, I get back the letter e.  But if I go into the palette and select the expression e^a, and put it in evalf that way (for a=1) I get back a numerical value for e.  I can see that one of these e's is italicized and one isn't...???


I'm trying to solve a nonlinear diff. equation numerically using (dsolve) but it gives me an

Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging
my code is:
ode:= diff(f(x),x,x,x)+f(x)*diff(f(x),x,x)+B(1-(diff(f(x),x))^2=0   # f'''+f*f''+B(1-(f')2)=0
bcs:= f(0)=0,diff(f(x),x)(0)=0,diff(f(x),x)(5)=1                            # f(0)=0, f'(0)=0,f'(5)=1

Why isn't DEplot working when my syntax is correct? The equation will plot in one worksheet but not in another?

I will include the work i did, also near the end of the worksheet, there are word descriptions of the questions i did.

Im stuck on the last 3 questions: question 14, 15 and 16. I cant seem to find the values i need for my Ce^-kx

I tried diff it but my syntax is preventing me from going farther.


All help will be appreciated! i will include the original lab for more clarification!

local i;
t[0]:=tinit;x[0]:=xinit; y[0]:=yinit; 
for i from 1 to n do 
t[i]:= evalf(tinit+h);
x[i]:= evalf(xinit+h*f(tinit,xinit,yinit));
y[i]:=evalf(yinit+h*g(tinit,xinit,yinit));  od;  end;


When i tried to execute maple dispayed "unable to parse" but i can't find out where the syntax error is.  "local" was the word with the red dotted line box around...

the problem is as follows:

if((a>0) and (b>0) then (c:=2*a, d:=3b, e:=9b.....)

elif ((a<0) and (b>0)) then (c:=.., d:=..., e:=....)



else c:=..., d:=..., e:=...

end if


i know i have the if conditions right, but not sure about sequential conditions..what is the correct syntax for this??

I'm getting errors like parse errors, unterminated if, and invalid sequence (on the :=)...

I have recently upgraded to Maple 14, and I can no longer cut and paste syntax between components when I am editing their properties.  Is this normal, or do I have to adjust a setting?



This first example command

solve({(x-1)/(2*(x-2)) = 2/(x^2-4)+2*(1/2)}, {x})

will be x=-1.

The second example command

solve({(x-1)/(2*(x-2)) = 2/(x^2-4)+1/2}, {x})

won't give me any answer. I know that there is no solution (in sense x=2 for example) for the second math problem.

How can I tell mapple to show me that x=2 ? (even if it's not inside the definition sum R)

Or, if the simplyfication of the equation would be something like x = x + 2 ...

First 7 8 9 10 Page 9 of 10