I have a periodic function with given period $~2π~$
$$f(x) = \begin{cases}\pi - x,& 0\leq x< \pi,\\ 0,& \pi\leq x< 2\pi\\ \end{cases}$$
How can I draw a graph for $~-2π<X<2π~$
Thanks to everyone
I have a periodic function with given period $~2π~$
$$f(x) = \begin{cases}\pi - x,& 0\leq x< \pi,\\ 0,& \pi\leq x< 2\pi\\ \end{cases}$$
How can I draw a graph for $~-2π<X<2π~$
Thanks to everyone
On
So your function is peridoic with period $2\pi$. Calling your function for all intends and purposes $$f(x) = \begin{cases}\pi - x,& 0\leq x< \pi,\\ 0,& \pi\leq x< 2\pi\\ \end{cases}.$$
You can now define $f$ on all of $\mathbb{R}$ instead of just on $[0,2\pi]$ by setting for $y\in\mathbb{R}$ the value $f(y) = f(y_0)$, where $y_0 = y\,\mathrm{mod}\,2\pi$, i.e., $y_0\in[0,2\pi]$. You know how to plot the function on $[0,2\pi]$, so to plot the function over $[-2\pi,0)$ you just need to wonder which $y_0\in[0,2\pi)$ corresponds to a $y\in[-2\pi,0)$. For example taking $y=-\dfrac{1}{2}\pi$, then $y_0 = \dfrac{3}{2}\pi = y + 2\pi$ such that $f(y) = 0$.
In less mathematical words: You make a copy of your graph on $[0,2\pi)$ and move that copy $2\pi$ to the left. (the graph then in fact looks like what Gae. S. suggests.)
Draw the given pattern of the function (in blue below).
Repeat the pattern with a $2\pi$ period (in red below).