Re: Problems Epanding Sums
- To: mathgroup at smc.vnet.net
- Subject: [mg13259] Re: Problems Epanding Sums
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Fri, 17 Jul 1998 03:17:52 -0400
- Organization: University of Western Australia
- References: <6oersd$guj$12@dragonfly.wolfram.com>
- Sender: owner-wri-mathgroup at wolfram.com
Alan Mahoney wrote:
> I am learning Mathematica, and chose as my first project working toward
> a Froebenius series solution to an ODE.
When dealing with Sums, I find that omitting the (explicit) Sum and
using the Einstein summation convention, which sums over repeated
indicies, is advantageous. (This is, implicitly, what a human really
does).
> (While I normally work from a notebook, these are from the text
> interface for legibility)
You could always post your Notebook too? I really wish that this
newsgroup properly supported Notebook attachments ... :-(
For your example, we omit the Sum altogether:
In[1]:= y[x_] := a[k] x^k
In[2]:= y'[x]
Out[2]=
-1 + k
k x a[k]
In[3]:= Normal[Series[Sin[x],{x,0,3}]]%//Expand
Out[3]=
k 1 2 + k
k x a[k] - - k x a[k]
6
Using pattern-matching and Collect, we obtain the recurrence relation
that you are after:
In[4]:= %/.c_ x^(k+n_.):>(c x^(k+n)/.k->k-n)
Out[4]=
1 k k
-(-) (-2 + k) x a[-2 + k] + k x a[k]
6
In[5]:= Collect[%,x,Simplify]
Out[5]=
1 k
-(-) x ((-2 + k) a[-2 + k] - 6 k a[k])
6
Cheers,
Paul
____________________________________________________________________
Paul Abbott Phone: +61-8-9380-2734
Department of Physics Fax: +61-8-9380-1014
The University of Western Australia Nedlands WA 6907
mailto:paul at physics.uwa.edu.au AUSTRALIA
http://www.pd.uwa.edu.au/~paul
God IS a weakly left-handed dice player
____________________________________________________________________