# Math Help - notation.

1. ## notation.

if i have:

for even n,
An= 4[(-1)^(n/2)-1]/(π^2n^2)

and for odd n,
An= 2[πn(-1)^((n-1)/2)-2]/(π^2n^2)

can i use proper notation to write this all in one line?

2. Originally Posted by linalg123
if i have:

for even n,
An= 4[(-1)^(n/2)-1]/(π^2n^2)

and for odd n,
An= 2[πn(-1)^((n-1)/2)-2]/(π^2n^2)

can i use proper notation to write this all in one line?
Dear linalg123,

This is a piecewise function. So you could write,

$A_n=\left\{\begin{array}{cc}\dfrac{4\left((-1)^{\frac{n}{2}}-1\right)}{\pi^{2n^2}}&\mbox{ if n is even}\\\dfrac{2\left(\pi n(-1)^{\frac{n-1}{2}}-2\right)}{\pi^{2n^2}} & \mbox{ if n is odd}\end{array}\right.$

3. If $A_n$ is equal to A for n odd and B for n even you can also write it as

$A\frac{1- (-1)^n}{2}+ B\frac{1+ (-1)^n}{2}$

Do you see why?