%mathpiper,def="Together"

//Retract("Together",*);

10 # Together((_f/_g) + (_h/_i)) <--  Simplify(Expand(f*i+h*g)/Expand(g*i));

10 # Together((_f/_g) - (_h/_i)) <--  Simplify(Expand(f*i-h*g)/Expand(g*i));

20 # Together(_f + (_g / _h))    <--  Simplify(Expand(f*h+g)/h);

20 # Together((_f/_g) + _h)      <--  Simplify(Expand(f+h*g)/g);

20 # Together(_f - (_g / _h))    <--  Simplify(Expand(f*h-g)/h);

20 # Together((_f/_g) - _h)      <--  Simplify(Expand(f-h*g)/g);

20 # Together(- (_g / _h))       <--  Simplify((-g)/h);

20 # Together((_f/_g) * _h)      <--  Simplify(Expand(f*h)/g);

20 # Together(_h * (_f/_g))      <--  Simplify(Expand(f*h)/g);

20 # Together((_f/_g) / _h)      <--  Simplify((f)/Expand(g*h));

20 # Together(_h / (_f/_g))      <--  Simplify(Expand(g*h)/f);

20 # Together(- _f)              <-- - Together(f);

30 # Together(_f)                <--  f;

%/mathpiper




%mathpiper_docs,name="Together",categories="User Functions;Number Theory"
*CMD Together --- places terms in a sum over a common denominator and cancels factors in the result
*CALL
    Together(expression)

*PARMS

{expression} -- a sum

*DESC
This function places terms in a sum over a common denominator and cancels factors in the result.

*E.G.
In> Together(a/b + c/d)
Result: (d*a+b*c)/(d*b)

*SEE Apart

%/mathpiper_docs