Plotting a function outside its defined interval

34 Views Asked by At

I have a function, $f(t)$ which is $f(t)=t-t^2$ IF $t\in [0,1]$. The function is odd, and has a period of 2. I want to draw it on the interval $[-2,2]$. How is that done, since it is only defined on $[0,1]$, except for ignoring the boundaries and drawing $f(t)$ on an undefined interval?

Thanks

1

There are 1 best solutions below

1
On BEST ANSWER

"I have a function $f(t)=t−t^2$ which is defined on $t\in[0,1]$. The function is odd, ..."

This makes no sense. For a function to be odd it needs to be defined in a set that is symmetric w.r.t $0$

A function $f(t)=t−t^2$ which is defined on $[0,1]$ may be extended in a unique way to an odd function defined on $[-1,1]$, and it can be extended in an infinity of ways to a odd function defined on $[-2,2]$

By the way, the unique odd function that extends $f$ to $[-1,1]$ is $g(t) = t - \left|t\right| t$

Edit: After the edition the question makes more sense. There's a unique odd function with period $2$ that takes the value $t-t^2$ for $t \in [0,1]$. That function is $$\left(t-2\left\lfloor\frac{t+1}{2}\right\rfloor\right)\left(1-\left|t-2\left\lfloor\frac{t+1}{2}\right\rfloor\right|\right)$$