How do I represent this sine function?

  • Context: Undergrad 
  • 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:

[tex] \sin \left( \dfrac {n\pi } {2}\right) [/tex]

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:

[tex] \sin \left( \dfrac {n\pi } {2}\right)[/tex]

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).

[tex]k\in \mathbb{Z} \\ f(n) = \sin{\frac{\pi n}{2}} = \left\{<br /> \begin{array}{lr}<br /> 0 & : n=2k\\<br /> 1 & : n=4k+1\\<br /> -1 & : n=4k+3<br /> \end{array}<br /> \right.[/tex]
 
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
[tex]\sin\left(\frac{n\pi}{2}\right)=\frac{1}{2}\left(-1\right)^{\frac{n-1}{2}}\left(1-(-1)^n\right)[/tex]
 
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.
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 8 ·
Replies
8
Views
6K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 28 ·
Replies
28
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
12
Views
7K