Re: Mathematica question

• To: mathgroup at smc.vnet.net
• Subject: [mg124803] Re: Mathematica question
• From: "Oleksandr Rasputinov" <oleksandr_rasputinov at ymail.com>
• Date: Tue, 7 Feb 2012 04:05:55 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <jgo0h5\$a3f\$1@smc.vnet.net>

```On Mon, 06 Feb 2012 07:46:45 -0000, Howie <hcohl001 at gmail.com> wrote:

> Let's say you've got an expression
>
> expr = {Sin[x] + x^2 - x^2*Cos[x], x^3 (1 + x^2) - x^3, x^4 - x^3}
>
> What does this mean?
>
> Table[expr[[j]] // FullSimplify[#, \$assumptions] & /@ # & // Expand //
> @ # &, {j, 3}]
>
> I am new to Mathematica as far as these more complicated expressions
> are concerned.
>
> Can you explain symbol by symbol?
>
> I realize that the [[j]] is Part and that FullSimplify is applied //
> Postfix to expr, but I don't understand what \$assumptions means (I'm
> assuming that these are some assumptions added to FullSimplify) but I
> do not know where these assumptions come from.  Are these assumptions
> the rest of the stuff on the right-hand side?
>
> In reality I have a potentially much more complicated form of the
> expr.
>
> Thanks!
>

\$assumptions should (probably) actually be \$Assumptions. However, it is
not necessary in this scenario and may just as well be omitted.

The symbol \$Assumptions is set inside of constructs like Assuming[assum,
expr] (here, \$Assumptions = assum) and gives the list of assumptions
employed by assumption-aware functions such as FullSimplify. But
specifying Assumptions -> \$Assumptions when calling FullSimplify is
redundant, as Options[FullSimplify] will show you that this is the default
value anyway.

The /@ # & and //@ # & appearing in this expression are not needed either
(at least, not for this case). These are Map and MapAll, respectively, and
with FullSimplify and Expand as the first arguments they (in principle)
act to simplify each part on level 1 of the expression and then expand all
parts at every level. However, they are not doing anything for the
expression you provide as an example.

Removing confusing and unnecessary pieces of this input, we are left with
the following:

Table[expr[[j]] // FullSimplify // Expand, {j, 3}]

which I trust is much easier to understand.

```

• Prev by Date: Re: Mathematica question
• Next by Date: Re: Mathematica question
• Previous by thread: Re: Mathematica question
• Next by thread: Using Mathematica in VB.NET