MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Transforming an expression to publication form

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120584] Re: Transforming an expression to publication form
  • From: carlos at colorado.edu
  • Date: Sat, 30 Jul 2011 05:59:52 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201107191057.GAA10297@smc.vnet.net> <j06auj$nig$1@smc.vnet.net>

On Jul 20, 4:33 am, Andrzej Kozlowski <a... at mimuw.edu.pl> wrote:
> On 19 Jul 2011, at 11:57, car... at colorado.edu wrote:
>
>
>
>
>
> > Suppose I have the expression
>
> > C11=A*Em*(4-3*omega^2+nu*(-8+3*omega^2)+(-4+8*nu)*Cos[kappa]);
>
> > I want to transform this into
>
> > C11pub=Em*A*(4*(1-2*nu)*(1-Cos[kappa])-3*(1-nu)*omega^2);
>
> > which is the exactly the way it has to appear in a journal
> > publication,
> > once mapped to LaTeX.  Both C11 and C11pub have the
> > same LeafCount (27), and C11 is invariant under Simplify
> > and FullSimplify.
>
> > How do I accomplish  C11 -> C11pub within Mathematica,
> > without using any extra packages?  BTW this is part of one
> > of 36 matrix entries, so transforming all by hand takes a while.
>
> On the one hand: in general, it is not reasonable to expect Mathematica
> to do such things. It is not really intended for this purpose and while
> one can often succeed by using special tricks, there is no general
> approach and I don't think it is worth spending time on uncovering the
> tricks needed in an individual case.
>
> On the other hand, in this particular case it is rather easy to see
> these "tricks".  Namely:
>
> C11 = A*Em*(4 - 3*omega^2 +
>     nu*(-8 + 3*omega^2) + (-4 + 8*nu)*Cos[kappa])
>
> Collect[Collect[C11, omega, Factor], {Em, A}]
>
> A Em (4 (2 nu-1) (cos(kappa)-1)+3 (nu-1) omega^2)
>
> This is essentially your C11pub except for some signs in a few places.
>
> Andrzej Kozlowski

Many thanks!  I had forgotten that Collect can be nested.

Related question: once I tried //TraditionalForm//InputForm hoping
to get a nicer text to cut and paste in LaTeX.  But InputForm
regresses to the original unpublishable display, with minus signs in
wrong places and superfluous parentheses.
Can these filters be nested in some way?




  • Prev by Date: Re: Mathematica 8 remote parallel kernels
  • Next by Date: Re: Poincare section for double pendulum
  • Previous by thread: Re: Transforming an expression to publication form
  • Next by thread: sorting a nested list of 4-tuples