Kitonum

21530 Reputation

26 Badges

17 years, 92 days

MaplePrimes Activity


These are replies submitted by Kitonum

@Preben Alsholm  Thanks for this observation. But this is only an intermediate result (not final one). We want to get the right side of the identity below:

is(x+y-2*sqrt(x*y)=-(sqrt(-x)+sqrt(-y))^2) assuming negative;

                                          true

@mmcdara  It doesn't surprise you that

plots:-implicitplot(g, x = -2..2, y= -2..2);

doesn't return any plot. Maple is right here, since the equation  g = 0  has no solutions. And here 

[solve(g, y)];

the command  solve  is not working correctly. It just formally expresses  y  through  x (these formulas can also be obtained manually by sequential squaring) , without worrying about any equivalence. It is very easy to check by simply substituting the found solution into the equation:

restart;
assume(x::real, y::real):
z := x+I*y:
g := abs(z-I)-abs(z+1)-2;
sol := [solve(g, y)];
simplify(eval(g,y=sol[1]));
simplify(eval(%, x=-1));  # Check - should be 0

             

Here's another example with an obvious bug:

restart;
solve(sqrt(x+y)+sqrt(x-y)=-2);


I'm going to update my answer below shortly where I explain in detail that there is no solution for the equation  

abs(z-I)-abs(z+1)=2 , where z=x+I*y  for real x and y

  

@acer  Thanks. There has been some progress after Maple 2018, but some bugs still remain. For some reason, some roots are skipped. In these examples, the  real  option should not be required because inequalities in the real domain are included  x>=-7*Pi/2, x<=-2*Pi   and so on. 

@acer  Thank you.

Maple 2018 easily handles this trivial example as well. But it fails with a slightly complicated example below. I wonder what will happen in Maple 2020?

restart;
kernelopts(version);

assume(x, 'real'); assume(y, 'real');
verify(x^2 - x*y + y^2, 0, {'greater_equal'});
is(x^2 - x*y + y^2>=0);

restart;
verify(x^2 - x*y + y^2, 0, {'greater_equal'}) assuming x::real, y::real;
is(x^2 - x*y + y^2>=0) assuming x::real, y::real;

                                    

 

 

Download example.mw

@gst  Try

restart;

divide5_new := proc(g, k)
  local x, r;
  if type(k,numeric) then if k < 3 then return 0 else return unapply((1/5)*g(i, x), i, x) fi; 
else return piecewise(k<3,0,unapply((1/5)*g(i, x),i,x)) fi; 
end proc:

# Example

f :=  (i,x) -> x^2+i :
f1:=divide5_new(f, i);
eval(f1,[i=1,x=2]);
eval(f1,[i=4,x=2]);

 

@Carl Love  Your code results in an error:

divide5_new:= proc(g, k)
local x;
    if k::numeric then `if`(k<3, 0, unapply((1/5)*g(k, x), k, x))
    else unapply(piecewise(k<3, 0, (1/5)*g(k, x)),k,x) 
    fi
end proc:

f :=  (i,x) -> x^2+i :
f3 := divide5_new(f, 4);

      Error, (in unapply) variables must be unique and of type name

@vv  Thanks for this method. The key to success here, of course, is to rewrite the system as a polynomial system (without  sqrt ). Unfortunately, we have to do it manually. After that, the  solve  command also solves the problem.

sys := r-c>0, 0<=r^2 - 2*r*c -r +2*c, r^2 - 2*r*c -r +2*c  < (r-c)^2, 0<=c, c<=1 , 0<r, r<1, r<2*c:
solve([sys], r, parametric=true);


Wolfram Mathematica solves the problem immediately in its original setting:

 

 

@manju  1. Maple can choose a random object only from a certain finite set. Therefore, a certain range must be specified.
2. Replace colons with semicolons, for example  a_1:=rand(1..5)();  and so on.

It is enough to use backticks only in denominators, for example   4=456/`1920`  and so on.

@Maple_lover1  I corrected my answer.

@BrettKnoss  See my solution above.

@BrettKnoss  I didn't understand the meaning of your question. If a series is given, then the general term of the series  u(n)  must be known for any  .

@BrettKnoss  c(n)  is just the coefficient in front of  n_th  term of the series:

restart;
S := Sum((x-2)^n/(n^2-1)^2, n = 2 .. infinity);
op(1,S);
coeff(%, (x-2)^n);

                       

 

@matviiv10 

restart;
h:=0.01: r:=0.02: N:=10: f:=y->y^5: K:=(x,y)->sin(x)*y^5:
for n from 1 to N do 
x[n]:=sin(h*n);
od:
for m from 1 to N do
y[m]:=cos(r*m);
od:
n:='n': m:='m':
Sys:={seq(sum(K(x[n],y[m])*U[n],n=1..N)=f(y[m]), m=1..N)};
solve(Sys);
assign(%);
plot([seq([x[n],U[n]], n=1..N)]);

 

First 17 18 19 20 21 22 23 Last Page 19 of 133