Re: problem with"Re" syntax
- To: mathgroup at smc.vnet.net
- Subject: [mg116810] Re: problem with"Re" syntax
- From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
- Date: Tue, 1 Mar 2011 05:21:26 -0500 (EST)
- References: <ikan2k$cdr$1@smc.vnet.net>
The problem is not Re. It's that Mathematica assumes that your a, b, g and h functions may be complex valued. If that's not the case then you could use ComplexExpand to say so: ComplexExpand[Re[del]] g[0][t] g[1][t] + Sqrt[2] g[1][t] g[2][t] + Sqrt[3] g[2][t] g[3][t] + 2 g[3][t] g[4][t] + Sqrt[5] g[4][t] g[5][t] - h[0][t] h[1][t] - Sqrt[2] h[1][t] h[2][t] - Sqrt[3] h[2][t] h[3][t] - 2 h[3][t] h[4][t] - Sqrt[5] h[4][t] h[5][t] Cheers -- Sjoerd On Feb 26, 12:10 pm, tarun dutta <tarundut... at gmail.com> wrote: > c[i_][t] = a[i][t] + I*b[i][t]; > d[i_][t] = g[i][t] + I*h[i][t]; > del = Together[Sum[Sqrt[i]*d[i - 1][t]*d[i][t], {i, 0, 5}]] > Re[del] > > the problem is that after executing the program, as output I am not > able to get only the real part of the expression(del).the output > contains the whole expression though i am using "Re" term. > > some valuable insight will be much appreciated. > regards, > tarun