nm

11413 Reputation

20 Badges

13 years, 71 days

MaplePrimes Activity


These are replies submitted by nm

change "If" to "if" and add "()" around boolean expressions and add "*" between letters for multiplication (you also seem to have defind functions F and G but not using them).

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

F:= x-> (-c-a*x)/b;
G:= x-> (-d-e*x)/f;
if (-a/b = -e/f) then
   print (false)
else
   print (true);
end if;

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

does not Maple tell you on your system where the syntax errors are?

@Adri van der Meer 

thanks. But I am still a little confused.

according to help, it says on map, the following:
     "The map commands apply fcn to the operands or elements of expr."
my expression is this:

      lst:=[[12,8],[16,3]];

Now op(lst) returns the operands:

op(lst);
      [12,8] , [16,3]

So, there are two opeands, or 2 elements in the expression lst. So far so good.

Since map says the fcn is supposed to be applied automatically to each operand, why then map(igcd,lst) did not work?  Why one had to ask op for help first in extracting the operands? It seems to me that what op did, which is extracting the operands, is what map should have done?

 

 

@Andriy 

Yes, once the idea is clear, now one can find many ways to do it. Like this:

lst:=[[12,8],[16,3]]:
igcd~(op(lst));

 

@Carl Love 

nice. But what does the tilde in ~set:=  do?  I know that func~ mean to apply func element wise, but do not know what ~func is supposed to mean. I tried help, but too many "~" around. May be if there a link I can read on this.

thanks

@Alejandro Jakubi 

" Integration is an area where bugs are  being reported quite frequently, but has not been improved for many versions (years) already."

Why would that be? There are so many PhD math people out of work looking for a job. Can't Maple hire one or two or three of them and have them fix all these math bugs? very strange.

@JohnS 

sorry, not following you, so not able to know what to do, But I am sure someone who knows this better than me will be able to help. good luck.

@Carl Love 

Great. thanks. So may be this is a skill that needs to be acquired to know which command to use and which not to use each time, and it is not something one can reason about using logical steps.

For example, why would

convert(s,trig);
combine(%):

work, but not

convert(s,trig);
simplify(%);

and not

convert(s,trig);
convert(%,sinh);

and not

convert(s,trig);
convert(%,trigh);

and why simplify was needed to tell Maple that is same as

I mean, if this processes is based on trial and error method, then that is not a good way to go about it, but if there is a logic behind it, then that will be better.

computing the indefinite integral, then evaluating it on the intervals, then letting {p=1,n=1,q=1,m=1} in the result gives a divide by zero. Not -(1/2 I)/Pi. Just an observation, that is all.

restart;
assume(m::integer, n::integer, p::integer, q::integer,x::real):
h:=(x,m,n,p,q)->-(1/8*I)*(exp((2*I)*Pi*x)-1)^2*(exp(-(2*I)*Pi*x*(n-q+2))-exp(-(2*I)*Pi*x*(n-q+1)))/(Pi^3*x*(m-x)*(p-x)):
sol:=int(h(x, m, n, p, q), x):
sol:=subs(x=infinity,sol)-subs(x=-infinity,sol):
subs({p=1,n=1,q=1,m=1},sol);

     Error, numeric exception: division by zero

 

@acer 

strange that the good and bad ODE both give same analytic solution.

 

@Carl Love 

thanks. That is actually what I tried. it puts the 1/2 below the whole expression, which is not what I want. I wanted it to show like you showed it. I am using Maple 17.02 on windows 7, 64 bit. I use worksheet. Here it is:

@Carl Love 

Actually, I just tried it and it worked. No special reason. But simplify() works at that stage, so will edit my answer and replace convert to simplify.

 

I assumed you had a type  in (x+y)^2+(1)/x+y  and you meant  (x+y)^2+  1/(x+y), else the result you want to obtain do not follow....you might want to fix your question

@Carl Love 

Maple prime will not let me edit my own answer, it says "You do not have permission to delete this document". So, I'll see if it works here:

plot([f(x),diff(f(x),x)],x=-3..3,discont=true,legend=[typeset("f(x)"),typeset("f'(x)")]);


 

eq:=(3*x-y(x))*diff(y(x),x)=2*x;
dsolve(eq,y(x));

 

@Alejandro Jakubi 

"So, I prefer going through the menu"

Sure, and that is what I did. But this option is not in the menu. That was my point. I was looking for something like setup... or options.... in the menu, but did not see it. I am using 17.02, so may be your version has this in the menu. But now I'll remember to check all those icons from now on ;)

First 86 87 88 89 90 91 Page 88 of 91