# Differences

This shows you the differences between two versions of the page.

 — documentation:ref:together [2015/11/21 12:33] (current) Line 1: Line 1: + ====== Together ====== + ---- + ====Description==== + * ''​Together''​ puts terms in a sum over a common denominator + + * ''​Together''​ cancels only terms that can be canceled without factorisation + + * ''​TogetherFactor''​ cancels factors in the result + + + ====Examples==== ​ + Combine terms over a common denominator:​ + + println Together >> 'f_m / a + g_m / b'.t + ​ + + > (b*f_m + a*g_m)/​(a*b) + ​ + ---- + ''​Together''​ automatically takes care about dummy indices relabelling + + println Together >> '​(f_m*f^m) / (a_n*a^n) + (b_n*b^n) / (c_m*c^m)'​.t + ​ + + > (f_m*f^m*c_a*c^a+a_a*a^a*b_n*b^n)/​(a_c*a^c*c_b*c^b) + ​ + ---- + ''​Together''​ does not perform factorisation:​ + + println Together >> '​x**2/​(x**2 - 1) + x/(x**2 - 1)'.t + ​ + + > (x**2-1)**(-1)*(x**2+x) + ​ + Use ''​Together & Factor'':​ + + println( (Together & Factor) >> '​x**2/​(x**2 - 1) + x/(x**2 - 1)'.t ) + ​ + + > (-1+x)**(-1)*x + ​ + + ====See also==== + * Related guides: [[documentation:​guide:​applying_and_manipulating_transformations]],​ [[documentation:​guide:​list_of_transformations]] + * Related transformations:​ [[documentation:​ref:​factor]],​ [[documentation:​ref:​expand]] + * JavaDocs: [[http://​api.redberry.cc/​redberry/​1.1.9/​java-api/​cc/​redberry/​core/​transformations/​fractions/​TogetherTransformation.html| TogetherTransformation]] + * Source code: [[https://​bitbucket.org/​redberry/​redberry/​src/​tip/​core/​src/​main/​java/​cc/​redberry/​core/​fractions/​TogetherTransformation.java|TogetherTransformation.java]]