Online Algebra Calculator
Many of users do not use powerful Maxima computer algebra system for systematic work, but for ad hoc algebraic calculations – equations, functions, matrixes, etc. only. To do this job, it is not useful to download the whole application from a web site.
Function: makeset (<expr>, <x>, <s>) Returns a set with members generated from the expression <expr>, where <x> is a list of variables in <expr>, and <s> is a set or list of lists. To generate each set member, <expr> is evaluated with the variables <x> bound in parallel to a member of <s>.
![Makeset Example makeset (i/j, [i, j], [[1, a], [2, b], [3, c], [4, d]]);
s : {x, y, z};
s3 : cartesian_product (s, s, s);
makeset (i + j + k, [i, j, k], s3);
makeset (sin(x), [x], {[1], [2], [3]});](http://maxima-online.org//plot.html?g=i-1658198272.png&t=img&db=r-2084849826)
Each member of <s> must have the same length as <x>. The list of variables <x> must be a list of symbols, without subscripts. Even if there is only one symbol, <x> must be a list of one element, and each member of <s> must be a list of one element.
See also makelist.
Examples:
(%i1) makeset (i/j, [i, j], [[1, a], [2, b], [3, c], [4, d]]);
1 2 3 4
(%o1) {-, -, -, -}
a b c d
(%i2) S : {x, y, z}$
(%i3) S3 : cartesian_product (S, S, S);
(%o3) {[x, x, x], [x, x, y], [x, x, z], [x, y, x], [x, y, y],
[x, y, z], [x, z, x], [x, z, y], [x, z, z], [y, x, x],
[y, x, y], [y, x, z], [y, y, x], [y, y, y], [y, y, z],
[y, z, x], [y, z, y], [y, z, z], [z, x, x], [z, x, y],
[z, x, z], [z, y, x], [z, y, y], [z, y, z], [z, z, x],
[z, z, y], [z, z, z]}
(%i4) makeset (i + j + k, [i, j, k], S3);
(%o4) {3 x, 3 y, y + 2 x, 2 y + x, 3 z, z + 2 x, z + y + x,
z + 2 y, 2 z + x, 2 z + y}
(%i5) makeset (sin(x), [x], {[1], [2], [3]});
(%o5) {sin(1), sin(2), sin(3)}(%o1) true (%i2)