Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #3197

Re: Why can't FullSimplify give more uniform output?

From Jacare Omoplata <walkeystalkey@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Why can't FullSimplify give more uniform output?
Date 2011-06-20 23:37 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <itolj6$eq9$1@smc.vnet.net> (permalink)
References <itnd2c$7hj$1@smc.vnet.net>

Show all headers | View raw


Thanks for the answer.

On Jun 20, 8:05 am, Bob Hanlon <hanl...@cox.net> wrote:
> Simplify and FullSimplify provide the simplest form that they find within
 their time constraints. Given different starting forms for an expression, 
there is no guarantee that they will arrive at identical forms.
>
> $Assumptions = {u > 0, c > u};
>
> 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 = T2 - T1;
>
> expr1 = FullSimplify[dT]
>
> (c^2*(-t1 + t2) + u*(x1 - x2))/
>    (c*Sqrt[(c - u)*(c + u)])
>
> s = (t2 - t1 - ((u/c^2)*(x2 - x1)))/Sqrt[1 - ((u^2)/(c^2))];
>
> s == dT // Simplify
>
> True
>
> expr2 = FullSimplify[s]
>
> (c*(-t1 + t2 + (u*(x1 - x2))/c^2))/
>    Sqrt[(c - u)*(c + u)]
>
> expr3 = FullSimplify[Expand[s]]
>
> (c^2*(-t1 + t2) + u*(x1 - x2))/
>    (c*Sqrt[(c - u)*(c + u)])
>
> expr3 is identical to expr1
>
> expr1 === expr3
>
> True
>
> Bob Hanlon
>
> ---- Jacare Omoplata <walkeystal...@gmail.com> wrote:
>
> =============
> Hello,
>
> I ask this question just out of curiosity.
>
> Below is my input and output. The expressions "s" and "dT" are equal,
> as can be seen by Out[17]. But the output from FullSimplify is
> different for those two as can be seen by Out[12] and Out[15]. Why
> can't they be simplified to expressions that look alike?
>
> Thanks.
>
> (PS. Also please tell me if my code is inefficient. I'm still learning
> Mathematica)
>
> In[1]:= Element[{x1, x2, t1, t2, u, c}, Reals]
>
> Out[1]= (x1 | x2 | t1 | t2 | u | c) \[Element] Reals
>
> In[7]:= $Assumptions = {u > 0, c > u}
>
> Out[7]= {u > 0, c > u}
>
> In[9]:= T1 = (t1 - ((u x1)/c^2))/Sqrt[1 - (u^2/c^2)]
>
> Out[9]= (t1 - (u x1)/c^2)/Sqrt[1 - u^2/c^2]
>
> In[10]:= T2 = (t2 - ((u x2)/c^2))/Sqrt[1 - (u^2/c^2)]
>
> Out[10]= (t2 - (u x2)/c^2)/Sqrt[1 - u^2/c^2]
>
> In[11]:= dT = T2 - T1
>
> Out[11]= -((t1 - (u x1)/c^2)/Sqrt[1 - u^2/c^2]) + (
>  t2 - (u x2)/c^2)/Sqrt[1 - u^2/c^2]
>
> In[12]:= FullSimplify[dT]
>
> Out[12]= (c^2 (-t1 + t2) + u (x1 - x2))/(c Sqrt[(c - u) (c + u)])
>
> In[14]:= s = (t2 - t1 - ((u/c^2)*(x2 - x1)))/Sqrt[1 - ((u^2)/(c^2))]
>
> Out[14]= (-t1 + t2 - (u (-x1 + x2))/c^2)/Sqrt[1 - u^2/c^2]
>
> In[15]:= FullSimplify[s]
>
> Out[15]= (c (-t1 + t2 + (u (x1 - x2))/c^2))/Sqrt[(c - u) (c + u)]
>
> In[16]:= s - dT
>
> Out[16]= (t1 - (u x1)/c^2)/Sqrt[1 - u^2/c^2] - (t2 - (u x2)/c^2)/Sqrt[
>  1 - u^2/c^2] + (-t1 + t2 - (u (-x1 + x2))/c^2)/Sqrt[1 - u^2/c^2]
>
> In[17]:= FullSimplify[s - dT]
>
> Out[17]= 0

Back to comp.soft-sys.math.mathematica | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: Why can't FullSimplify give more uniform output? Bob Hanlon <hanlonr@cox.net> - 2011-06-20 12:05 +0000
  Re: Why can't FullSimplify give more uniform output? Jacare Omoplata <walkeystalkey@gmail.com> - 2011-06-20 23:37 +0000

csiph-web