MathGroup Archive 1998

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

Search the Archive

Problems Epanding Sums

  • To: mathgroup at smc.vnet.net
  • Subject: [mg13216] Problems Epanding Sums
  • From: Alan Mahoney <mahoney at purdue.edu>
  • Date: Mon, 13 Jul 1998 07:43:05 -0400
  • Organization: Purdue University
  • Sender: owner-wri-mathgroup at wolfram.com

I am learning Mathematica, and chose as my first project working toward
a Froebenius series solution to an ODE.  I have encountered a couple
questions, and would appreciate any help available.  I have not been
able
to find the info in Wolfram's FAQs. This is a simplified example.

(While I normally work from a notebook, these are from the text
interface
 for legibility)

> In[1]:= y[x_] := Sum[a[k] x^k,{k,0,Infinity}]
>
> In[2]:= y'[x]
>
>                     k
> Out[2]= Sum[D[a[k] x , x], {k, 0, Infinity}]

At this point, I would like to evaluate the derivatives inside the sum.

> In[3]:= % /. Sum[a_,b_] :> Sum[Evaluate[a],b]
>
> Sum::itform: Argument b_ at position 2
>      does not have the correct form for an iterator.
>
>                -1 + k
> Out[3]= Sum[k x       a[k], {k, 0, Infinity}]

It worked, but it tried to evaluate "Sum[a_,b_]" before substitution. Is
there a way around this?

Next, in preparation for taking some x's inside the sum, I continue with

> In[4]:= Normal[Series[Sin[x],{x,0,3}]] % == 0
>
>               3
>              x          -1 + k
> Out[4]= (x - --) Sum[k x       a[k], {k, 0, Infinity}] == 0
>              6
>
> In[5]:= Expand[%]
>
>               3
>              x          -1 + k
> Out[5]= (x - --) Sum[k x       a[k], {k, 0, Infinity}] == 0
>              6
>

Since the product is not at the top level due to the "== 0", the product
is not expanded.  No problem,

> In[6]:= ExpandAll[%]
>
> Sum::itform: Argument (ExpandAll[#1, Trig -> False, Modulus -> 0] & )[
>      {k, 0, Infinity}] at position 2
>      does not have the correct form for an iterator.
>
> Sum::itform: Argument (ExpandAll[#1, Trig -> False, Modulus -> 0] & )[
>      {k, 0, Infinity}] at position 2
>      does not have the correct form for an iterator.
>
>
> Out[6]= x Sum[(ExpandAll[#1, Trig -> False, Modulus -> 0] & )[Expand[
>
>                   k
> >         D[a[k] x , x]]], (ExpandAll[#1, Trig -> False, Modulus -> 0] & )[
>
>                                 3
> >        {k, 0, Infinity}]] - (x
>
> >        Sum[(ExpandAll[#1, Trig -> False, Modulus -> 0] & )[Expand[
>
>                     k
> >           D[a[k] x , x]]], (ExpandAll[#1, Trig -> False, Modulus -> 0] & )[
>
> >          {k, 0, Infinity}]]) / 6 == 0

Not only is this unuseful, it causes the front-ent to segmentation
fault.
What is the proper way to deal with this?

--
Alan W. Mahoney			mahoney at purdue.edu 1283 Chemical Engineering	Room B5
West Lafayette, IN  47907-1283	765+494-4052


  • Prev by Date: Problems using TWJ contour for irregular data
  • Next by Date: symbolized symbol in LHS of function
  • Previous by thread: Problems using TWJ contour for irregular data
  • Next by thread: Re: Problems Epanding Sums