Preben Alsholm

MaplePrimes Activity


These are replies submitted by Preben Alsholm

@cloz54 Cutting and pasting your module definition into my version of Notepad and saving it as a textfile. Reading it into Maple 18 I got

                     "Est?n en perspectiva"
                      "Spain means Espa?"
Actually the question marks appeared as squares.

I also tried executing the moduledefinition in Maple, saving it using
save TestModule,"F:/MapleDiverse/MaplePrimes/testmod.mpl";

and then reading it into a fresh worksheet:

read("F:/MapleDiverse/MaplePrimes/testmod.mpl");

Then I got:
with(TestModule):
test();
                     "Están en perspectiva"
                      "Spain means España"
                               0


@Axel Vogt I tried the following. All had the same result on my computer:

print("Están en perspectiva");
p:=proc() print("Están en perspectiva") end proc;
p();
m:=module() export p; p:=proc() print("Están en perspectiva") end proc; end module;
m:-p();
Q:=proc() module() export p; p:=proc() print("Están en perspectiva") end proc; end module end proc;
m:=Q();
m:-p();

I tried various interpretations of what you are saying, but have not encountered any problem. Could you give us the full code necessary for exhibiting this behavior?

@love maths You could try this:

This illustrates that the elements affected by Average are the elements inside a square:
plots:-implicitplot(abs(x-N/2)+abs(y-N/2)-N/4=0,x=0..N,y=0..N,rangeasview,gridrefine=2);
#That square has vertices (N/4,N/2),(N/2,N/4),(N/2,3*N/4),(3*N/4,N/2), which is confirmed by F which returns 0 at those points:
F(N/4,N/2),F(N/2,N/4),F(N/2,3*N/4),F(3*N/4,N/2);
#A little experimentation:
A:=curry(Average,F);
seq((A@@i)(f0),i=0..5);
#Guess: The sequence converges to a matrix of ones.
#This guess is confirmed by (but certainly not proved by)
f:=f0: f1:=Matrix(N,fill=1):
for i from 1 to 500 while LinearAlgebra:-Norm(f-f1)>1e-12 do f:=A(f) end do:
i-1;
evalf[12](f);


@mablecat I repeated the commands and made sure that I used Maple 17. Still no problem:

interface(version);
Standard Worksheet Interface, Maple 17.02, Windows 7, September 5 2013 Build ID 872941


@Carl Love I was surprised that the square brackets you have after D in the intital conditions actually work.
However, I corrected that and used your system:

restart;
sys:={diff(a[1](t),t$2) = -a[1](t), diff(a[2](t),t$2) = -a[2](t),a[1](0)=1, a[2](0)=0, D(a[1])(0)=0, D(a[2])(0)=1};
#Analytical solution
dsolve(sys);
#Info on events:
?dsolve,events
#Example of using events. These two events will trigger when a[i](t) = 0 i=1..2. The discrete variables b1 and b2 will be taking the values for t at those times.
sysE:=sys union {b1(0)=0,b2(0)=0};
SolE:=dsolve(sysE,numeric,discrete_variables=[b1(t)::float,b2(t)::float],events=[[a[1](t),b1(t)=t],[a[2](t),b2(t)=t]]);
SolE(6);
plots:-odeplot(SolE,[[t,b1(t)],[t,b2(t)]],0..6,thickness=2);


I shall try to see if I can upload anything. So here is an extremely short mw-file.

Well, I cannot do it either. MaplePrimes has temporary problems.

@sharena2 Well, you do need one more condition. Not necessarily the one I used.
If you have tried the same problem earlier and it was OK then you ought to show us that "same" problem:
It couldn't be the same, could it?

@mehdi jafari This is clearly a bug in int. The infinite series found is incorrect. However, Maple correctly finds the sum of the incorrect series.

restart;
A:=Int(cosh(t)/(cosh((17/15)*t)+cosh(t)), t = 0 .. infinity);
evalf(A);
infolevel[int]:=5:
#The "successful" method is meijerg. int(...., method=NoMeijerg) returns unevaluated.
S:=value(A);
evalf(S);
value(S);
evalf(%);



@mehdi jafari You are actually doing numerical integration in both cases here. After having used simplify int returns unevaluated. After that evalf is applied to the unevaluated integral and Maple uses numerical integration.
Try removing evalf from evalf(int(f,t=0..infinity)) and you will see.

 

After having corrected for the exp problem you do get a solution using fsolve:

fsolve({x3,x4},{T,t1});

@AndrewG diff acts the usual mathematical way. The independent variable has to be a name, Expressions like phi(t) or (worse) diff(phi(t),t),t) are not names.
The Physics package, however, has an extended diff procedure. So instead of what I did you could do:

with(Physics,diff):
diff(diff(L,diff(phi(t),t)),t)-diff(L,phi(t))=0;


@lemelinm You had infinity as the upper limit of the integral in the beginning. Later you replace it by L.
So I suppose your functions are 0 outside the interval 0..L ?

@dena Why don't you use the thick green arrow in the editor's menu panel. It is the last icon. That way you can upload the worksheet for everybody to see.

 

 

First 147 148 149 150 151 152 153 Last Page 149 of 231