# sum polynomial H(x,y) [closed]

I want to write and evaluate an expression something like $$H_1=\sum_{i+j=0}^3 e_{ij}x^iy^j$$

or

$$H=\frac{\sum_{i+j=0}^3 e_{ij}x^iy^j}{\sum_{i+j=0}^3 a_{ij}x^iy^j}$$

with correct syntax.

-

## closed as off-topic by belisarius, Michael E2, RunnyKine, Jens, rasherMay 25 at 22:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – belisarius, Michael E2, RunnyKine, Jens, rasher
If this question can be reworded to fit the rules in the help center, please edit the question.

What are the bounds on i and j? –  wolfies May 25 at 15:31
The problem comes from bounds, you need two sums, one for (i+j=) k=0 to 3, and one for i=0 to k (and infer j=k-i). Assuming i and j are both positive or zero: Sum[e[i, k - i] x^i y^(k - i), {k, 0, 3}, {i, 0, k}]/ Sum[a[i, k - i] x^i y^(k - i), {k, 0, 3}, {i, 0, k}] –  Jean-Claude Arbaut May 25 at 15:31
h1[x_, y_, n_] := Sum[e[i, n - i] x^i y^(n - i), {i, n}] –  belisarius May 25 at 15:32

I like belisarius' neat suggestion ... but for more general problems you could insert a Boole to take care of any constraint you care to impose. For example:
 Sum[Boole[0 <= i + j <= 3] myFunc[i, j] x^i y^i, {i,0,3}, {j,0,3}]