# How to Plot a 'sum' function

• May 24th 2009, 11:48 PM
new guy
How to Plot a 'sum' function
Hi all ,
I'm a newbie with the Mathematica program . I'm trying to draw the function in the photo .

N=10
-2<t<2

In the second image you can see what I wrote . nonetheless ,I got a message says: Syntax::sntxi: Incomplete expression; more input is needed.

What am I doing wrong ?

Thanks (:
• May 25th 2009, 04:38 AM
shawsend
Quote:

Originally Posted by new guy
Hi all ,
I'm a newbie with the Mathematica program . I'm trying to draw the function in the photo .

N=10
-2<t<2

In the second image you can see what I wrote . nonetheless ,I got a message says: Syntax::sntxi: Incomplete expression; more input is needed.

What am I doing wrong ?

Thanks (:

Don't use brackets for the exponential. Just use parenthesis. Also, should specify explicitly the Re or Im component of the function like:

Code:

```Plot[Re[Sum[E^(2*Pi*I*k*t),     {k, -10, 10}]], {t, -2, 2}]```
• May 25th 2009, 05:38 AM
CaptainBlack
Quote:

Originally Posted by shawsend
Don't use brackets for the exponential. Just use parenthesis. Also, should specify explicitly the Re or Im component of the function like:

Code:

```Plot[Re[Sum[E^(2*Pi*I*k*t),     {k, -10, 10}]], {t, -2, 2}]```

It is already real, it just needs simplifying.

CB
• May 25th 2009, 09:31 AM
new guy
First of all thank you both .

Second ,how do know that it needs to be Re and not Im ?
• May 25th 2009, 12:02 PM
CaptainBlack
Quote:

Originally Posted by new guy
First of all thank you both .

Second ,how do know that it needs to be Re and not Im ?

because if you pair terms with positve and negative indices of the same magnitude one is the conjugate of the other, and so such pairs have a real sum.

CB