       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[t] g[t] + Sqrt g[t] g[t] + Sqrt g[t] g[t] +
2 g[t] g[t] + Sqrt g[t] g[t] - h[t] h[t] -
Sqrt h[t] h[t] - Sqrt h[t] h[t] -
2 h[t] h[t] - Sqrt h[t] h[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

```

• Prev by Date: Re: Automatically resizing graphs for printing
• Next by Date: generic binomial/trinomial tree
• Previous by thread: Re: Automatically resizing graphs for printing
• Next by thread: Re: problem with"Re" syntax