vv

12760 Reputation

19 Badges

8 years, 299 days

MaplePrimes Activity


These are replies submitted by vv

@annarita Why don't you try?

@annarita Yes, it is possible, if f is defined:

f := (x, y) -> piecewise(x=0 and y=0,  0, (x^3*y - x*y^3)/(y^2 + x^2)):

(or better, use And(x=0, y=0)  instead of x=0 and y=0).

Then:

D[1](f)(0,0);
D[2](f)(0,0);

are both 0.

I have appended the answer in your previous question. 
You should delete this one.

@salim-barzani 

Remarks.

1. Your new function phi may generate errors (divisions by 0).
It must be rewritten or called inside try - catch - end try.

2. It seems you just want to learn programming. In this case don't choose such a large output.
ou have increased the numbers of loops to 8, so a potential  4^8 = 65536 rows in the answer. Difficult to analyse.

3. For such a large output the (poor!)  Java interface is very slow and may even crash.
It is recommended to generate an Array and place the rows there.

restart;
phi := (p__1, p__2, p__3, p__4, q__1, q__2, q__3, q__4, xi) -> (p__1*exp(q__1*xi) - p__2*exp(q__2*xi))/(p__3*exp(q__3*xi) + p__4*exp(q__4*xi)):
xi := x:   # it should be numeric for your evalf!

A:=Array([]):
nr:=0:
for p__1 in [1, -1, I, -I] do
for p__2 in [1, -1, I, -I] do 
for p__3 in [1, -1, I, -I] do 
for p__4 in [1, -1, I, -I] do 
for q__1 in [1, -1, I, -I] do 
for q__2 in [1, -1, I, -I] do 
for q__3 in [1, -1, I, -I] do 
for q__4 in [1, -1, I, -I] do 
  try
    result1 := evalf(phi(p__1, p__2, p__3, p__4, q__1, q__2, q__3, q__4, xi));
    catch "numeric":
    result1:=0;
  end try;
  if result1=0 then next else
    A(++nr):= [arg=[p__1, p__2, p__3, p__4, q__1, q__2, q__3, q__4, xi], ans=result1] fi; 
end do; end do; end do; end do; end do; end do; end do; end do:

A[1..2];

upperbound(A);
                             57600
 

@mmcdara  Something seems to be  wrong in your example.

restart;
eq:=(a*x+b*y)*diff(u(x, y), x) + (c*x+d*y)*diff(u(x, y), y):
#  "For this problem to have a solution you must have a=-d"  ??
EQ:=eval(eq, [a=4,b=2,c=1,d=3]):
SOL:=pdsolve(EQ): lprint(%);
# u(x,y) = f__1((x^2+2*x*y+y^2)/(2*y-x)^5)

eval(EQ,SOL): simplify(%);
#            0
restart;
ex := sqrt( RootOf((1 - sqrt(_Z^3 + _Z^2 - _Z + 1))) ):
radnormal(ex);
# Error, (in RootOf) _Z occurs but is not the dependent variable

 

@JAMET Maybe this will give you an idea for future posts. Your undocumented and unexplained problem received an undocumented and unexplained answer. It seems that you do not like it (even if it should be easy to fix).

@janhardo Not necessarily a=a. The expressions are evaluated [+ automatic simplifications], but not simplified.

restart;
a:=x+1; b:=a+8; c:=a-9+b-x;
evalb(a=c);    # true

 

@JAMET These type of questions are better  to be presented mathematically and followed by the worksheet with your approach. Otherwise, the math can be skewed by errors in your code and it takes more time for someone to help you. Many people here will not waste their time just because you refuse a proper presentation of the problem.

@sand15  I do not see what is the numerical benefit of using r[i] >= - eps, with eps =1e-8.
It is obvious that mathematically the conditions r[i] >=0  or  r[i] >= +eps  are equivalent (i.e.  S is exactly the same).

@minhthien2016 Denote by S the max of the sum of the radii for n=14.

The sum of the radii in Maple is SMaple = 1.886... > SMma = 1.880..., so, SMaple is better.
It is easy to check the constraints and see that Maple configuration is valid, so: S >= SMaple > SMma.

Note that actually S >= 1.897 and Maple can easily obtain this.
I will probably post this later.

If you have an Answer but want it be labeled as  Comment, the readers could be confused. I'd prefer to see an answer be presented as such.

@sursumCorda  Is convert(..., simplifier=F)  documented?

@Axel Vogt  Only under some assumptions, e.g. real.

@aroche  If was chosen the branch  diff(y(x), x) = (x-2)^(2/3)  instead of diff(y(x), x) = ((x-2)^2)^(1/3).
But then y(x) is complex for x<2, which is probably not wanted.

1 2 3 4 5 6 7 Last Page 1 of 168