Re: How to find one expression in terms of another expression?

*To*: mathgroup at smc.vnet.net*Subject*: [mg119740] Re: How to find one expression in terms of another expression?*From*: David Bailey <dave at removedbailey.co.uk>*Date*: Mon, 20 Jun 2011 08:04:12 -0400 (EDT)*References*: <itm0of$143$1@smc.vnet.net>

On 20/06/2011 00:29, Jacare Omoplata wrote: > I want to find dT in terms of dt. They are given below. > > > > In[1]:= Element[{x1, x2, t1, t2, u, c}, Reals] > > Out[1]= (x1 | x2 | t1 | t2 | u | c) \[Element] Reals > > In[3]:= T1 = (t1 - ((u x1)/c^2))/Sqrt[1 - (u^2/c^2)] > > Out[3]= (t1 - (u x1)/c^2)/Sqrt[1 - u^2/c^2] > > In[4]:= T2 = (t2 - ((u x2)/c^2))/Sqrt[1 - (u^2/c^2)] > > Out[4]= (t2 - (u x2)/c^2)/Sqrt[1 - u^2/c^2] > > In[5]:= dT = T2 - T1 > > Out[5]= -((t1 - (u x1)/c^2)/Sqrt[1 - u^2/c^2]) + ( > t2 - (u x2)/c^2)/Sqrt[1 - u^2/c^2] > > In[6]:= dt = t2 - t1 > > Out[6]= -t1 + t2 > > > If I knew that dT can be written in terms of dt in the form, > dT = a dt + b, > Can I use Mathematica to find a and b? > > I tried using Solve[dT == a dt + b, dt], but that gives an error. > > If I didn't know that dT can be expressed this way, can I still > express it in terms of dt ? > I tried evaluating: Solve[dT == a dt + b, dt] It worked perfectly, so I suspect that something had a value at that point - say dT. BTW, if you get an error message, it usually helps to include that as part of your query! In a more complicated case, if there is a chance that something already has a spurious value, a good trick is to change Solve to Solve1 (say) - evaluating that should just echo back, but if dT had a value, you would see that immediately. David Bailey http://www.dbaileyconsultancy.co.uk

**Follow-Ups**:**Multiple use of Set on lists***From:*Jonathan Frazer <J.Frazer@sussex.ac.uk>