Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 14 years ago

omoplata gravatar image

How to get more uniform output from full_simplify

I do this,

sage: var('x1,t1,x2,t2,u,c',domain=RR);assume(u>0);assume(c>0);assume(c>u);
(x1, t1, x2, t2, u, c)
sage: T1 = (t1-((u*x1)/(c^2)))/sqrt(1-((u^2)/(c^2)))
sage: T2 = (t2-((u*x2)/(c^2)))/sqrt(1-((u^2)/(c^2)))
sage: dT = T2-T1
sage: view(dT.full_simplify())

And I get,

cuc+u(c2t1c2t2ux1+ux2)c3cu2

I put this expression in which is supposed to be the same,

sage: s = ((t2-t1)-((u/(c^2))*(x2-x1)))/sqrt(1-((u^2)/(c^2)))
sage: view(s.full_simplify())

And get this,

c2t1c2t2ux1+ux2cuc+uc

It is not immediately apparent to me that dT and s are the same. But they are both equal as can be seen by,

sage: (s-dT).full_simplify()
0

This is something minor, but is there something I can do to get a simplified expression which is more uniform every time I use full_simplify()?

Thanks.