Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How do I represent this sine function?

  1. Mar 15, 2015 #1
    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!
     
  2. jcsd
  3. Mar 15, 2015 #2

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

    where x is zero or a positive even integer
     
  4. Mar 15, 2015 #3

    Mentallic

    User Avatar
    Homework Helper

    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\{
    \begin{array}{lr}
    0 & : n=2k\\
    1 & : n=4k+1\\
    -1 & : n=4k+3
    \end{array}
    \right.[/tex]
     
  5. Mar 15, 2015 #4

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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.
     
  6. Mar 17, 2015 #5
    Thank you so much for the responses everyone!
     
  7. Mar 18, 2015 #6

    Mentallic

    User Avatar
    Homework Helper

    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]
     
  8. Mar 19, 2015 #7

    jbunniii

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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: Mar 19, 2015
  9. Mar 20, 2015 #8

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Yup. As I thought. Nothing "simpler" than ##\sin\frac{n\pi} 2## itself.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: How do I represent this sine function?
  1. How do i solve this? (Replies: 5)

  2. How do I solve this? (Replies: 11)

  3. How do I write this? (Replies: 11)

Loading...