## How do I calculate the wedge product of differenti...

Dear all,

I have the following question, this code:

restart:
with(DifferentialGeometry):
DGsetup([w1,w2],N):
eq1 := ExteriorDerivative(w1);
eq2 := ExteriorDerivative(w1) &wedge ExteriorDerivative(w2);
eq1 &wedge eq2;

Gives the error:
Error, (in DifferentialGeometry:-Tools:-DGzero)  given degree, 3, exceeds that of frame dimension, 2

Unfortunately, I am not so familiar with differential geometry but as far as I know dw1  (dw1  dw2) = 0 should be correct.

best
baustamm1

## Product simplification fails...

The following product

(product(mu^x[i]/factorial(x[i]), i = 1 .. n))

does not simplify to the most obvious form whatever I try

mu^(sum(x[i], i = 1 .. n))/(product(factorial(x[i]), i = 1 .. n))

What can it be?

## KroneckerProduct() function not performing as it d...

I'm trying to compute the tensor product of two column vectors as

with(LinearAlgebra):

A:=Matrix([[1/sqrt(2)],[0],[0],[1/sqrt(2)]]);

KroneckerProduct(A,A);

And the output is a column vector with entries: "16 x 1 Matrix", "Data Type: Anything", "Storage: rectangular", "Order: Fortran_order"

The Maple documentation indicates that this function should output the result of the kronecker tensor product of the input matrices, and I've followed the same form as the examples in the documentation... Does anyone know why this isn't working as it should?

## Product of “n” variables in a function...

I want calcule the product of this function for x = x1, x2, ... xn:

fx:= theta*exp(-theta*x)

I tried this:

prod:= product(fx, x=1..n)

However this consider the integer values of x's, i.e, x = 1,2,3...,n.

I don't know how to make x values undefined. Is there anyway?

## Reccurence relation between two operators ...

Hi

Hope a nice day for all

restart;

#  *%   define the product of between two operators, and q real number
a*%b = q*b*%a+1;

# First I would like to give a simple for

a^n*%b;
# and
a*%b^n;

them deduce a general for

b^n*%a^k*%b^N*%a^K-q^(k*N-n*K)*b^N*%a^K*%b^n*%a^k;

where n, k and k greater than 1 and  n geater than k

Simplification.mw

## Sparse Matrix Products in Maple

by: Maple

I thought I would share some code for computing sparse matrix products in Maple.  For floating point matrices this is done quickly, but for algebraic datatypes there is a performance problem with the builtin routines, as noted in http://www.mapleprimes.com/questions/205739-How-Do-I-Improve-The-Performance-Of

The code is fairly straightforward in that it uses op(1,A) to extract the dimensions and op(2,A) to extract the non-zero elements of a Matrix or Vector, and then loops over those elements.  I included a sparse map function for cases where you want to map a function (like expand) over non-zero elements only.

`# sparse matrix vector productspmv := proc(A::Matrix,V::Vector)local m,n,Ae,Ve,Vi,R,e;  n, m := op(1,A);  if op(1,V) <> m then error "incompatible dimensions"; end if;  Ae := op(2,A);  Ve := op(2,V);  Vi := map2(op,1,Ve);  R := Vector(n, storage=sparse);  for e in Ae do    n, m := op(1,e);    if member(m, Vi) then R[n] := R[n] + A[n,m]*V[m]; end if;  end do;  return R;end proc:`
`# sparse matrix productspmm := proc(A::Matrix, B::Matrix)local m,n,Ae,Be,Bi,R,l,e,i;  n, m := op(1,A);  i, l := op(1,B);  if i <> m then error "incompatible dimensions"; end if;  Ae := op(2,A);  Be := op(2,B);  R := Matrix(n,l,storage=sparse);  for i from 1 to l do    Bi, Be := selectremove(type, Be, (anything,i)=anything);    Bi := map2(op,[1,1],Bi);    for e in Ae do      n, m := op(1,e);      if member(m, Bi) then R[n,i] := R[n,i] + A[n,m]*B[m,i]; end if;    end do;  end do;  return R;end proc:`
`# sparse mapsmap := proc(f, A::{Matrix,Vector})local B, Ae, e;  if A::Vector then    B := Vector(op(1,A),storage=sparse):  else    B := Matrix(op(1,A),storage=sparse):  end if;  Ae := op(2,A);  for e in Ae do    B[op(1,e)] := f(op(2,e),args[3..nargs]);  end do;  return B;end proc:`

As for how it performs, here is a demo inspired by the original post.

`n := 674;k := 6;`
`A := Matrix(n,n,storage=sparse):for i to n do  for j to k do    A[i,irem(rand(),n)+1] := randpoly(x):  end do:end do:`
`V := Vector(n):for i to k do  V[irem(rand(),n)+1] := randpoly(x):end do:`
`C := CodeTools:-Usage( spmv(A,V) ):  # 7ms, 25x fasterCodeTools:-Usage( A.V ):  # 174 ms`
`B := Matrix(n,n,storage=sparse):for i to n do  for j to k do    B[i,irem(rand(),n)+1] := randpoly(x):  end do:end do:`
`C := CodeTools:-Usage( spmm(A,B) ):  # 2.74 sec, 50x fasterCodeTools:-Usage( A.B ):  # 2.44 min`
`# expand and collect like termsC := CodeTools:-Usage( smap(expand, C) ):`

## Apply to be a Maple Beta Tester!

by: Maple

As the year draws to a close, we start looking forward to a new year and a new release of Maple. With every new release comes many new features and updates to explore.

We are looking for several new beta testers with a good working knowledge of Maple; We need your input, your ideas, and your experience with our products to help us improve the software and get it ready for general release.

There are many benefits to becoming a beta tester:

• You’ll get to use the new software before anyone else does.
• You’ll help us make our software better in ways that work for you.
• Your suggestions could determine the future direction of the software.
• You’ll get feedback right from the development team.

If you are interested in becoming a beta tester for the next version of Maple, please email: beta (at) maplesoft.com for more information.

## Command for product of sets?...

Is there any Maple command for computing the product of two set A and B?

For example if A={a,b,c} and B={x,y} then we have A*B={ax,ay,bx,by,cx,cy}.

## Dot Product Commutativity...

I want to make a dot product like

and get the complete result like

Is there a way to force the dot product operation all the way?

## subs or eval product with function...

Hello,

I have a question: why does the following not work and how can I make it work:

f(x)*a*b;
subs(a*b=y,%);

The result is f(x) a b but I want f(x) y. What can I do? I also tried eval.

Thanks and best regards.

## How to skip an index in product() call?...

I'd like to implement this in Maple, but being a newbie having hard time getting the syntax right:

This is what I tried:

a:='a';
f:= i->product( `if`(evalb(i<>j),(a-z(j))/(z(i)-z(j)),NULL),j=1..3);

but it is not skipping the i=j case, since when I call it with f(1) I get division by zero.

f(1);
Error, (in product) numeric exception: division by zero

Tried also

f:= i->product(`if`(evalb(not(i=j)),(a-z(j))/(z(i)-z(j)),NULL),j=1..3);
and few other things. I think the reason it fails is deeper than my level of Maple undertstanding.

How would you do this in Maple?

## finding values of k to make two functions orthogon...

I already finished part a, my question is how do i define the function g with the variable k being any real value so that maple will find <f,g> = 0 (using the inner product defined)?

## product grouping...

product.mw

Experts, I pose a question:

Separate the numbers 3,4,5,6,7,8,28,30,35 into three groups of three numbers each, so that the
product of the numbers in each group is equal.

The idea is to select numbers where the variance between the 3 groups is minimized.

my attempt doesn't get the anwer directly, there must be a better approach

## how to start the new code editor in Maple17?...

it says "Maple 17 features a completely new editor for writing Maple code."  but for the last 15 minutes I've been looking in my Maple 17.02 for windows and not able to figure where this editor is or how to start it.

When I open Maple, I say File->New-> and nothing there for an editor.

I also looked in my Maple installation icons group, there is nothing there.

"Maple 17 features a completely new editor for writing Maple code.   The editor includes many features to make it easier to write, read, and debug Maple code, such as syntax highlighting, bracket matching, command completion, and automatic indenting. The new editor is available for managing startup code, inline code edit regions, and code attached to embedded components."

but again, does not say anything about how to START it ? Or is this editor a separate apps I need to buy?