Differences

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

Link to this comparison view

documentation:ref:together [2015/11/21 12:33]
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:​
 +<sxh groovy; gutter: false>
 +println Together >> 'f_m / a + g_m / b'.t
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > (b*f_m + a*g_m)/​(a*b)
 +</​sxh>​
 +----
 +''​Together''​ automatically takes care about dummy indices relabelling
 +<sxh groovy; gutter: false>
 +println Together >> '​(f_m*f^m) / (a_n*a^n) + (b_n*b^n) / (c_m*c^m)'​.t
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > (f_m*f^m*c_a*c^a+a_a*a^a*b_n*b^n)/​(a_c*a^c*c_b*c^b)
 +</​sxh>​
 +----
 +''​Together''​ does not perform factorisation:​
 +<sxh groovy; gutter: false>
 +println Together >> '​x**2/​(x**2 - 1) + x/(x**2 - 1)'.t
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > (x**2-1)**(-1)*(x**2+x)
 +</​sxh>​
 +Use ''​Together & Factor'':​
 +<sxh groovy; gutter: false>
 +println( (Together & Factor) >> '​x**2/​(x**2 - 1) + x/(x**2 - 1)'.t )
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > (-1+x)**(-1)*x
 +</​sxh>​
 +
 +====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]]