Collecting Terms |
To collect terms of a polynomial containing like powers of a specified variable, select the expression for the polynomial and either:
- or -
To specify the variable on which to collect terms, type a comma after "collect" and type the variable in the placeholder that appears. Then press [Enter].
To write the following expression as a polynomial in x, click collect on the Symbolic toolbar and then type x in the placeholder that appears to the right of "collect."
3x2· y + 5x2· y2 + 7x·y2 + x·y collect, x → (5·y2 + 3·y)· x2 + (7·y2 + y)·x
Mathcad adds the terms 3x2· y + 5x2· y2, containing the term x2, and the terms 7x·y2 + x·y, containing the term x.
If instead you type y in the placeholder, the result is
3x2· y + 5x2· y2 + 7x·y2 + x·y collect, y → (5·x2 + 7·x)· y2 + (3·x2 + x)·y
Another method is to select just the variable on which to collect (not the entire expression) and click Collect on the Symbolics menu. In this case the result will not automatically update if you make changes elsewhere in the worksheet.