Preben Alsholm

MaplePrimes Activity


These are replies submitted by Preben Alsholm

Or you could use `assuming`:

sum(sin(2*Pi*i/N), i = 1 .. N) assuming N::posint;
sum(sin(2*Pi*i/N)^2, i = 1 .. N) assuming N::posint;

You should try the version I suggested, where I did assume that your equation is 2nd order.

You cannot use D(epsilon) as D is differentiation of functions (procedures) in Maple. Thus D(sin) is cos.

D[1] means differentiation wrt. the first variable. Thus, if

f:= (x,y)-> x^2+3*y^3;

then D[1](f)(1,2)  is the partial derivative of f wrt. x and evaluated at the point (1,2).

You should try the version I suggested, where I did assume that your equation is 2nd order.

You cannot use D(epsilon) as D is differentiation of functions (procedures) in Maple. Thus D(sin) is cos.

D[1] means differentiation wrt. the first variable. Thus, if

f:= (x,y)-> x^2+3*y^3;

then D[1](f)(1,2)  is the partial derivative of f wrt. x and evaluated at the point (1,2).

In 1d-math input the right hand side of

2*(x^2+y^2)^2=25(x^2-y^2);

evaluates to 25, since it means the constant function 25 applied to the argument x^2-y^2.

Therefore the x-range needs to be larger to complete the picture:

plots:-implicitplot(2*(x^2+y^2)^2=25*(x^2-y^2),x=-4..4,y=-2..2,gridrefine=2);

 

In 1d-math input the right hand side of

2*(x^2+y^2)^2=25(x^2-y^2);

evaluates to 25, since it means the constant function 25 applied to the argument x^2-y^2.

Therefore the x-range needs to be larger to complete the picture:

plots:-implicitplot(2*(x^2+y^2)^2=25*(x^2-y^2),x=-4..4,y=-2..2,gridrefine=2);

 

@mattfred I rather doubt that you can get NextZero without upgrading. But there are other ways of finding zeros.

@mattfred I rather doubt that you can get NextZero without upgrading. But there are other ways of finding zeros.

@mattfred NextZero was not part of RootFinding in Maple 10, but was included in Maple 11 and later.

@mattfred NextZero was not part of RootFinding in Maple 10, but was included in Maple 11 and later.

@Alejandro Jakubi I notice that in your (interesting!) version y and z evaluate to the local x~, although it doesn't show up in your comment.

@Alejandro Jakubi I notice that in your (interesting!) version y and z evaluate to the local x~, although it doesn't show up in your comment.

@acer

Changing eval(L) to eval(L,2) keeps the assignment of z to y:

RemoveAllAssumptions:=proc() local A,Ls,L,Lc,indx;
    Ls:=map(convert,[anames('user')],string);
    L:=ListTools:-Enumerate([anames('user')]);
    Lc:=select(hastype,eval(L,2),`local`);
    if Lc=[] then NULL
    else
       indx:=map2(op,1,Lc);
       A:=[seq(Ls[i],i=indx)];
       unassign(op(map(parse,A)));
    end if
 end proc:


@acer

Changing eval(L) to eval(L,2) keeps the assignment of z to y:

RemoveAllAssumptions:=proc() local A,Ls,L,Lc,indx;
    Ls:=map(convert,[anames('user')],string);
    L:=ListTools:-Enumerate([anames('user')]);
    Lc:=select(hastype,eval(L,2),`local`);
    if Lc=[] then NULL
    else
       indx:=map2(op,1,Lc);
       A:=[seq(Ls[i],i=indx)];
       unassign(op(map(parse,A)));
    end if
 end proc:


What is k(x)?

@brian abraham It seems that I also still have problems. No clue why it worked several times yesterday.

I tried in Classic Worksheet Maple 14 a couple of times. There I saw no problem (using the original code). So it may be a Java problem.

First 215 216 217 218 219 220 221 Last Page 217 of 231