vv

13922 Reputation

20 Badges

10 years, 8 days

MaplePrimes Activity


These are replies submitted by vv

@lyakhovda 

If the rank is 6, then there will be 29-6=23 free variables, so {Z20,...,Z28} are not enough.
And you cannot know whether e.g. Z24 can be a free variable because the system could contain the equation Z24 = 7.

Yes, Maple has big problems with oscillating integrals.

J := int(abs(cos(1/t)), t = 0 .. 1);
is wrong (undefined).
And it is a challenge to compute J with 10 (or 30) digits in Maple!

 

But the angle at x=a is not  arctan(|f'(a) - g'(a)|). It should be  | arctan(f'(a)) - arctan(g'(a)) |.

PS. I doubt that a beginner who writes cosx^2  will grasp map2, ~, @

@Carl Love 

@wyoum 

Try:

subs( Physics:-`*` = :-`.`, expr );

subs( Physics:-`.` = :-`.`, expr );

 

@wyoum 
If you are interested in FP groups, the Physics package will be anyway not enough.
With GroupTheory you will be able to simplify much better.
Example:

with(GroupTheory):
G := < a, b | a^2 = 1, b^4 = 1, (a.b)^2 = 1 >:
E:=Subgroup([[]],G);  # trivial subgroup
Factor( a.b.a.b^3 .a.b.a, E);
            
[1,b]

So, in the group G one has:    a.b.a.b^3 .a.b.a = b

 

I think I have made an error while writing my answer. Trying to detete it and reload the worksheet, I think I have deleted  Markiyan Hirnyk' s answer.
Sorry, Markiyan, please repost the answer.


 

 

Jn:=-(1/n)*Int( y^(a+n)*(1-y)^b,y=0..1);

-(Int(y^(a+n)*(1-y)^b, y = 0 .. 1))/n

(2)

jn:=value(Jn);

-GAMMA(b+1)*GAMMA(a+n+1)/(n*GAMMA(a+b+n+2))

(3)

simplify( sum(jn, n=1..infinity) ) assuming a>-1,b>-1;

-(Psi(a+b+2)*b^2-Psi(3+b)*b^2+3*b*Psi(a+b+2)-3*Psi(3+b)*b+2*Psi(a+b+2)-2*Psi(3+b)+2*b+3)*GAMMA(a+1)*GAMMA(b+1)/((b^2+3*b+2)*GAMMA(a+b+2))

(4)

 

### For the original integral

ans:= GAMMA(phi) / (GAMMA(mu*phi)*GAMMA((1-mu)*phi) )  * eval(%, [a = mu*phi-1, b = (1-mu)*phi-1]);

-GAMMA(phi)*(Psi(mu*phi+(1-mu)*phi)*((1-mu)*phi-1)^2-Psi(2+(1-mu)*phi)*((1-mu)*phi-1)^2+3*((1-mu)*phi-1)*Psi(mu*phi+(1-mu)*phi)-3*Psi(2+(1-mu)*phi)*((1-mu)*phi-1)+2*Psi(mu*phi+(1-mu)*phi)-2*Psi(2+(1-mu)*phi)+2*(1-mu)*phi+1)/((((1-mu)*phi-1)^2+3*(1-mu)*phi-1)*GAMMA(mu*phi+(1-mu)*phi))

(5)

ans:=simplify(ans) assuming mu>0,mu<1, phi>0;

-(Psi(phi)*(mu*phi-phi+1)^2-Psi(-mu*phi+phi+2)*(mu*phi-phi+1)^2+3*(-mu*phi+phi-1)*Psi(phi)-3*Psi(-mu*phi+phi+2)*(-mu*phi+phi-1)+2*Psi(phi)-2*Psi(-mu*phi+phi+2)-2*(-1+mu)*phi+1)/(mu^2*phi^2-2*mu*phi^2-mu*phi+phi^2+phi)

(6)

eval(ans, [mu = 1/3, phi = 2]);

2-(1/6)*Pi*3^(1/2)-(3/2)*ln(3)

(7)

evalf(%);

-.554818117

(8)

 

@Markiyan Hirnyk 

All the source code is in my post; it is enough a copy & paste + execute.

I had the impression that you have tried lately to adopt a minimal politeness.
It seems that I was wrong. I am sorry.

Edit. It seems also that there is still hope, because you have removed your reply.

 

@Markiyan Hirnyk 

a = mu*phi-1
b = (1-mu)*phi-1

(The factor not depending on y was removed).

@krismalo 
I don't think it could be simpler; the procedure has only a few lines.
If f has multiple roots, solve(f,x) will find all of them. If you want the minimal one, simply replace
a := solve(f,x);
    with
a := min(solve(f,x) );
 

@Serwa 

In your example there are two sets of functions (obtained by pdsolve), given by "generators":
S1:  f(x,y,z,t) = F1(x, y, z)
S2:  f(x,y,z,t) = F2(x+y, x+z, t)

and you want the "generator" for S1 intersect S2.
You have obtained this generator via pdsolve (for the system of the two PDEs)
but it is not difficult to find it by a simple inspection as:
f(x,y,z,t) = F3(x+y, x+z).
Of course, this generator F3 could appear in another form e.g.
f(x,y,z,t) = F4(x+y, z-y).

If should be possible to write a procedure to find the "generator" for such an intersection
and also to decide whether  2 sets (e.g. F3, F4 above) are equal.
The type of sets given by pdsolve will be needed to write such a procedure.
 

 

Thank you, Robert.
That's the difference between brute force and a simple but real algorithm (or between O(n^4) and O(n^2)).
Probably if a compiler was not available, many users would search for better algorithms :-)

Best regards,
V. A.

@Robert Israel 

@Markiyan Hirnyk 

Too late for me, and for you too :-)

Needs a serious revision.

Probability(X*Y-Z <= 5);  #???
                               1
Probability(X*Y-Z*U <= 5);
      Error, (in Statistics:-Probability) summand is singular in the interval of summation
Probability(X*Y=0);  #???
                               1/199
Probability(X*Y<1);  #ok
                             19999/39601
Probability(X*Y>-1);
      Error, (in Statistics:-Probability) summand is singular in the interval of summation
Probability(X*Y<0);  #ok
                             19602/39601
Probability(X*Y>0);
      Error, (in Statistics:-Probability) summand is singular in the interval of summation

@Markiyan Hirnyk 

 

N:=199^4:
pr:=proc()
local a::integer[8],b::integer[8],c::integer[8],d::integer[8],Z::integer[8]:=0;
for a from -99 to 99 do
for b from -99 to 99 do
for c from -99 to 99 do
for d from -99 to 99 do
if a*d-b*c=0 then Z:=Z+1 fi od:od:od:od:
Z;
end:

cpr:=Compiler:-Compile(pr):

cpr():
%/N=evalf(%/N);

561441/1568239201 = 0.3580072476e-3
 

 

First 128 129 130 131 132 133 134 Last Page 130 of 176