vv

13837 Reputation

20 Badges

9 years, 327 days

MaplePrimes Activity


These are replies submitted by vv

@Carl Love 

Yes, you are right of course, thank you; sum should be add in my formulation.

@Adam Ledger

It is not clear what you try to obtain. Why do you think that f(n) deserves to be considered?
If you want better asymptotic approximations for ithprime(n)  and Pi(x), there are many results, e.g.

nthprime:=n->
n*(ln(n) + ln(ln(n)) -1 + (ln(ln(n))-2)/ln(n) - ( ln(ln(n))^2 - 6*ln(ln(n)) + 11 )/(2*ln(n)^2)); #  + 0(n/ln(n)^2) 

#  Remark
abs(Pi(x)-Li(x)) <= sqrt(x)*ln(x)/(8*Pi);   # assuming RH, x>=2657

 

But (1) is trivial and has not much to do with Prime Number Theorem; it is true for any sequence p_n > n.

sqrt(n^2 - n) <= f(n) <= n,  so f(n)/n --> 1.

@rahinui 

For some reason (probably a bug) assuming in this context produces the error.
Of course here the assuming clause is useless, and removing it ==> the expected result.

BTW, restart(); does nothing. It should be restart;

@Mariusz Iwaniuk 

Actually a workaround is not needed because F works. The problem is about interface & typesetting.
(F is the first user procedure I met which refuses to be printed).

 

@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 "~".

First 87 88 89 90 91 92 93 Last Page 89 of 176