Follow a curve. Keep F constant.
[(x + y)/(1 + y²)] y′ = −x − arctan y
The slope field tells us how to move. A level curve tells us what stays unchanged. For this equation, both describe the same local solution.
The solution follows a contour of F
F(x, y) = ½x² + x arctan y + ½ ln(1 + y²)
Changing C selects a different level curve. Moving along the selected curve keeps C fixed.
The point moves toward increasing x and stops at the right endpoint. Switch arcs to inspect the other solution branch.
Open circles mark vertical tangencies. Each arc between them is a graph y(x); the whole closed contour is not one global graph.
The point moves
The terms change
The total stays fixed
dF/dx = Fₓ + Fᵧ y′
Follow the orange tangent: the contributions to the change in F cancel.
Why does the field follow these contours?
M = x + arctan y, N = (x + y)/(1 + y²)
Both have continuous first partial derivatives on the whole plane, and Mᵧ = Nₓ = 1/(1 + y²). The exactness criterion applies. Here Fₓ = M and Fᵧ = N, so along any solution:
dF/dx = M + N y′ = 0 ⟹ F(x, y) = C.
At a point where N ≠ 0, the slope of the contour is y′ = −M/N, exactly the slope prescribed by the ODE. An initial condition (x₀, y₀) selects the level C = F(x₀, y₀).
The exactness criterion: a necessary and sufficient condition
Let M and N have continuous first partial derivatives on an open rectangle R. The equation M dx + N dy = 0 is exact on R if and only if Mᵧ = Nₓ throughout R.
In this case, there is a function F on R with Fₓ = M and Fᵧ = N. Thus M dx + N dy = dF = 0, and solutions lie on level curves F = C. A level curve locally defines a solution y(x) wherever N = Fᵧ ≠ 0.
Recover F from the equation
First integrate Fₓ = x + arctan y with respect to x:
F = ½x² + x arctan y + g(y).
The missing part may be any function of y, since its partial derivative with respect to x is zero. Now match Fᵧ to N:
x/(1 + y²) + g′(y) = (x + y)/(1 + y²).
Therefore g′(y) = y/(1 + y²), so g(y) = ½ ln(1 + y²), up to a constant absorbed into C.
What happens at the endpoints, and how is the animation computed?
At the two marked endpoints, N = 0 while M ≠ 0. The contour has a vertical tangent, and M + N y′ = 0 cannot hold for a finite derivative y′ there. These points are limits of the displayed y(x) branches, not included endpoints of their intervals of solution. No slope-field segment is assigned where N = 0.
The closed contour consists of two graph branches sharing these limiting endpoints. Playback stays on one branch and stops; it does not continue through a vertical tangent as a single y(x).
Each displayed point is found by solving the implicit relation F(x, y) = C. The readout independently evaluates F at that point; the small residual |F − C| reflects numerical rounding. This illustrates the exact solution relation, rather than testing an ODE time-stepping method.