I want to plot graph of this piecewise function in Methematica:
$f: [0, 1] \mapsto \mathbb{R} $
$f(x)= \begin{cases} \frac{1}{x - \frac{1}{3} } & \text{ if } x \in [0, \frac{1}{3}> \newline -1 & \text{ if } x = \frac{1}{3} \newline 18x-9 & \text{ if } x \in<\frac{1}{3}, \frac{2}{3}>\backslash \{ \frac{4}{9},\frac{5}{9} \} \newline 1 & \text{ if } x = \frac{2}{3} \newline \frac{1}{x - \frac{2}{3} } & \text{ if } x \in <\frac{2}{3}, 1] \end{cases}$
So I wrote this:
Plot[Piecewise[{{1/(x - 1/3), 0 <= x < 1/3},
{-1, x = 1/3},
{18 x - 9, 1/3 < x < 2/3 },
{1, x = 2/3},
{1/(x - 2/3), 2/3 < x <= 1}}],
{x, 0, 1}]
Wolfram only plots the first case{1/(x - 1/3), 0 <= x < 1/3}. I figured out that the {-1, x = 1/3} and {1, x = 2/3} cases make problem. How can I write them down correctly? Thanks!
