[Date Index]
[Thread Index]
[Author Index]
Re: Simplifying the *Individual Coefficients* in Series Expansions?
*To*: mathgroup at smc.vnet.net
*Subject*: [mg35240] Re: [mg35214] Simplifying the *Individual Coefficients* in Series Expansions?
*From*: Daniel Lichtblau <danl at wolfram.com>
*Date*: Wed, 3 Jul 2002 05:15:03 -0400 (EDT)
*References*: <200207020612.CAA22353@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
AES wrote:
>
> I have a long expression f that involves integers times various
> powers of symbols b and x, i.e.
>
> f = ratio of two lengthy polynomials in b and x
>
> If I series expand this in x , viz.
>
> fS = Series[f, {x, 0, 2}] // Normal
>
> I get an answer in the form
>
> fS = c1 x + c2 x^2
>
> where the coefficients c1 and c2 in the resulting series expansion
> come out as rather messy expressions (ratios of polynomials). In my
> problem, however, these coefficients actually happen to simplify
> substantially (since there are common factors in their numerators and
> denominators), and I'd like to have them in simplified form. But if I
> write
>
> fS // Simplify
>
> I'm back in lengthy polynomial form; and if I try something like
>
> fS = (Coefficient[fS, x] // Simplify) x +
> (Coefficient[fS, x^2] // Simplify) x^2
>
> I get an expression that looks great, but will not evaluate numerically.
>
> Any easy way around this?
I do not understand what you mean by "will not evaluate numerically".
The expression that results looks like it should be mathematically
equivalent to fS.
You can perhaps do what you want using Collect on powers of x, with a
third argument specified to simplify the individual collected terms.
Below is an example.
In[25]:= rndpoly[deg_,var_] := Sum[Random[Integer,{1,10}]*var^j,
{j,0,deg}]
In[26]:= fnum = Sum[Random[Integer,{1,10}]*x^(j-1)*rndpoly[3,b], {j,8}];
In[27]:= fden = Sum[Random[Integer,{1,10}]*x^(j-1)*rndpoly[3,b], {j,8}];
In[28]:= fS = Normal[Series[fnum/fden, {x,0,2}]];
In[29]:= InputForm[Collect[fS, x, Simplify]]
Out[29]//InputForm=
(5 + b + 10*b^2 + b^3)/(7 + 10*b + 9*b^2 + b^3) +
((-26 + 180*b + 153*b^2 + 329*b^3 + 209*b^4 + 208*b^5 + 27*b^6)*x)/
(6*(7 + 10*b + 9*b^2 + b^3)^2) -
((-3672 - 8148*b - 10923*b^2 + 2927*b^3 + 16852*b^4 + 27818*b^5 +
20533*b^6 + 12421*b^7 + 2889*b^8 + 215*b^9)*x^2)/
(12*(7 + 10*b + 9*b^2 + b^3)^3)
Daniel Lichtblau
Wolfram Research
Prev by Date:
**Re: non integer exponents in ContourPlot[]?**
Next by Date:
**RE: Apply and Heads option**
Previous by thread:
**Simplifying the *Individual Coefficients* in Series Expansions?**
Next by thread:
**RE: Simplifying the *Individual Coefficients* in Series Expansions?**
| |