MathGroup Archive 2011

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

Search the Archive

Re: FullSimplify and Coefficient

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121157] Re: FullSimplify and Coefficient
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Wed, 31 Aug 2011 07:41:38 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201108311005.GAA12121@smc.vnet.net>

On 31 Aug 2011, at 12:05, azerty17 wrote:

> Hello,
>
> I have some problems when using FullSimplify and Coefficient together.
> Basically I obtain a non zero result when typing this kind of command 
:
>
> ( Coefficient[Expr, A^2*B] - Coefficient[(Expr//FullSimplify), A^2*B] 
) //FullSimplify
>
> which seems quite strange. Any idea of why I don't get zero ?
>
> Thanks !
>

You don't give any example of Expr, which is very annoying because it 
forces anyone trying to answer your question to do extra work 
constructing one.

Anyway, I can't be 100% sure what happens in your case, but it seems 
that Coefficient uses Simplify but not FullSimplify on the expression 
that it is applied to, which means that you can get a different answer 
in certain cases like this one:

Coefficient[a^2*b*Gamma[a^2*b], a^2*b]
Gamma[a^2*b]

but

Coefficient[FullSimplify[a^2*b*Gamma[a^2*b]], a^2*b]
0

In fact the concept of "coefficient" is defined correctly only for 
polynomial expressions and I suspect your Expr is not one (can't be sure 
since you do not give it).
Note that SeriesCoefficient does not exhibit this problem:

In[56]:= SeriesCoefficient[a^2*b*Gamma[a^2*b], {a, 0, 2}, {b, 0, 1}]

Out[56]= -EulerGamma

In[57]:= SeriesCoefficient[FullSimplify[a^2*b*Gamma[a^2*b]], {a, 0, 
2}, {b, 0, 1}]
Out[57]= -EulerGamma

Andrzej Kozlowski





  • Prev by Date: Re: Problem with access nested list
  • Next by Date: Re: Sudden memory-usage increase with SparseArray
  • Previous by thread: FullSimplify and Coefficient
  • Next by thread: CountryData custom projection for shape