vv

12453 Reputation

19 Badges

9 years, 286 days

MaplePrimes Activity


These are answers submitted by vv

It seems that you want to keep the derivatives as they are.
(You have posted only an image instead of code, and without the desired answer).

 

Maybe you want something like this:

 

 

Ex:= beta(t)*zeta(t) +  zeta(t)*diff(theta(t),t)^2 + theta(t)*5*diff(zeta(t),t,t) + theta(t)^4*diff(theta(t),t);

beta(t)*zeta(t)+zeta(t)*(diff(theta(t), t))^2+5*theta(t)*(diff(diff(zeta(t), t), t))+theta(t)^4*(diff(theta(t), t))

(1)

dd:=[indets(Ex,specfunc(diff) )[]]:

DD:=[seq(ddd[i],i=1..nops(dd))]:

EX:=eval(Ex, dd=~DD):

F:= u -> `if`(limit(eval(u, [beta(t)=Z, zeta(t)=Z,theta(t)=Z])/Z,Z=0)=0, 0, u):

Result:=eval(map(F, EX), DD=~dd);

zeta(t)*(diff(theta(t), t))^2+5*theta(t)*(diff(diff(zeta(t), t), t))

(2)

A bug in sum  occurs for the inner sum.

x:=3:
sum(binomial(x,j)*(1/3)^j*(2/3)^(x-j), j = i+1 .. x);

       1

Even for a simpler sum:

sum(binomial(10,j), j = k .. 10);
                            1024

Using infolevel[sum]:=5;  it appears that the bug is in the summation using hypergeometric functions.

 

 

 

Just replace rotate with 'rotate'.

Your n-dimensional integral

J:= n -> int(add(x[i],i=1..n)^2, [seq(x[i]=0..1,i=1..n)]);

has the exact value

Jexact:= n -> n*(3*n + 1)/12;

seq('J'(n)=Jexact(n), n=1..20);
J(1) = 1/3, J(2) = 7/6, J(3) = 5/2, J(4) = 13/3, J(5) = 20/3, J(6) = 19/2, J(7) = 77/6, J(8) = 50/3, J(9) = 21, J(10) = 155/6, J(11) = 187/6, J(12) = 37, J(13) = 130/3, J(14) = 301/6, J(15) = 115/2, J(16) = 196/3, J(17) = 221/3, J(18) = 165/2, J(19) = 551/6, J(20) = 305/3

(Just in case you want to test the Monte Carlo method for a higher n.)

restart;
J:=Int((-5*ln(x)^4*Pi^4-20*ln(x)^2*Pi^4-8*Pi^4+120*MeijerG([[0, 0], [1, 1, 1]], [[0, 0, 0, 0, 0], []], x^Pi))/(120*Pi^4*(-1+x)^2), x = 4*(1/10) .. 6*(1/10)):
convert(J,Sum):
evalf[15](%);

                      -0.00555168769360751

It's a pity that fsolve fails for the equation erf(x) = 1 - 10^(-20)  when Digits = 5000.
It works when Digits = 4000.
The equation can be solved via

Digits:=5000:
x1:=RootFinding:-Analytic(erf(x) = 1 - 10^(-20), 6-I/10 .. 7+I/10);

or even directly with the good old Newton's method:

restart;
y1:=1-10^(-20):
Digits:=5100:
a:=6.;h:=1. : N:=0:
K:=evalf(sqrt(Pi)/2):
while  abs(h)>1e-5000 do
h:=(erf(a)-y1)*exp(a^2)*K;
a:=a-h:  N:=N+1;
od:  N; a;


 

If solve produces a RootOf result, this usually contains extraneous values (roots).
Let's consider a simple equation:  arctan(x) = x/2.
It has exactly three real roots.
 
S:=solve(arctan(x)=x/2,x); # allsolutions ==>the same
                 S := 2 RootOf(-tan(_Z) + 2 _Z)
allvalues(%);
          0, 2 RootOf(-tan(_Z) + 2 _Z, 1.165561185),
            2 RootOf(-tan(_Z) + 2 _Z, -1.165561185)
_ValuesMayBeLost;
                              true
 
# The original equation has exactly 3 real roots, but the RootOf represents infinitely many values
 
I think that the reason for this behavior is that RootOf is used mainly with meromorphic functions (trying to avoid branches of analytic functions).
 
# The presence of O(1) is a bug.
# Using the definition for gamma, the limit equals:

aG := -x*gamma - Pi/2 + sum(x/n - arctan(x/n), n=1..infinity);


# Note that the series converges, so the limit exists.
# For x=1 we have
evalf(eval( aG = argument(GAMMA(I*x)), x=1 ));

                  -1.872436648 = -1.872436647
# The general proof follows from the Weierstrass product formula for GAMMA
# (which seems to be unknown to Maple).
 

Maple computes the limit directly:

a:=sqrt(x): b:=a:
to 3 do b:=sqrt(x+b) od;
limit(b-a, x=infinity);

         1/2

The tutor is designed for beginners. It works for simple cases. Try it e.g. for two nested square roots and it will work.


 

K:=p -> int(-87.20805639*(2.*(p^2+16.703569+(10.0-q)^2)^2+66.814276*p^2)/(sqrt((p^2+16.703569+(10.0-q)^2)^2-66.814276*p^2)*((p^2+16.703569+(10.0-q)^2)^4-133.628552*(p^2+16.703569+(10.0-q)^2)^2*p^2+4464.147477*p^4)), q = 0 .. infinity, numeric):

P:=Vector([seq(0..3,0.1)]):
KP:=K~(P):

KS:=Statistics:-Fit(add(a[i]*t^i,i=0..3)/add(b[i]*t^i,i=0..2),P,KP,t);

(-HFloat(1.4137040554071549e-5)*t^3+HFloat(4.5702354725850965e-5)*t^2-HFloat(1.0413678584150455e-4)*t+HFloat(2.869604162367296e-4))/(-HFloat(1.1149123827437216e-4)*t^2+HFloat(7.067538715108646e-4)*t-HFloat(0.0011173051783073343))

(1)

plot([K(t),KS],t=0..3);

 

# It will be your task to find a better model in a desired interval.
# Note that K has singularities (i,e. KK is not defined everywhere).

 

 

Note that I simplified your KK supposing p is real.
 

Download K.mw

for i to 3 do
  assign(f[i], x -> P(i,1,1,x))
od;

Edit. Ignore this, it's wrong!

 

If you use

ln(x) + ln(y) = ln(x y) 

for random complex numbers, the probability to be correct is  75%.
[supposing uniform distribution].

 

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.

 

First 57 58 59 60 61 62 63 Last Page 59 of 111