vv

14022 Reputation

20 Badges

10 years, 41 days

MaplePrimes Activity


These are replies submitted by vv

@samira moradi 

You cannot, there are infinitely many.

Why don't you simply keep the original expression?
It is obvious that it's impossible to retrive z from |z|. Even in Mathematica :-) for a more complicated z.

@Carl Love 

I still don't understand why should we rely on int to find f(x) when f(x) = F(x,y)/F(a,y).
It is very easy to produce F for which int fails.

Edit. BTW, the user _must_ know (and give) such an `a` in the domain.
For example F(x,y) = x * ( y + x*sqrt(x*y) + sqrt(x^3*y) )
can be split only for x<0, so e.g. a = -1 is needed.

@Carl Love 

int will not be able to compute the integral if F is not simple enough. E.g.

'expand( (randpoly(exp(x))+cos(x)) * (randpoly(exp(y))+sin(y)) )':
F:=%/%;

 


 

SplitX:=proc(expr, X::list(name), X0:=0)
local f,A,c,n:=nops(X);
if X0=0 then A:=0*~X else A:=X0 fi;
f:=seq(eval(expr, X=~(subsop(i=X[i],A))),i=1..n);
c:=simplify(expr/mul(f));
if depends(c,X) then WARNING("Unsplitable") fi;
[c,f]
end:

You can take a generic X0=[a,b] and then add assuming or take special values for a,b if necessary.

 

funcs:=[
   x*y,
   x^2+x^2*y,
   2*x+1,
   cos(2*x),
   y(x),
   (x-1)/y,
   ln(1+y^2),
   1-x+y^2-x*y^2,
   x^2+x^3*y,
   1/(x+y),
   (1+sqrt(x))/(1+sqrt(y)),
   (1-x^2+y^2-x^2*y^2)/x^2,
   2*x*y^2+3*x^2*y^2,
   3*exp(2*x)+2*y,
   (5*sqrt(x)-y)/x,
   2*x*y+3*x^2*exp(x^2),
   sqrt(1+x+y^2),
   1,
   1+x*y,
   -y+4*x^3*y,
   exp(x^2)+2*x*y,
   -(y-exp(x))/(x-2),
   arcsin(x)/((1-x^2)*y^2),
   -(y-exp(x))/(x-2),
   -y+4*x^3*y,
   (x^2*y+y)*y^3*exp(-x-y+1)*3^(-x-y)*sqrt(x^2*y-y)   
];

[x*y, x^2*y+x^2, 2*x+1, cos(2*x), y(x), (x-1)/y, ln(y^2+1), -x*y^2+y^2-x+1, x^3*y+x^2, 1/(x+y), (1+x^(1/2))/(1+y^(1/2)), (-x^2*y^2-x^2+y^2+1)/x^2, 3*x^2*y^2+2*x*y^2, 3*exp(2*x)+2*y, (5*x^(1/2)-y)/x, 2*x*y+3*x^2*exp(x^2), (y^2+x+1)^(1/2), 1, x*y+1, 4*x^3*y-y, exp(x^2)+2*x*y, -(y-exp(x))/(x-2), arcsin(x)/((-x^2+1)*y^2), -(y-exp(x))/(x-2), 4*x^3*y-y, (x^2*y+y)*y^3*exp(-x-y+1)*3^(-x-y)*(x^2*y-y)^(1/2)]

(1)

for f in funcs do
f = SplitX(f,[x,y],[a,b]);
od;

x*y = [1/(b*a), x*b, a*y]

 

x^2*y+x^2 = [1/(a^2*(b+1)), b*x^2+x^2, a^2*y+a^2]

 

2*x+1 = [1/(2*a+1), 2*x+1, 2*a+1]

 

cos(2*x) = [1/cos(2*a), cos(2*x), cos(2*a)]

 

Warning, Unsplitable

 

y(x) = [y(x)/(b(x)*y(a)), b(x), y(a)]

 

(x-1)/y = [b/(a-1), (x-1)/b, (a-1)/y]

 

ln(y^2+1) = [1/ln(b^2+1), ln(b^2+1), ln(y^2+1)]

 

-x*y^2+y^2-x+1 = [-1/((a-1)*(b^2+1)), -b^2*x+b^2-x+1, -a*y^2+y^2-a+1]

 

Warning, Unsplitable

 

x^3*y+x^2 = [(x*y+1)/((b*x+1)*a^2*(a*y+1)), b*x^3+x^2, a^3*y+a^2]

 

Warning, Unsplitable

 

1/(x+y) = [(x+b)*(a+y)/(x+y), 1/(x+b), 1/(a+y)]

 

(1+x^(1/2))/(1+y^(1/2)) = [(1+b^(1/2))/(1+a^(1/2)), (1+x^(1/2))/(1+b^(1/2)), (1+a^(1/2))/(1+y^(1/2))]

 

(-x^2*y^2-x^2+y^2+1)/x^2 = [-a^2/((a^2-1)*(b^2+1)), (-b^2*x^2+b^2-x^2+1)/x^2, (-a^2*y^2-a^2+y^2+1)/a^2]

 

3*x^2*y^2+2*x*y^2 = [1/((3*a+2)*a*b^2), 3*b^2*x^2+2*b^2*x, 3*a^2*y^2+2*a*y^2]

 

Warning, Unsplitable

 

3*exp(2*x)+2*y = [(3*exp(2*x)+2*y)/((3*exp(2*x)+2*b)*(3*exp(2*a)+2*y)), 3*exp(2*x)+2*b, 3*exp(2*a)+2*y]

 

Warning, Unsplitable

 

(5*x^(1/2)-y)/x = [-(-5*x^(1/2)+y)*a/((-5*x^(1/2)+b)*(-5*a^(1/2)+y)), (5*x^(1/2)-b)/x, (5*a^(1/2)-y)/a]

 

Warning, Unsplitable

 

2*x*y+3*x^2*exp(x^2) = [(3*exp(x^2)*x+2*y)/((3*exp(x^2)*x+2*b)*a*(3*exp(a^2)*a+2*y)), 2*x*b+3*x^2*exp(x^2), 2*a*y+3*a^2*exp(a^2)]

 

Warning, Unsplitable

 

(y^2+x+1)^(1/2) = [(y^2+x+1)^(1/2)/((b^2+x+1)^(1/2)*(y^2+a+1)^(1/2)), (b^2+x+1)^(1/2), (y^2+a+1)^(1/2)]

 

1 = [1, 1, 1]

 

Warning, Unsplitable

 

x*y+1 = [(x*y+1)/((b*x+1)*(a*y+1)), b*x+1, a*y+1]

 

4*x^3*y-y = [1/((4*a^3-1)*b), 4*b*x^3-b, 4*a^3*y-y]

 

Warning, Unsplitable

 

exp(x^2)+2*x*y = [(exp(x^2)+2*x*y)/((exp(x^2)+2*x*b)*(exp(a^2)+2*a*y)), exp(x^2)+2*x*b, exp(a^2)+2*a*y]

 

Warning, Unsplitable

 

-(y-exp(x))/(x-2) = [(-y+exp(x))*(a-2)/((-b+exp(x))*(-y+exp(a))), -(b-exp(x))/(x-2), -(y-exp(a))/(a-2)]

 

arcsin(x)/((-x^2+1)*y^2) = [b^2*(-a^2+1)/arcsin(a), arcsin(x)/((-x^2+1)*b^2), arcsin(a)/((-a^2+1)*y^2)]

 

Warning, Unsplitable

 

-(y-exp(x))/(x-2) = [(-y+exp(x))*(a-2)/((-b+exp(x))*(-y+exp(a))), -(b-exp(x))/(x-2), -(y-exp(a))/(a-2)]

 

4*x^3*y-y = [1/((4*a^3-1)*b), 4*b*x^3-b, 4*a^3*y-y]

 

Warning, Unsplitable

 

(x^2*y+y)*y^3*exp(-x-y+1)*3^(-x-y)*(x^2*y-y)^(1/2) = [(x^2*y-y)^(1/2)*3^(a+b)*exp(a+b-1)/((a^2*y-y)^(1/2)*(a^2+1)*(b*(x^2-1))^(1/2)*b^4), (b*x^2+b)*b^3*exp(-x-b+1)*3^(-x-b)*(b*x^2-b)^(1/2), (a^2*y+y)*y^3*exp(-a-y+1)*3^(-a-y)*(a^2*y-y)^(1/2)]

(2)

 

@Pinetree 

The easiest method is to write a simple and short procedure (because in Maple it could be complicated to rewrite an expression in your own way).

quad := proc(p,x::name)
local a,b,c;
  if not type(p, quadratic(x)) then error "Not quadratic!" fi;
  c,b,a := seq(coeff(p,x,k),k=0..2);
  -b/(2*a)+1/2*sqrt(b^2/a^2-4*c/a)
end proc;

 

@tomleslie 

I have mentioned this aspect several times in this forum and I still do not have a solution.
On my system (Maple 2018, 64 bit, Windows 7) the vector 3d eps plots are simply wrong.

Your test.eps is also strange:

And

plot3d(x^2+y^2, x=-1..1,y=-1..1);
produces:

Hello Christopher.
There are a few problems for this World Cup simulation:

1. The first error appears because the flag for "MOR" is missing in flags
2. Now the flags table is too large as you have mentioned; it should be put in an external file and read from there.
3. (Main problem). Now there are 8 groups instead of 6 and the rules are different; I actually do not know the new rules (they were rather complicated for 6 groups too).
4. Unfortunately I am busy at this time; not to mention that that my enthusiasm is now a little lower because my country (Romania) is not qualified :-(


 


 

@whtitefall 

Use:
l:=1/2;
evalf(DD(1)); 

That's why I have suggested to define R := (x,h) -> ...  etc

 

@one pound 

It is useful for asymptotics; my objection was for using "=" instead of "~".

@Adam Ledger 

f(oo) = oo implies f(k)>0 for k large enough, so your question is answered.
A bound can be computed using x -1 < floor(x) <= x; ==> S subset {1,...,527}. Then use Maple.

 

In (I) you use divisibility in Q* which is unusual; anyway, the third implication is false.

For (II)  a counterexample is expected.

@tomleslie 

The 'elegant' approach appears in

Blumenthal L.M. - Theory and Applications of Distance Geometry. Chelsea, 1970

theorem 43.1 (due to Schoenberg).

 

Please note that I also have a mistake in the "Clarification" reply. The fM procedure there is wrong. It always returns `false`.
(I forgot to use the transform from IsTetra).
The correct one is:

 

fMok:=proc(a,b,c,x,y,z) #AB=c,AC=b,BC=a,DA=x,DB=y,DC=z
<2*x^2, -c^2+x^2+y^2, -b^2+x^2+z^2; -c^2+x^2+y^2, 2*y^2, -a^2+y^2+z^2; -b^2+x^2+z^2, -a^2+y^2+z^2, 2*z^2>;
LinearAlgebra:-IsDefinite(%, query = 'positive_definite')
end proc:

 

 

So, your positive_definite version is basically correct. I said that it's wrong because I missed the different notations.
Namely, if ABCD is the tetrahedron then you used AB=cbar, AC=bbar, BC=abar, DA=a, DB=b, DC=c. Mine were reversed.

So, apologies  for this!

Also, IsTetra in my answer is OK (because the notations are clear) but istetra should be:

 

istetraok:=proc(a,b,c,x,y,z) #AB=c,AC=b,BC=a,DA=x,DB=y,DC=z
is(`and`(       #((
a>0,b>0,c>0,x>0,y>0,z>0,
2*max(a,b,c)<a+b+c,
2*max(a,y,z)<a+y+z,
2*max(x,b,z)<x+b+z,
2*max(x,y,c)<x+y+c,
LinearAlgebra:-Determinant(
<0,x^2,y^2,z^2,1; x^2,0,c^2,b^2,1; y^2,c^2,0,a^2,1; z^2,b^2,a^2,0,1; 1,1,1,1,0>) >0
))
end:

 

 

Download distance-geometry.mw

@kuwait1 

It is easy to see that the integrand always has a pole in [0,Pi] for n::posint.

@tomleslie 

That was the purpose of the example. There is no tetrahedron!
(A triangle cannot have the sides 1,1,3).
You should turn both disagree into agree :-)

 

First 88 89 90 91 92 93 94 Last Page 90 of 177