vv

12453 Reputation

19 Badges

9 years, 286 days

MaplePrimes Activity


These are replies submitted by vv

 

restart;

The continuity is valid for the multi-function  p -> {z1(p), z2(p),...}
p being the parameter. The dificulty is to obtain continuous selections, which impose switching from one branch to another.

 

Let's consider the simplest example of the equation

z^2 - p = 0;

z^2-p = 0

(1)

If p follows a path  t -> p(t),  the problem is to find continuous  z1(t), z2(t).
This does not work:

z1:=sqrt(p(t));

p(t)^(1/2)

(2)

z2:=-sqrt(p(t));

-p(t)^(1/2)

(3)

p:=t -> exp(I*t);

proc (t) options operator, arrow; exp(I*t) end proc

(4)

with(plots):
pl1:=plots:-complexplot(z1, t = 0 .. 3*Pi/2, color=blue,thickness=3):
pl2:=plots:-complexplot(z2, t = 0 .. 3*Pi/2, color=red,thickness=3):
display(pl1,pl2);   # z1(t) and z2(t) are discontinuous.

 

# But dsolve can help, if used numerically:
# We differentiate in the equation:

Z1 := dsolve({2*Z(t)*diff(Z(t),t)=diff(p(t),t), Z(0)=1}, numeric);
Z2 := dsolve({2*Z(t)*diff(Z(t),t)=diff(p(t),t), Z(0)=-1}, numeric);
PL1 := odeplot(Z1, [Re(Z(t)),Im(Z(t))], t=0..3*Pi/2, color=blue,thickness=3):
PL2 := odeplot(Z2, [Re(Z(t)),Im(Z(t))], t=0..3*Pi/2, color=red,thickness=3):
display(PL1,PL2);  # now, Z1, Z2 are continuous!

 

 

 

 

@cduston 

I think that you miss the general picture. It is not easy to compute the residue if the order of the pole is not numeric.
In this case a numerical computation is not possible (actually the presence of any parameter makes a numerical integration impossible).
And we do not have an algorithm (the residue command simply uses (truncated)  series.
E.g. how would you compute  residue( exp(sin(z^2 - z^m)) / sin(z^n), z=0)  ? You will have to consider many possibilities for m and n.

(Not to mention that even in your example, n must be an integer, otherwise z=0 cannot be a pole).

@Rouben Rostamian  

The solution sol is actually a distribution. To obtain a classical one, f must be of course subject to some restrictions (otherwise e.g. the integral could diverge).

@Kaio 

Change is confused because you use the same symbol s in different contexts.
You can use

IntegrationTools:-Change(int((diff(f(s), s))^2, s = L .. ss), s = S*L, S);
    

and then
eval(%, ss=s);

@Kitonum 

I don't understand how you have obtained  `-`(a,b) = - a
It should be a-b, unless you have something like:

local `-`;
`-`:= (x,y) -> :-`-`(x);

 

@Magma 

1. Yes, all C[i,j] < 2^53. But if you are interested only in the positiveness of A^k this restriction can be relaxed.

2. If you want A^k to have positive entries, why do you need GF(2,n)? 
When I have mentioned Modular, I meant the use of a very large modulus m i.e. working in Zm. The role of m is similar here with the role of 2^53 for floats.
If I understand correctly your problem, the use of floats should be enough.

@Magma 

Search for randperm or type

?randperm

Or, simply type

combinat[randperm](5);

You will find it.

So, you just want some "cosmetic" rearrangements of the terms. Unfortunately (for some users) in Maple it's very difficult to do this; (and sometimes only using inert functions or Typesetting). Most users are happy to see the mathematical answers; the final aspect (e.g. for publication) is done by hand and is anyway very subjective.
But you already know the answer. Why not simply check it versus Maple's answer?  (Your answer uses different names for some constants).

@Carl Love 

Using dsolve here does not seem to be very useful. It would be nice to construct continuous selections from the solutions obtained by solve, but it is not the case. This is possible using the Draghilev's method (for systems) which uses indeed ODEs, or solving the ODE starting from the equation (if possible), not from the solutions provided by solve.

Take for instance a discontinuous function (like one given by solve).

f:=piecewise(x<1,x^2, 3-x^2):

s:=dsolve( {diff(Y(x),x)=diff(f,x), Y(0)=0}, numeric):

plots:-odeplot(s, [x,Y(x)],x=0..2);

 

plot(f, x=0..2);

 

 

 

It is clear that for x>1 the result is continuous but completely wrong.

 

Nice, vote up! A shorter version:

restart;

g :=min((3+((x-y)^(2))/(10)+(abs(x+y))/(sqrt(2))),(-abs(x-y)+(7)/(sqrt(2))));

min(-abs(x-y)+(7/2)*2^(1/2), 3+(1/10)*(x-y)^2+(1/2)*abs(x+y)*2^(1/2))

(1)

J:=Int(Heaviside(g)*exp((-x^2-y^2)*(1/2))/(2*Pi), y = -infinity .. infinity, x = -infinity .. infinity):
J = `?`;

Int((1/2)*Heaviside(min(-abs(x-y)+(7/2)*2^(1/2), 3+(1/10)*(x-y)^2+(1/2)*abs(x+y)*2^(1/2)))*exp(-(1/2)*x^2-(1/2)*y^2)/Pi, y = -infinity .. infinity, x = -infinity .. infinity) = `?`

(2)

# the terms (x-y) and (x+y) suggest changing frame [0, x, y]into frame [O, u, v] by a rotation of angle Pi/2
uv2xy := [x = (1/2)*sqrt(2)*(u+v), y = (1/2)*sqrt(2)*(u-v)]

[x = (1/2)*2^(1/2)*(u+v), y = (1/2)*2^(1/2)*(u-v)]

(3)

f := exp((-x^2-y^2)*(1/2))/(2*Pi);

(1/2)*exp(-(1/2)*x^2-(1/2)*y^2)/Pi

(4)

F:=eval(f, uv2xy);

(1/2)*exp(-(1/4)*(u+v)^2-(1/4)*(u-v)^2)/Pi

(5)

G := simplify(eval(g, uv2xy));

min(-(1/2)*2^(1/2)*(2*abs(v)-7), 3+(1/5)*v^2+abs(u))

(6)

#  G >= 0  <==>  abs(v) <= 7/2   (obvious), so

J = int(F, u=-infinity .. infinity, v=-7/2..7/2);

Int((1/2)*Heaviside(min(-abs(x-y)+(7/2)*2^(1/2), 3+(1/10)*(x-y)^2+(1/2)*abs(x+y)*2^(1/2)))*exp(-(1/2)*x^2-(1/2)*y^2)/Pi, y = -infinity .. infinity, x = -infinity .. infinity) = erf((7/4)*2^(1/2))

(7)

 

@tapish2502

Your worksheet is in Maple 2017.3.
In Maple 2018.2 (which I use) it works.

@ecterrab 

A pdetest should not be necessary for u(x,y,t) if u(y,t) is verified. Anyway, here it is:

pde := diff(u(x, y, t), t)-1/2*(diff(u(x, y, t), y, y))-A*sin(M*x-t) = 0;
bc[1] := u(x, 0, t) = 0;
bc[2] := u(x, 10, t) = A*sin(M*x-t);
sys := [pde, bc[1], bc[2]];

SYS:=eval(sys, u = ((x,y,t) -> U(y,t)));
SOL:=pdsolve(SYS);

sol:= eval(SOL, U = ((y,t) -> u(x,y,t)));
pdetest(sol,sys);

@snpa 

You cannot do this mathematically.
E.g.  you may obtain an antiderivative (=indefinite integral) as  ln(x) + c1   or  ln(2*x) + c2.
Which one of c1, c2  should be 0?

Of course, you may use definite integrals.

@Carl Love 

It is worth mentioning that for a large k (say >1000) it's practically impossible to prove the primality.
We'll have to be happy with the "probably prime" status.

@Vortex 

For simple k,z as above it's easy to compute EllipticF(infinity, k) by hand, splitting the integral and using changes of variables.

First 55 56 57 58 59 60 61 Last Page 57 of 166