packages/solver/lib/simplifyExpression/collectAndCombineSearch/LikeTermCollector.js
function getTermName(node, op) {
  const polyNode = new Node.PolynomialTerm(node);
  // we 'name' polynomial terms by their symbol name
  let termName = polyNode.getSymbolName();
  // when adding terms, the exponent matters too (e.g. 2x^2 + 5x^3 can't be combined)
  if (op === '+') {
    const exponent = print(polyNode.getExponentNode(true));
    termName += '^' + exponent;
  }
  return termName;
}
function getTermName(node, op) {
  const polyNode = new Node.PolynomialTerm(node);
  // we 'name' polynomial terms by their symbol name
  let termName = polyNode.getSymbolName();
  // when adding terms, the exponent matters too (e.g. 2x^2 + 5x^3 can't be combined)
  if (op === '+') {
    const exponent = print(polyNode.getExponentNode(true));
    termName += '^' + exponent;
  }
  return termName;
}
function getTermName ( node , op ) { const polyNode = new Node . PolynomialTerm ( node ) ; // we 'name' polynomial terms by their symbol name let termName = polyNode . getSymbolName ( ) ; // when adding terms, the exponent matters too (e.g. 2x^2 + 5x^3 can't be combined) if ( op === '+' ) { const exponent = print ( polyNode . getExponentNode ( true ) ) ; termName += '^' + exponent ; } return termName ; }
Polyonomial terms are collected by categorizing them by their 'name' which is used to separate them into groups that can be combined. getTermName returns this group 'name'
Polyonomial terms are collected by categorizing them by their name which is used to separate them into groups that can be combined . getTermName returns this group name