0
$\begingroup$

Suppose a sequence $(a_n)$ is defined as $a_n=1+\frac{(-1)^n}{n}$ for $n \geq 1$. I want to plot these points on a desmos graphing calculator.

However, the calculator does not accept $(-1)^n$, as it does not display any graph after I key in.

Question: Is it possible to express $a_n$ in terms of modulus or other functions so that it can be shown in the calculator?

  • 4
    A widely used continuous alternative to $(-1)^n$ is $\cos( \pi n)$. Try to plot $1+ \frac{\cos (\pi x)}{x}$2017-01-13

1 Answers 1

1

Replace $n$ by $\lfloor x\rfloor$ in both places and you'll get the graph you want, I think.

  • 0
    Does not give the same graph.2017-01-13
  • 0
    User170039 changed "floor" to $\lfloor x \rfloor$. This is not the notation that Desmos uses. You broke my answer. @A---B, The same graph as _what_?2017-01-13
  • 0
    Same graph as $y = 1 + (-1)^n/n$ - wofram alpha.2017-01-13