vv

13977 Reputation

20 Badges

10 years, 38 days

MaplePrimes Activity


These are answers submitted by vv

 

For a 3d visualization of a Riemann surface we must actualy plot Re(f(x+I*y))  or Im(f(x+I*y))
(the other component could be encoded as color).
Note that complexplot3d can be used, but I present here the plot3d version.
Here f is a branch of the complex function.
If we know the analytical expressions of the branches, the plot is simple.

 

 

 # w = f(z) = sqrt(z)

plot3d([
seq([x, y, k*Re(sqrt(x+I*y))], k=[-1,1])
]  , x=-1..1, y=-1.. 1, labels=[x,y,Rew]);

 

# The "cylindrical" version (as in the wiki article):

plot3d([
seq([x, y, k*Re(sqrt(x+I*y))], k=[-1,1])
]  , x=-1..1, y=-sqrt(1-x^2).. sqrt(1-x^2), labels=[x,y,Rew]);

 

 

 

# w = f(z) = ln(z)

plot3d([
seq([x, y, Im(ln(x+I*y))+2*n*Pi], n=0..4)
]  , x=-1..1, y=-1..1, labels=[x,y,Imw]);

 

# The cylindrical version

plot3d([
seq([x, y, Im(ln(x+I*y))+2*n*Pi], n=0..4)
]  , x=-1..1, y=-sqrt(1-x^2).. sqrt(1-x^2), labels=[x,y,Imw]);

 

 

A possible favorable interpretation of the fact that odetest gives 0 for a _Cnn solution of the ODE and <>0 for another constant:


1. In the case of _Cnn  the 0 result says that the solution is correct, but without mentioning that the intervals of validity must be found.
2. In the case of another constant (symbolic or numeric) the result of odetest allows to effectively find the correct interval(s) where the solution is valid.

It would be interesting to know whether this interpretation is correct (i.e. the behavior is intended) or we have a simple bug here.

 

It's an interesting catch. Vote up!
It seems that the _Cnn  constants are treated in a special manner by odetest.
So, odetest  will return   0  for   sin(sqrt(x) + _C123) ,  but nonzero   for other constants (numeric or symbolic).

I am not able to explain this behavior, but the corect result for odetest should be the nonzero one!  Because sin(sqrt(x)+C/2)  is a solution (assuming x>=0)  only for  sqrt(x)+C/2  in [-Pi/2, Pi/2]  mod 2Pi  
which is equivalent to cos(sqrt(x)+C/2) - abs( cos(sqrt(x)+C/2)  ) = 0  given by odetest.

 

You cannot replace _Z in a RootOf unless you also insert the new variable (otherwise a syntax error appears).
So,   RootOf(f(_Z))  -->  RootOf(f(n),n)

It it easy to do this, but it's useless because RootOf(f(n),n)  will be simplified automatically to the _Z version.

You are not allowed to expand like this. Actually the double sum, triple sum etc are all infinite, so the "resulting series" would be 1 - oo + oo - oo +  ...

As shown in another answer the product is "telescoping", hence easy to compute.
For other situations one may use the fact that for 0 < a(n)<1,
product(1 - a(n), n=1..infinity) = 0   iff   sum(a(n), n=1..infinity) = infinity. 

There is probably a copy&paste problem: args(k) should be args[k]
(or better  l := [args]).

You also have a syntax error in f()  [a ":" after proc()  not accepted in 1d].

But the main problem is that Object||n  are global symbols not the same with your local Object1,...

 

sys:=
[3*v^2-v*t*(v^2+3)-3*w^2+w*t*(w^2+3),v*(p*v^2+3)/(3*v^2+1)-w*(p*w^2+3)/(3*w^2+1),2*t-v*(p*v^2+3)/(3*v^2+1)-w*(p*w^2+3)/(3*w^2+1)]:
S:=unapply(sys,t):
P:=t -> eval(p,fsolve(S(t))):
plot(P, 0..2);

SolveTools:-SemiAlgebraic and some other commands in SolveTools (which are called by solve for inequalities) do not like infinity (==> errors).  Actually infinity is never needed here.

Edit. Here is a short procedure to remove the useless infinities:

CleanInfty:=proc(L::{list,set}(relation))
map(
  proc(r) local u; 
    if not has(r,infinity) then return r fi;
    u:=eval( r, (indets(r)=~0) );
    if is(u) then u:=NULL else u:=0<0 fi;
  end, L)
end;

Example:

S:={x<>10, -infinity<x , x<infinity, -infinity<y, y<infinity, x>-2}:
solve(CleanInfty(S), {x,y});
#SolveTools:-SemiAlgebraic(S,{x,y});

      {y = y, 10 < x},  {y = y, -2 < x, x < 10}

 

int((1-(-1)^floor(u))/(2*u^2), u = 1 .. X) assuming X>3:
limit(%, X=infinity);

          ln(2)

binomial(m,k)*a^(m-k)

The numerical integration routine for

 

is fooled by the fact that the integrand is 0 in the intervals [2k, 2k+1)  and stops the summation too early.


 

When you approximate a function using a series expansion you must consider
1. The order of the expansion
2. The precision needed for the wanted accuracy.

 

You cannot choose these elements at random!

   

restart;

f:=(Z,r,p,n,i) ->
hypergeom([3/2-n-2*i, 1/2], [3/2], Z^2/(Z^2+p^2+r^2)); #Z := 10; r := 4,  p=-2..2, n=3, i=0..infinity

proc (Z, r, p, n, i) options operator, arrow; hypergeom([3/2-n-2*i, 1/2], [3/2], Z^2/(Z^2+p^2+r^2)) end proc

(1)

g:=(Z,r,p,n,i,qmax) ->    # approx for f
Sum(pochhammer(3/2-n-2*i, q)*(Z^2)^q/(factorial(q)*(1+2*q)*(Z^2+p^2+r^2)^q), q = 0 .. qmax);

proc (Z, r, p, n, i, qmax) options operator, arrow; Sum(pochhammer(3/2-n-2*i, q)*(Z^2)^q/(factorial(q)*(1+2*q)*(Z^2+p^2+r^2)^q), q = 0 .. qmax) end proc

(2)

f(10,4,1,3,10):   evalf[20](%);
g(10,4,1,3,10,30):evalf[20](%);

.20321659074231552810

 

.20321659074213582777

(3)

f(10,4,1,3,15):   evalf[20](%);
g(10,4,1,3,15,30):evalf[20](%);

.16879768595171717449

 

.16956416260616846521

(4)

f(10,4,1,3,25):   evalf[20](%);
g(10,4,1,3,25,30):evalf[20](%);

.13261487452222538864

 

9676581243.0583101579

(5)

f(10,4,1,3,25):   evalf[20](%);
g(10,4,1,3,25,50):evalf[10](%);

.13261487452222538864

 

.2753062248

(6)

f(10,4,1,3,25):   evalf[20](%);
g(10,4,1,3,25,50):evalf[20](%);

.13261487452222538864

 

.13264090926789665225

(7)

 

 

map(min, M, 20);

or maybe

map[inplace](min, M, 20);

 

You have used distinct strange names in the two files:

`#mover(mi("&Xi;"),mo("&uminus0;"))`
and
`#mover(mi("&Xi;",fontstyle = "normal"),mo("&uminus0;"))`;

I'd suggest to avoid in the future such names in files (you cannot see them properly in 2d input!).
The fix is simple:
 

restart;
read "sai.m";
`#mover(mi("&Xi;"),mo("&uminus0;"))`:
`#mover(mi("&Xi;",fontstyle = "normal"),mo("&uminus0;"))`:=%:
read "TKtm.m";
TKtm;

      0.106923339809255e-6*(diff(tau[1](t), t))^2

printlevel := 2; 
Equation := 4;
for i from 0 to Equation do 
for j from 0 to Equation do 
  C[i,j]:=coeff(coeff(H1,x,i),y,j)
end do end do;

 

First 67 68 69 70 71 72 73 Last Page 69 of 120