The problem is the f[x]=
in the function to be plotted. Try it with a plain expression or define the function outside Plot
. (Plot analyzes the expression passed for discontinuities, but it apparently does not handle the case when the expression is of the form Set[f[x], expr]
.)
Either
Plot[(1 + x^2)/(-4 + x^2), {x, -6, 6},
PlotStyle ->
Directive[RGBColor[1, 0, 0], AbsoluteThickness[2.25],
Arrowheads[{-.05, .05}]],
GridLines -> {Range[-6, 6, 1], Range[-6, 6, 1]},
Ticks -> {Range[-6, 6, 1], Range[-6, 6, 1]}] /. Line -> Arrow
or
ClearAll[f];
f[x_] = (1 + x^2)/(-4 + x^2);
Plot[f[x], {x, -6, 6},
PlotStyle ->
Directive[RGBColor[1, 0, 0], AbsoluteThickness[2.25],
Arrowheads[{-.05, .05}]],
GridLines -> {Range[-6, 6, 1], Range[-6, 6, 1]},
Ticks -> {Range[-6, 6, 1], Range[-6, 6, 1]}] /. Line -> Arrow