MathGroup Archive 2010

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

Search the Archive

Re: Can Mathematica do this (infinite series)?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113421] Re: Can Mathematica do this (infinite series)?
  • From: Leonid Shifrin <lshifr at gmail.com>
  • Date: Thu, 28 Oct 2010 04:25:55 -0400 (EDT)

Hi Sam,

One way would be to use local rules:

ClearAll[f, g];
g[x_] := f[x]^2 + Sin[x] f[x]

dcrules = {f[0] :> c[0], Derivative[n_][f][0] :> c[n]*n!,
  c[n_] :> Log[n + 1/3]/n!};

Normal[Series[g[x], {x, 0, 5}] //. dcrules]

Log[3]^2 + x (-Log[3] - 2 Log[4/3] Log[3]) +
 x^2 (Log[4/3] + Log[4/3]^2 - Log[7/3] Log[3]) +
 1/6 x^3 (3 Log[7/3] + 6 Log[4/3] Log[7/3] + Log[3] -
    2 Log[3] Log[10/3]) +
 1/12 x^4 (-2 Log[4/3] + 3 Log[7/3]^2 + 2 Log[10/3] +
    4 Log[4/3] Log[10/3] - Log[3] Log[13/3]) +
 1/120 x^5 (-10 Log[7/3] - Log[3] + 20 Log[7/3] Log[10/3] +
    5 Log[13/3] + 10 Log[4/3] Log[13/3] - 2 Log[3] Log[16/3])

In[16]:= % // N

Out[16]= 1.20695 - 1.73071 x - 0.560409 x^2 + 0.409604 x^3 +
 0.313403 x^4 + 0.155857 x^5

You can do SeriesCoefficient as well.

Regards,
Leonid


On Tue, Oct 26, 2010 at 1:34 PM, Sam Takoy <sam.takoy at yahoo.com> wrote:

> Hi,
>
> I'm working on a project involving infinite series and I don't know how
> to do it or even ask a sensible question about it. So I cooked up a
> question the answer to which might give me ideas.
>
> f[x_]:=Sum[c[n]x^n, {n, 1, Infinity}]
>
> What's the infinite series for
>
> f[x]^2 + Sin[x]f[x]
>
> in terms of c[n]?
>
> What's the simplest way that Mathematica can answer this question for
> general c[n]?
>
> The pipe dream is this:
>
> f[c_][x_] := Sum[c[n] x^n, {n, 1, Infinity}]
>
> g[c_][x_] := f[c][x]^2 + Sin[x] f[c][x]
>
> d[c_][n_] := SeriesCoefficient[g[c][x], {x, 0, n}]
>
> d[Log[# + 1/3]/Factorial[#] &][5] // N
>
> Thanks,
>
> Pavel
>
>


  • Prev by Date: How to make Mathematica automatically save a notebook to the same
  • Next by Date: Re: Researchers break speed barrier in solving important class of
  • Previous by thread: Can Mathematica do this (infinite series)?
  • Next by thread: Semi-symbolically Semi-numerically