Re: Together, Apart, ?
- To: mathgroup at smc.vnet.net
- Subject: [mg16973] Re: Together, Apart, ?
- From: tobiasoed at my-dejanews.com
- Date: Sat, 10 Apr 1999 02:13:21 -0400
- Organization: Deja News - The Leader in Internet Discussion
- Sender: owner-wri-mathgroup at wolfram.com
Greg, myToghether does not expand denominators and numerators after putting things together. I don't know how good it is computational wise thought. Let me know. myTogether[expr_Plus]:=( Together[Map[(prot[Denominator[#]]/prot[Numerator[#]])&,expr]] ) /. prot->Identity applied to your first example: In[1]:= ex=(a+b)/(c+d)+(e+f)/(g+h) a + b e + f Out[1]= ----- + ----- c + d g + h In[2]:= myTogether[expr_Plus]:=( Together[Map[(prot[Denominator[#]]/prot[Numerator[#]])&,expr]] ) /. prot->Identity In[3]:= myTogether[ex] (c + d) (e + f) + (a + b) (g + h) Out[3]= --------------------------------- (a + b) (e + f) Tobias Ps: Is it me or is the following wierd: In[9]:= Apart[(a + b) (c + d)] Out[9]= (a + b) c + (a + b) d -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own