# How to sketch a function?

1. Dec 6, 2011

### bubokribuck

The function f(x) is periodic with period 2$\pi$ and is defined by
f(x) = -cos(x) when -$\pi$<x<0
= cos(x) when 0<x<$\pi$

Sketch f from x=-3$\pi$ to 3$\pi$.

My question is, when -$\pi$<x<0 and 0<x<$\pi$, how am I supposed to graph the function from -3$\pi$ to 3$\pi$?
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. Dec 6, 2011

### eumyang

Remember what was said in the beginning:
"The function f(x) is periodic with period 2π..." (emphasis mine)
You are shown how to graph f(x) from -π to π. Since f(x) is periodic, how would the graph of f(x) from π to 3π would look?

3. Dec 6, 2011

### bubokribuck

I have managed to come up with something (very roughly) like this:

Is this how it should be done?

4. Dec 6, 2011

### ehild

Yes, it is correct.

ehild

5. Dec 6, 2011

### bubokribuck

Not sure if I've done something wrong. The question states that "The function f(x) is periodic with period 2π", but at the moment my graph looks like it's only with period 1π.

6. Dec 6, 2011

### ehild

If something is periodic with pi, it is also periodic with 2pi.

Check. Choose an x and see if you get the same f(x) as in the graph.

x=-pi/3 for example. f(-pi/3)=-cos(pi/3)=-1/2. If x=-2pi/3, cos(2pi/3)=-0.5, f(-2pi/3)=-cos(2pi/3)=0.5.

ehild