I learned how to plot direction fields according to the answer of @Robert Jacobson to the question How can I plot the direction field for a differential equation?. However, when I tried to plot the direction field for $\dfrac{dy}{dx}=\dfrac{x}{y}$, the direction field produced was wrong.
This is what I got:
The gradients at y = 0
are supposed to be infinity and there are supposed to be vertical red line segments on the x-axis. I cannot figure out why.
F[x_, y_] := x/y
VectorPlot[{1, F[x, y]}/Sqrt[1 + F[x, y]^2], {x, -3, 3}, {y, -3, 3},
VectorScale -> 0.025,
VectorPoints -> 13,
VectorStyle -> {"Segment", Red},
Frame -> None,
Axes -> True,
AxesStyle -> Directive[Black, 15.5, FontFamily -> "Times",
AxesLabel -> {x, y},
Arrowheads[.03]],
Ticks ->
{{-3, {-2.5, ""}, -2, {-1.5, ""}, -1, {-0.5, ""}, 0,
{0.5, ""}, 1, {1.5, ""}, 2, {2.5, ""}, 3},
{-3, {-2.5, ""}, -2, {-1.5, ""}, -1, {-0.5, ""}, 0,
{0.5, ""}, 1, {1.5, ""}, 2, {2.5, ""}, 3}}]
PlotPoints
putting the odd numbers. $\endgroup$