Re: define a function with variable coefficients
- To: mathgroup at smc.vnet.net
- Subject: [mg105882] Re: define a function with variable coefficients
- From: dh <dh at metrohm.com>
- Date: Wed, 23 Dec 2009 02:41:20 -0500 (EST)
- References: <hgq23i$g8d$1@smc.vnet.net>
Hi Adong,
"_" and "^" are a reserved characters and can not be used as a
super/subscripts. Instead use "Subscript" and "Superscript":
f[z_, t_] = Sum[Subscript[a, j][t]* Superscript[z, j], {j, 1, n}]
f[x, y]
Daniel
Andong He wrote:
> Hi,
> I wanna define f[z_, t_] = Sum[a_j*z^j, {j, 1, n}], where I use "_j" and "^j" to denote the subscript and superscript. It gives a f as a series, which is fine.
>
> But if I want a_j to be functions of t, say
> f[z_, t_] = Sum[a_j[t]*z^j, {j, 1, n}],
> it yields something which doesn't make sense. For example, it has terms a_(1+n)[t] and a_(2+n)[t] which are not even defined in my expression for f!!!
>
> Can anyone help me figure out what's going on? Thanks!
>