vv

13837 Reputation

20 Badges

9 years, 325 days

MaplePrimes Activity


These are replies submitted by vv

@Markiyan Hirnyk 

You should know the difference between 1d and 2d input. You have copied my 1d code in 2d mode.

@Markiyan Hirnyk 

I know the difference between numeric and symbolic solutions. But try X:=Matrix(n,symbol=x)   for n=4 or 5. The numeric solution still works. 
Integer solutions? They were not requested for this problem.

@Markiyan Hirnyk 

Of course it's infinite. The problem was about the existence of real solutions. Good luck too.

@petit loup 

For now we must be happy with a numerical solution. It is easy and fast:

restart;
Digits:=30:
X:=Matrix(3,symbol=x):
eqs:={entries((X.X^+ - X^0) =~ 0, nolist)}[]:
Optimization:-NLPSolve(0, {eqs, x[1,1] <= 1/2, 3/10 <= x[2,3]});

[0., [x[1, 1] = 0.794146063666383512119841132959e-1, x[1, 2] = .620068305692267153579926862637, x[1, 3] = .780518171839421696958016866613, x[2, 1] = .822632510153236016792344665016, x[2, 2] = -.482986286802209366562016187596, x[2, 3] = .300000000000000000000000000000, x[3, 1] = -.563000065306051208096993503723, x[3, 2] = -.618255241010486777840153327601, x[3, 3] = .548444512624975566069664290363]]

@Muhammad Usman 

Replace exp(k2*eta)   by  Z^k2. The problem reduces to find the coefficients of a polynomial in the variables x, y, t, Z and you can use coeff as above.

@Carl Love 

I don't understand. You said (correctly) "The problem is not caused by using a variable whose name begins with underscore" and then you provide a workaround exactly for such variables (only).

restart;
assume(Z1::integer);
sys:={x <> (  (1/2)*Pi+Z1*Pi ), x < infinity, -infinity < x};
expand(thaw(solve(subsindets(sys, suffixed(_), freeze@``) ,{x}))); #error

Also, the freezed variable is without assumptions; so, a simpler woraround would be to simply remove the assumptions which are anyway ignored now.

 

@Carl Love 

Yes, you are right; and for other types too, e.g. positive.

@Preben Alsholm

 

 

restart;

x<>c and y>d;

d < y

(1)

x>-infinity, x<infinity, (x-1/2)^2>0;

-infinity < x, x < infinity, 0 < (x-1/2)^2

(2)

solve({x>-infinity, x<infinity, (x-1/2)^2>0}, x);  #NULL?

solve({x>-10, x<10, (x-1/2)^2>0}, x);

{-10 < x, x < 1/2}, {1/2 < x, x < 10}

(3)

 

 

@digerdiga 

Using such strange names for variables (for an outsider) your code looks as being obfuscated and very hard to follow.
Why don't you isolate the problem and use normal (short) variables?

@Annonymouse 

subsindets(P, specindex(integer,x), _XX)

replaces each x[n]   having n::integer  by _XX(x[n]);
Then,
remove(has, %, _XX);
removes the polynomials containing _XX

@nm 

It seems that Maple ignores the singular points. You can simply exclude them from Carl's solution:

sing := remove(has,[singular(f)],infinity);

 

@Adam Ledger 

The function is discontinuous; you may add option discont.

Choosing these coords=...  appears pointless, unless you have a good reason for it.

AFAIK there is no user-defined storage functions for Arrays.  A possibility is to use storage=sparse and write the index function; it would be interesting to see the efficiency in this case.

@Markiyan Hirnyk 

It would be nice to tell us your ideas. E.g.
1. A multi-dimensional Van Aubel theorem.
2. A complex program for animated flexible polyhedra.
3. A project to generalize Gaifullin's results.
4. Something else?
 

@mmcdara 

0<x<1, 0<y<1 is not necessary because we are going to integrate the product of densities.

E.g. for a=4/3 Maple gives;

 

restart;

SolveTools:-SemiAlgebraic({x^2 + y^2 + (4/3) *x*y<z},[x,y], 'parameters'=[z]);

piecewise(z <= 0, [], 0 < z, [[-3*sqrt(5)*sqrt(z)*(1/5) < x, x < 3*sqrt(5)*sqrt(z)*(1/5), -2*x*(1/3)-(1/3)*sqrt(-5*x^2+9*z) < y, y < -2*x*(1/3)+(1/3)*sqrt(-5*x^2+9*z)]])

(1)

J:=[x=-3*sqrt(5)*sqrt(z)*(1/5) .. 3*sqrt(5)*sqrt(z)*(1/5), y=-2*x*(1/3)-(1/3)*sqrt(-5*x^2+9*z)..  -2*x*(1/3)+(1/3)*sqrt(-5*x^2+9*z)];

[x = -(3/5)*5^(1/2)*z^(1/2) .. (3/5)*5^(1/2)*z^(1/2), y = -(2/3)*x-(1/3)*(-5*x^2+9*z)^(1/2) .. -(2/3)*x+(1/3)*(-5*x^2+9*z)^(1/2)]

(2)

f:=piecewise(x<=0,0,x<1,1)*piecewise(y<=0,0,y<1,1);

f := piecewise(x <= 0, 0, x < 1, 1)*piecewise(y <= 0, 0, y < 1, 1)

(3)

F:=unapply(Int(f, [J[2],J[1]]),z);

F := proc (z) options operator, arrow; Int(Int(piecewise(x <= 0, 0, x < 1, 1)*piecewise(y <= 0, 0, y < 1, 1), y = -(2/3)*x-(1/3)*sqrt(-5*x^2+9*z) .. -(2/3)*x+(1/3)*sqrt(-5*x^2+9*z)), x = -(3/5)*sqrt(5)*sqrt(z) .. (3/5)*sqrt(5)*sqrt(z)) end proc

(4)

value(F(1));

(3/10)*5^(1/2)*arcsin((1/3)*5^(1/2))

(5)

value(F(2));

-2/3+(1/3)*13^(1/2)-(3/5)*5^(1/2)*arcsin(-(1/9)*5^(1/2)*2^(1/2)+(1/18)*5^(1/2)*2^(1/2)*13^(1/2))+(3/5)*5^(1/2)*arcsin((1/6)*5^(1/2)*2^(1/2))

(6)

value(F(4));

1

(7)

value(F(1/2));

(3/20)*5^(1/2)*arcsin((1/3)*5^(1/2))

(8)

value(F(z)) assuming z>0;

Warning,  computation interrupted

 

 

 

 

So, it's not unreasonable to expect from PDF (when a=4/3) the expression

piecewise(z<=0, 0, F(z))
but it seems that you are ok with the present status.

 

First 84 85 86 87 88 89 90 Last Page 86 of 176