# Confusion regarding DFT calculation?

I am studying Richard lyon chap3 , article "Understanding the DFT equation "

But i am bit confused how x(n) is calculated specially x(0) and x(1) because apparently x(n) is calculated by plugging values of n and ts in eq 3.11

If this is the case, then why we are getting exactly same value of x(0) and x(1)

I have attached snapshot

Have you tried plugging in the values? It's just the way it turns out because

$$x[0]=\frac12\sin(3\pi/4)$$

and

$$x[1]=\sin(\pi/4)+\frac12\sin(\pi/2+3\pi/4)$$

But since $$\sin(3\pi/4)=\sin(\pi/4)$$ and $$\sin(x+\pi)=-\sin(x)$$ you get

$$x[1]=\sin(\pi/4)-\frac12\sin(\pi/4)=\frac12\sin(\pi/4)=\frac12\sin(3\pi/4)=x[0]$$

• sin(x+pi)=-sin(x) how you relate to current scenario? I am unable to see plain pi term ,although it appears as fractions though – Man May 27 at 9:47
• @Man: $\sin(\pi/2+3\pi/4)=\sin(\pi/4 + \pi)=-\sin(\pi/4)$ – Matt L. May 27 at 9:52
• @Man basic trigonometric function knowledge is very helpful when dealing with these functions! (This is actually high-school level math, but if it helps: draw a plot of a sine, and verify visually that $\sin(x+\pi)=-\sin(x)$, it's not hard.) – Marcus Müller May 27 at 9:55
• @Man, MarcusMüller Even easier using (cosine,sine) points on the unit circle. All of Matt L.'s relations too. A calculator could have easily resolved the original question numerically. C'mon Man, pick up the spoon yourself. (No, I'm not the question downvoter.) – Cedron Dawg May 27 at 11:17