Re: Surprising FullSimplify result
- To: mathgroup at smc.vnet.net
- Subject: [mg111539] Re: Surprising FullSimplify result
- From: Peter Pein <petsie at dordos.net>
- Date: Wed, 4 Aug 2010 07:33:35 -0400 (EDT)
- References: <i368ne$r79$1@smc.vnet.net>
Am Mon, 2 Aug 2010 11:04:14 +0000 (UTC)
schrieb Sam Takoy <sam.takoy at yahoo.com>:
> Here's what I am getting
>
> Cos[theta]^2 + Sin[theta]^2 // FullSimplify
> Out[540]= 1
>
> Cos[theta]^2 + Sin[theta]^2 + L^2 Cos[theta]^2 // FullSimplify
> Out[541]= 1/2 (2 + L^2 + L^2 Cos[2 theta])
>
> I'm really surprised that the answer in the latter case is not
>
> 1+ L^2 Cos[theta]^2
>
> Is there an explanation?
>
> Thanks,
>
> Sam
>
Hi Sam,
how big might the surprise be when observing the following?
In[1]:= expr = Cos[theta]^2 + Sin[theta]^2 + L^2 Cos[theta]^2;
LeafCount[longexpr = Times @@ (expr /. L ->
L /@ Range[5]) // Expand]
Out[2]= 1884
longexpr holds the expanded product of five terms of the same type as
expr.
In[3]:= longexpr // FullSimplify
Out[3]= (1 + Cos[theta]^2 L[1]^2) (1 + Cos[theta]^2 L[2]^2)
(1 + Cos[theta]^2 L[3]^2) (1 + Cos[theta]^2 L[4]^2)
(1 + Cos[theta]^2 L[5]^2)
In this case Mathematica has got no problem simplifying each of the
five terms -- strange :-\
Peter