Robert Israel

6577 Reputation

21 Badges

18 years, 212 days
University of British Columbia
Associate Professor Emeritus
North York, Ontario, Canada

MaplePrimes Activity


These are replies submitted by Robert Israel

I wonder how many of these inequalities are true. For example, I randomly chose Theorem 21 which says if x > 0, x/(x + floor(x)) + x/(x+frac(x)) >= 5/2 This is wrong: the left side actually varies between 4/3 and 3/2. Moreover, Maple can be persuaded to assert this:
> _EnvTry := hard:
  x := a + b:
  Q:= x/(x+b) + x/(x+a):
  is(Q > 3/2) assuming a >= 0, b > 0;
false Note that the expression is symmetric in a and b; you can take a = frac(x) and b = floor(x) or vice versa, and at least one of these is strictly positive. I doubt that a table of inequalities would be very useful in itself, because the one you want will hardly ever be in the table (though it might be a consequence of one or more items there). I think this should be seen in the context of the need to improve Maple's ability to decide whether nonlinear inequalities are true in connection with the "assume" facilities. For example:
> is(a^2 + b + 1 >= a) assuming a >= 0, b >= 0;
FAIL
Too bad: GraphTheory is a new package in Maple 11. If you intend to do a lot of graph theory work in Maple, you might seriously consider upgrading. But you can try this:
> with(networks):
  M:= <<0,1,0,1>|<1,0,0,1>|<0,0,0,1>|<1,1,1,0>>:
  n:= LinearAlgebra[RowDimension](M):
  pairs:= select(t -> (M[t[1],t[2]] = 1), 
    {seq(seq({i,j},i=1..j-1),j=1..n)}):
  G:= graph([$1..n],pairs):
  draw(G);

Like this:

> with(GraphTheory):
  M:= <<0,1,0,1>|<1,0,0,1>|<0,0,0,1>|<1,1,1,0>>:
  G:= Graph([a,b,c,d], M);

G := `Graph 1: an undirected unweighted graph with 4 vertices and 4 edge(s)`

> DrawGraph(G);

Note also that the "to 100" is not required: you could simply say
> for i while r[i-1] <= 300 do ... end do;
Of course you want to be sure that the "while" condition will eventually take effect, otherwise you'll have an infinite loop. For reasons of clarity I'd prefer to write this as
> for i from 1 while r[i-1] <= 300 do ... end do;
although the "from 1" is not required (as the default for a "for" loop is to start from 1).
Note also that the "to 100" is not required: you could simply say
> for i while r[i-1] <= 300 do ... end do;
Of course you want to be sure that the "while" condition will eventually take effect, otherwise you'll have an infinite loop. For reasons of clarity I'd prefer to write this as
> for i from 1 while r[i-1] <= 300 do ... end do;
although the "from 1" is not required (as the default for a "for" loop is to start from 1).
Your characteristic polynomial is fine, though you could just use CharacteristicPolynomial(K,lambda). However, you're using LinearSolve incorrectly. From the help page:
If B is omitted, then the linear system is interpreted from the first argument which is taken to be the augmented linear system A|B, where B is a column Vector.
So Maple thinks you're solving a 2 x 1 system where the right side is the second column of your matrix. Try using <0,0> as the second argument of LinearSolve.
Your characteristic polynomial is fine, though you could just use CharacteristicPolynomial(K,lambda). However, you're using LinearSolve incorrectly. From the help page:
If B is omitted, then the linear system is interpreted from the first argument which is taken to be the augmented linear system A|B, where B is a column Vector.
So Maple thinks you're solving a 2 x 1 system where the right side is the second column of your matrix. Try using <0,0> as the second argument of LinearSolve.
As far as I am aware, when graph theorists consider eigenvalues, they are talking about the eigenvalues of either the adjacency matrix or the Laplacian, considered as ordinary matrices. See e.g. this paper
I doubt that this is what he is looking for. I think for boolean matrices one generally considers (A+B)_{ij} = (A_ij or B_ij) and (AB)_{ij} = sum_k (A_{ij} and B_{ij}). If you represent these as matrices of 0's and 1's (0 for false and 1 for true), then you can use map(t -> signum(0,t,0), A+B) and map(t -> signum(0,t,0), AB). Matrices with variable entries would be more complicated. For eigenvalues, I think one just considers the matrix as a matrix of 0's and 1's and takes the eigenvalues in the usual way.
Before the O(x^6)? Before the O(x^6) terms are complicated constants times x^4. Or are you asking what O(x^6) means? The mathematical definition is this: f(x) = O(x^6) if for some positive constants K and epsilon > 0, |f(x)| < K |x|^6 whenever |x| < epsilon. What Maple means by it is not quite that (although that would be true in this case): it means "terms in x^6 and higher powers of x, but possibly with logarithmic factors". If you want more terms of the series, change the value of Order. For example:
> Order:= 10:
  simplify(dsolve(DE, y(x), series));
Before the O(x^6)? Before the O(x^6) terms are complicated constants times x^4. Or are you asking what O(x^6) means? The mathematical definition is this: f(x) = O(x^6) if for some positive constants K and epsilon > 0, |f(x)| < K |x|^6 whenever |x| < epsilon. What Maple means by it is not quite that (although that would be true in this case): it means "terms in x^6 and higher powers of x, but possibly with logarithmic factors". If you want more terms of the series, change the value of Order. For example:
> Order:= 10:
  simplify(dsolve(DE, y(x), series));
What you want is a series solution to a differential equation. That can be done using dsolve(..., series). In your case
> DE := (D@@2)(y)(x) + 2*Si(x)*D(y)(x)/x^2 + 2*tan(x)*y(x)/x^3 = 0;
  simplify(dsolve(DE, y(x), series));
y(x) = _C1*x^(-1/2-1/2*I*7^(1/2))*((1+1/36*(13+7^(1/2)*I) /(-2+7^(1/2)*I)*x^2+1/64800*(-5647+4897*I*7^(1/2))/(-4+ 7^(1/2)*I)/(-2+7^(1/2)*I)*x^4+O(x^6)))+_C2 *x^(-1/2+1/2*I*7^(1/2))*((1+1/36*(-13+7^(1/2)*I)/ (2+7^(1/2)*I)*x^2+(-1/64800*(5647+4897*I*7^(1/2))/(4+ 7^(1/2)*I)/(2+7^(1/2)*I))*x^4+O(x^6)))
What you want is a series solution to a differential equation. That can be done using dsolve(..., series). In your case
> DE := (D@@2)(y)(x) + 2*Si(x)*D(y)(x)/x^2 + 2*tan(x)*y(x)/x^3 = 0;
  simplify(dsolve(DE, y(x), series));
y(x) = _C1*x^(-1/2-1/2*I*7^(1/2))*((1+1/36*(13+7^(1/2)*I) /(-2+7^(1/2)*I)*x^2+1/64800*(-5647+4897*I*7^(1/2))/(-4+ 7^(1/2)*I)/(-2+7^(1/2)*I)*x^4+O(x^6)))+_C2 *x^(-1/2+1/2*I*7^(1/2))*((1+1/36*(-13+7^(1/2)*I)/ (2+7^(1/2)*I)*x^2+(-1/64800*(5647+4897*I*7^(1/2))/(4+ 7^(1/2)*I)/(2+7^(1/2)*I))*x^4+O(x^6)))
In a case such as this, the best way is
> sum(A[i], i=1..2);
First of all, note that x and X are different. Your function is
> f := tan(x)*log(1+x)/x;
To get series (to different orders) for this in powers of x, try:
> S:= series(f,x,10):
  for n from 1 to 8 do 
    P[n]:= convert(series(S,x,n),polynom);
  end do;
Now plot...
First 166 167 168 169 170 171 172 Last Page 168 of 187