0

Let's say I've the following function (that is also periodic over the rest of the region I did not define):

$$ \begin{cases} 4\sin\left(2x\right)\space\space\space\space\space\space\space\space\space\text{when}\space0\le x<\pi\\ \\ 4\exp\left(-2x\right)\space\space\space\space\space\text{when}\space\pi\le x<2\pi \end{cases}\tag1 $$

So, after $2\pi$ the sine part of the function start again. How can I plot that function in Mathematica 10.0?

Jan Eerland
  • 2,001
  • 10
  • 17

1 Answers1

0

Your function is a bit bizarre, so I have modified it a bit to show its periodicity better:

Piecewise[{{Sin[x], Mod[x, 2 Pi] < \[Pi]}}, -Abs@Cos[x]]

enter image description here

Plot[Piecewise[{{Sin[x], Mod[x, 2 Pi] < \[Pi]}}, -Abs@Cos[x]], {x, -8, 8}]

enter image description here