How do I represent this sine function?

  • Thread starter Thread starter eprparadox
  • Start date Start date
  • Tags Tags
    Function Sine
eprparadox
Messages
133
Reaction score
2
I was struggling to represent the following for integer values of n:

<br /> \sin \left( \dfrac {n\pi } {2}\right) <br />

I know for even n, we get zero

But for odd n, it alternates beween 1 and -1 for every other odd. Is there a compact way to represent that? I feel like I'm being dumb and missing something obvious.

Thanks!
 
Mathematics news on Phys.org
eprparadox said:
I was struggling to represent the following for integer values of n:

<br /> \sin \left( \dfrac {n\pi } {2}\right)<br />

But for odd n, it alternates beween 1 and -1 for every other odd. Is there a compact way to represent that? I feel like I'm being dumb and missing something obvious.

Thanks!
1 when n = 1 + 2x
-1 when n = 3 + 2x

where x is zero or a positive even integer
 
What you have is a piecewise function (the variable being n in this case).

k\in \mathbb{Z} \\ f(n) = \sin{\frac{\pi n}{2}} = \left\{<br /> \begin{array}{lr}<br /> 0 &amp; : n=2k\\<br /> 1 &amp; : n=4k+1\\<br /> -1 &amp; : n=4k+3<br /> \end{array}<br /> \right.
 
I guess you are looking for something similar to ##\cos(n\pi) = (-1)^n## for ##\sin(\frac{n\pi} 2)##. You may be able to find such an expression, but I don't think you will find anything "simpler" than ##\sin(\frac{n\pi} 2)## itself, unless you consider piecewise defined functions simpler. I don't.
 
Thank you so much for the responses everyone!
 
I gave it a little more thought and came up with
\sin\left(\frac{n\pi}{2}\right)=\frac{1}{2}\left(-1\right)^{\frac{n-1}{2}}\left(1-(-1)^n\right)
 
How about
$$\sin\left(\frac{n\pi}{2}\right) = \frac{1}{2i}\left(i^n - (-i)^n\right) = \frac{1}{2}\left(i^{n-1} + (-i)^{n-1}\right)$$

[edit]: I guess that's equivalent to Mentallic's answer. Here's how I obtained it:

$$\begin{aligned}
\sin\left(\frac{n\pi}{2}\right) &= \text{Im}\left(e^{in\pi/2}\right) \\
&= \frac{1}{2i} \left(e^{in\pi/2} - \overline{e^{in\pi/2}}\right) \\
&= \frac{1}{2i} \left(i^n - \overline{i^n}\right) \\
&= \frac{1}{2i} \left(i^n - (-i)^n\right) \\
\end{aligned}$$
 
Last edited:
Yup. As I thought. Nothing "simpler" than ##\sin\frac{n\pi} 2## itself.
 
Back
Top