Question: Plotting a piecewise function

Hi,

Im trying to plot the piecewise function that looks like this:

(1-x^2)/((x-1)(x-3)) for x<1 and x>3

x for x=1..3

 

I have entered the function like this:

f:=x-> piecewise(x < 1, ((1-x^2)/(x-1)(x-3)), x = 1 .. 3, x, 3 < x, (1-x^2)/(x-1)(x-3));plot(f);

And plotting it with:

plot(f);

And then i get this result:

In the interval x=1..3 it seams like the value for the function is calculated to zero instead of being equal to x. Can anyone help me?

Please Wait...