# notation.

• May 19th 2011, 07:16 PM
linalg123
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?
• May 20th 2011, 03:32 AM
Sudharaka
Quote:

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.$
• May 21st 2011, 01:43 AM
HallsofIvy
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?