Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: How to find one expression in terms of another expression?
Replies: 7   Last Post: Jun 25, 2011 4:33 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Ray Koopman

Posts: 3,382
Registered: 12/7/04
Re: How to find one expression in terms of another expression?
Posted: Jun 20, 2011 6:51 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Jun 19, 4:29 pm, Jacare Omoplata <walkeystal...@gmail.com> 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 ?


Omit 'dt = t2 - t1'. Otherwise, every time you write 'dt'
it will be replaced by 't2 - t1'. Here is all you need:

In[1]:=
T1 = (t1 - ((u x1)/c^2))/Sqrt[1 - (u^2/c^2)];
T2 = (t2 - ((u x2)/c^2))/Sqrt[1 - (u^2/c^2)];
dT = Simplify[T2 - T1] /. t2 - t1 -> dt
{b,a} = CoefficientList[dT,dt]

Out[3]= (c^2*dt + u*(x1 - x2))/(c^2*Sqrt[1 - u^2/c^2])

Out[4]= {(u*(x1 - x2))/(c^2*Sqrt[1 - u^2/c^2]), 1/Sqrt[1 - u^2/c^2]}




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.