rzarouf

30 Reputation

3 Badges

0 years, 319 days

MaplePrimes Activity


These are questions asked by rzarouf

Hi, maybe someone knows how to fix this:

"Error, (in assuming) when calling 'assume'. Received: 'question.mw'"

I am attaching the corresponding maple file. I've never met such an error message, and unfortunately the Maplesoft help does not contain any information about such an issue : 

restart; (2^(1/2+1/2+1)*GAMMA(n+1/2+1)*GAMMA(n+1/2+1))/((2*n+1/2+1/2+1)*GAMMA(n+1/2+1/2+1)*factorial(n))

4*GAMMA(n+3/2)^2/((2*n+2)*GAMMA(n+2)*factorial(n))

(1)

JacobiP(n, 1/2, 1/2, 1)

JacobiP(n, 1/2, 1/2, 1)

(2)

evalf(JacobiP(3, 1/2, 1/2, 1))

2.187500000

(3)

f := proc (n, x) options operator, arrow; (1/4)*JacobiP(n, 1/2, 1/2, x)*4^(1/2)/(GAMMA(n+3/2)^2/((2*n+2)*GAMMA(n+2)*factorial(n)))^(1/2) end proc

proc (n, x) options operator, arrow; (1/4)*JacobiP(n, 1/2, 1/2, x)*4^(1/2)/(GAMMA(n+3/2)^2/((2*n+2)*GAMMA(n+2)*factorial(n)))^(1/2) end proc

(4)

int(f(1, x)^2*sqrt(-x^2+1), x = -1 .. 1)

1

(5)

int(f(2, x)^2*sqrt(-x^2+1), x = -1 .. 1)

1

(6)

int(f(3, x)^2*sqrt(-x^2+1), x = -1 .. 1)

1

(7)

c := proc (n) options operator, arrow; int(sqrt(1+x)*f(n, x)*sqrt(-x^2+1), x = -1 .. 0)+int(f(n, x)*sqrt(-x^2+1), x = 0 .. 1) end proc

proc (n) options operator, arrow; int(sqrt(1+x)*f(n, x)*sqrt(-x^2+1), x = -1 .. 0)+int(f(n, x)*sqrt(-x^2+1), x = 0 .. 1) end proc

(8)

c(12)

(2/450225)*(-208+679*2^(1/2))/Pi^(1/2)

(9)

S := proc (N, x) options operator, arrow; evalf(sum(c(n)*f(n, x), n = 0 .. N)) end proc

proc (N, x) options operator, arrow; evalf(sum(c(n)*f(n, x), n = 0 .. N)) end proc

(10)

S(1, 1)

Error, (in assuming) when calling 'assume'. Received: 'contradictory assumptions'

 

NULL

Download question.mw

https://www.maplesoft.com/support/help/errors/view.aspx?path=Error,%20(in%20assuming)%20when%20calling%20%27assume%27.%20Received%3A%20%27contradictory%20assumptions%27

Many thanks in advance

Hi,

The procedure below returns the plots of 3 matrices whose eigenvalues are given and fixed (but chosen randomly). Plots are returned simultaneously via the command display. When I run the procedure 2-3 times, I realize that the drawings are not directly comparable. I have to say that I have naively used the command (three times, i.e. for each plot):

implicitplot("function", -2 .. 2, -2 .. 2, axes = boxed, color = blue, gridrefine = 3, scaling = constrained, resolution = 1000); 

Is there a way to "force" maple to return -- each time I run the procedure -- plots of the same size, same scaling and so on ? I would like also to put names on the axis with consistent writings and fonts. Is it possible ?

Many thanks,

Best,

Rachid

-----

with(plots);
with(LinearAlgebra);
P0 := proc(n, epsilon)
local m, N, D1, Modu, fs, f1, f2, f, q, s, r, t, eps, pp, k;
eps := epsilon;
m := n;
N := eval(RandomMatrix(m, m));
N := N/evalf(Norm(evalf(N), 2));
D1 := DiagonalMatrix(Eigenvalues(N));
pp := pointplot({seq([Re(D1[k, k]), Im(D1[k, k])], k = 1 .. m)});
f := (i, j) -> if i = j then D1[i, i]; elif i = j + 1 then (1 - abs(D1[i, i])^2)^(1/2)*(1 - abs(D1[j, j])^2)^(1/2); elif j + 1 < i then (1 - abs(D1[i, i])^2)^(1/2)*(1 - abs(D1[j, j])^2)^(1/2)*mul(-conjugate(D1[t, t]), t = j + 1 .. i - 1); else 0; end if;
Modu := Matrix(m, (i, j) -> f(i, j)); fs := (x, y) -> Norm(1/((x + y*I)*IdentityMatrix(m) - N), 2) - 1/eps;
f1 := (x, y) -> Norm(1/((x + y*I)*IdentityMatrix(m) - D1), 2) - 1/eps;
f2 := (x, y) -> Norm(1/((x + y*I)*IdentityMatrix(m) - Modu), 2) - 1/eps;
s := implicitplot(fs, -2 .. 2, -2 .. 2, axes = boxed, color = blue, gridrefine = 3, scaling = constrained, resolution = 1000);
q := implicitplot(f1, -2 .. 2, -2 .. 2, axes = boxed, gridrefine = 3, scaling = constrained, resolution = 1000);
r := implicitplot(f2, -2 .. 2, -2 .. 2, axes = boxed, color = green, gridrefine = 3, scaling = constrained, resolution = 1000); RETURN(display({q, s, r, pp}));
end proc;

Hi,

In the code below I do not understand why f(3,1) cannot be computed : it returns the conjugate of D1[2,2] although I have defined it as a random number. Maybe you understand this ? Actually I first got an error message of the type "bad index into matrix". Thus I wrote ''D1''[t, t] instead of D1[t, t] to fix the issue in the product. 

Many thanks in advance for your help

with(LinearAlgebra);
D1 := evalf(RandomMatrix(3));
f := (i, j) -> if i = j then D1[i, i]; elif i = j + 1 then (1 - abs(D1[i, i])^2)^(1/2)*(1 - abs(D1[j, j])^2)^(1/2); elif j + 1 < i then (1 - abs(D1[i, i])^2)^(1/2)*(1 - abs(D1[j, j])^2)^(1/2)*product(-conjugate(''D1''[t, t]), t = j + 1 .. i - 1); else 0; end if;
f(1, 1);
f(1, 2), f(1, 3);
f(2, 2);
f(2, 3);
f(3, 3);
f(2, 1);
f(3, 2);
f(3, 1);
Modu := evalf(Matrix(3, (i, j) -> f(i, j)));

f(3,1) is given by 3222.984487*conjugate(D1[2, 2]): I do not get why the value of D1[2,2] is ignored.

Hi everyone,

Do you know if there are some known codes for plotting pseudospectra of squared (and finite) matrices with given spectrum ? 
Thanks in advance

Best,

Rachid

Page 1 of 1