In short

Given a family of curves, an orthogonal trajectory is a curve that crosses every member of the family at a right angle. You find them by writing down the differential equation the family satisfies, replacing \dfrac{dy}{dx} with -\dfrac{dx}{dy}, and solving the new differential equation. An isogonal trajectory generalises this to any fixed angle \alpha: the replacement becomes a rational function of the old slope and \tan\alpha.

Pour iron filings on a sheet of paper, set a bar magnet underneath, and tap the paper. The filings snap into a pattern of curves that flow from the north pole to the south pole. Now imagine drawing, on top of that picture, a second family of curves — one curve through each point — each of which crosses every single magnetic field line at exactly a right angle. These second curves are a physical thing: they are the lines along which the magnetic potential is constant. Physicists call them equipotential curves. Mathematicians call them the orthogonal trajectories of the field lines.

The same thing happens with a pool of still water that you heat from the bottom. The temperature inside the water is a function of position: warmer near the heater, cooler near the top. If you draw the curves where the temperature is constant (the isotherms), and then draw the curves along which heat actually flows, the two families cross each other at right angles everywhere. One family is orthogonal to the other.

This is not an exotic coincidence. It is how electric fields relate to equipotentials, how fluid stream lines relate to potential lines, how the level curves of a mountain relate to the lines of steepest descent. Two families of curves, locked together by a right angle. And the tool that lets you compute one family from the other is a differential equation.

A specific family to stare at

Take the family of circles x^2 + y^2 = c^2 — all circles centred at the origin, one for each value of the constant c. Not one circle. The whole infinite collection: a tiny circle for c = 0.1, a bigger one for c = 1, a much bigger one for c = 5, and so on. Every point in the plane (except the origin) lies on exactly one of these circles.

Now suppose you want to draw a curve that, at every point it passes through, crosses the circle at that point at a right angle. What does such a curve look like? Stare at the picture for a moment.

At the point (1, 0), the circle through that point is x^2 + y^2 = 1. The tangent to the circle at (1, 0) is vertical. For your new curve to cross the circle at a right angle there, it must be horizontal at (1, 0) — it must point along the x-axis. The same reasoning at (3, 0), at (-2, 0), at any point on the x-axis: your new curve is horizontal there.

At the point (0, 2), the circle's tangent is horizontal. So your new curve must be vertical — pointing straight along the y-axis. The same at (0, -5), at (0, 1), and so on.

At the point (1, 1), the circle's tangent has slope -1. For perpendicularity, your new curve needs slope +1 there.

A pattern is forming. At every point (x, y), your new curve is pointing radially outward from the origin. So the new curves are simply the straight lines through the origin: y = mx for every slope m. This family is the orthogonal trajectories of the family of circles. And the picture of the two families together — circles and radial lines — is the one you've seen on every compass and every ripple in a pond.

The family of circles $x^2 + y^2 = c^2$ (in black) and its orthogonal trajectories $y = mx$ (in red, dashed). Every red line crosses every black circle at a right angle. Each family is a bundle of curves, and the two bundles mesh together perpendicularly.

The question is: how would you have found the second family if you had only been given the first one — without guessing by staring at the picture? That is the question this article answers.

From a family to a differential equation

The first idea is that any family of curves with a parameter c can be stripped of that parameter and turned into a differential equation — and the differential equation is what captures the slope of the family member at every point.

Take the circles x^2 + y^2 = c^2. Differentiate both sides with respect to x, treating y as a function of x:

2x + 2y \frac{dy}{dx} = 0

Solve for \dfrac{dy}{dx}:

\frac{dy}{dx} = -\frac{x}{y}

The constant c is gone. What remains is a rule that says: at every point (x, y) in the plane, the member of the family passing through that point has slope -\dfrac{x}{y}. At (1, 0) the slope is -\dfrac{1}{0}, which means vertical — matching what you saw above. At (0, 2) the slope is 0 — horizontal. At (1, 1) it is -1. Everything checks out.

This equation \dfrac{dy}{dx} = -\dfrac{x}{y} is the differential equation of the family. Every circle in the family satisfies it. The differential equation is what the family is, if you strip away the specific value of c.

The perpendicularity trick

Here is the one idea on which everything rests. If two curves cross at a point and are perpendicular there, the slopes of their tangent lines at that point multiply to -1:

m_1 \cdot m_2 = -1

This is a standard fact about perpendicular lines. So if the original family has slope m_1 at a point, the orthogonal trajectory through that point must have slope

m_2 = -\frac{1}{m_1}.

Translated into differential equations: if the original family satisfies

\frac{dy}{dx} = f(x, y),

then the orthogonal trajectories satisfy

\frac{dy}{dx} = -\frac{1}{f(x, y)}.

In operational terms: write down the differential equation of the family, then replace \dfrac{dy}{dx} by -\dfrac{1}{\,dy/dx\,} = -\dfrac{dx}{dy}. Solve the new equation. Its solutions are the orthogonal trajectories.

Orthogonal trajectory procedure

Given a family of curves F(x, y, c) = 0:

  1. Differentiate with respect to x to get an equation involving x, y, \dfrac{dy}{dx}, and c.
  2. Eliminate c using the original family equation, obtaining a differential equation \dfrac{dy}{dx} = f(x, y).
  3. Replace \dfrac{dy}{dx} by -\dfrac{dx}{dy} to get the differential equation of the orthogonal family.
  4. Solve the new differential equation. Its one-parameter family of solutions is the orthogonal trajectories.

Now watch it work.

Computing one from the definition

Example 1: circles centred at the origin

Find the orthogonal trajectories of the family x^2 + y^2 = c^2.

Step 1. Differentiate the family with respect to x.

2x + 2y \frac{dy}{dx} = 0 \quad \Longrightarrow \quad \frac{dy}{dx} = -\frac{x}{y}

Why: you want the slope of whichever circle happens to pass through (x, y), stripped of the parameter c. The parameter drops out naturally because differentiating c^2 gives zero.

Step 2. Replace \dfrac{dy}{dx} by -\dfrac{dx}{dy}.

-\frac{dx}{dy} = -\frac{x}{y} \quad \Longrightarrow \quad \frac{dx}{dy} = \frac{x}{y}

Why: the new slope must be the negative reciprocal of the old slope at every point. That is the perpendicularity condition, written into the equation itself.

Step 3. Separate the variables and integrate.

\frac{dx}{x} = \frac{dy}{y}
\int \frac{dx}{x} = \int \frac{dy}{y} \quad \Longrightarrow \quad \ln |x| = \ln |y| + C_1

Why: the equation is already in separable form — all the x's are on one side and all the y's on the other. Integrate each side with its own variable.

Step 4. Solve for y in terms of x.

\ln |x| - \ln |y| = C_1 \quad \Longrightarrow \quad \ln \left|\frac{x}{y}\right| = C_1 \quad \Longrightarrow \quad \frac{x}{y} = \pm e^{C_1}

Let m = \pm e^{-C_1} be a new arbitrary constant. Then

y = m x.

Why: absorbing the logarithm constant into a single multiplicative constant is standard practice. The sign ambiguity is absorbed into the constant too, so m can be any real number.

Result: The orthogonal trajectories of x^2 + y^2 = c^2 are the straight lines y = mx — exactly the radial lines through the origin, as the picture predicted.

Zooming in on the intersection of the circle $x^2 + y^2 = 9$ and the line $y = x$: the circle's tangent at $(\sqrt{4.5},\sqrt{4.5})$ has slope $-1$, and the line itself has slope $+1$. The product is $-1$, so they cross at a right angle — exactly what the computation predicts.

A second example, for the pattern

Example 2: parabolas $y^2 = 4ax$

Find the orthogonal trajectories of the family of parabolas y^2 = 4ax, where a is the parameter.

Step 1. Differentiate the family.

2y \frac{dy}{dx} = 4a \quad \Longrightarrow \quad \frac{dy}{dx} = \frac{2a}{y}

Why: you want the slope at (x, y) in terms of x and y — but right now there's still an a hanging around.

Step 2. Eliminate a using the original equation y^2 = 4ax, so a = \dfrac{y^2}{4x}. Substitute back:

\frac{dy}{dx} = \frac{2}{y} \cdot \frac{y^2}{4x} = \frac{y}{2x}

Why: any occurrence of a must be replaced by something that depends only on x and y, because a differential equation of a family can't contain the family parameter.

Step 3. Replace \dfrac{dy}{dx} by -\dfrac{dx}{dy}.

-\frac{dx}{dy} = \frac{y}{2x} \quad \Longrightarrow \quad 2x \, dx = -y \, dy

Step 4. Integrate both sides.

\int 2x \, dx = -\int y \, dy
x^2 = -\frac{y^2}{2} + C

Rearranging:

x^2 + \frac{y^2}{2} = C \quad \Longrightarrow \quad \frac{x^2}{C} + \frac{y^2}{2C} = 1

Result: The orthogonal trajectories are the family of ellipses 2x^2 + y^2 = 2C. Each ellipse has its semi-axes in the ratio 1 : \sqrt{2} — taller than it is wide.

The parabolas $y^2 = 4ax$ (black) and their orthogonal trajectories, the ellipses $2x^2 + y^2 = 2C$ (red, dashed). At every intersection the two curves cross at a right angle. This pair of families arises in electrostatics — the field lines around a charged plate and their equipotentials look exactly like this.

Two families of curves, perpendicular everywhere, both falling out of one differential equation rearrangement. That is the power of the method.

Isogonal trajectories

What if you do not want a right angle — what if you want every trajectory to cross every curve in the family at some other fixed angle, say 30^\circ? Those are called isogonal trajectories, from the Greek for "equal angles." Orthogonal is just the special case \alpha = 90^\circ.

The derivation uses a formula you already know from coordinate geometry. If two lines have slopes m_1 and m_2, the angle \alpha between them satisfies

\tan \alpha = \left| \frac{m_2 - m_1}{1 + m_1 m_2} \right|.

Drop the absolute value for a moment (you can recover it by choosing the right branch) and solve for m_2 in terms of m_1:

\tan \alpha \,(1 + m_1 m_2) = m_2 - m_1
m_2 - m_1 - m_1 m_2 \tan\alpha = \tan\alpha
m_2(1 - m_1 \tan\alpha) = m_1 + \tan\alpha
m_2 = \frac{m_1 + \tan\alpha}{1 - m_1 \tan\alpha}.

So the recipe becomes: given the differential equation \dfrac{dy}{dx} = f(x, y) of the original family, the isogonal trajectories at angle \alpha satisfy

\frac{dy}{dx} = \frac{f(x, y) + \tan\alpha}{1 - f(x, y) \tan\alpha}.

Set \alpha = 90^\circ and note that \tan(90^\circ) is infinite. Divide top and bottom by \tan\alpha and let \tan\alpha \to \infty: the f(x,y)/\tan\alpha and 1/\tan\alpha terms vanish, leaving \dfrac{dy}{dx} = \dfrac{1}{-f(x,y)} = -\dfrac{1}{f(x,y)} — exactly the orthogonal rule from before. The isogonal formula is a strict generalisation.

For a concrete taste: take the family y = mx (all lines through the origin). Its differential equation is \dfrac{dy}{dx} = \dfrac{y}{x}. The isogonal trajectories at angle \alpha satisfy

\frac{dy}{dx} = \frac{y/x + \tan\alpha}{1 - (y/x)\tan\alpha} = \frac{y + x\tan\alpha}{x - y\tan\alpha}.

This is homogeneous of degree zero, and after the substitution y = vx and some patient algebra, the solution turns out to be a family of logarithmic spirals — curves of the form r = k e^{\theta \cot\alpha} in polar coordinates. Cut a spiral shell in half, look at the cross-section: a nautilus shell is a logarithmic spiral, and it crosses every radius through the centre at the same constant angle. Nature is running this construction for you.

Common confusions

A few things students reliably get wrong the first time they meet trajectories.

Going deeper

If you only need the recipe for exam problems, you are done: write the ODE of the family, swap \dfrac{dy}{dx} for -\dfrac{dx}{dy}, solve. The rest of this section is about why the recipe is a powerful physical idea, what it means in polar coordinates, and where it breaks down.

In polar coordinates

Sometimes the family is more natural to describe in polar coordinates (r, \theta) than in Cartesian coordinates. The perpendicularity condition transforms: the angle a curve makes with the radius vector at a point is captured by \tan\psi = r \dfrac{d\theta}{dr}. Two curves are orthogonal at a point when their \psi-angles differ by 90^\circ, which translates into

r \frac{d\theta}{dr} \Big|_{\text{orig}} \cdot r \frac{d\theta}{dr}\Big|_{\text{orth}} = -1.

So the polar replacement rule is "substitute r \dfrac{d\theta}{dr} with -\dfrac{1}{r \, d\theta/dr}," which simplifies to the crisp rule: replace \dfrac{dr}{d\theta} with -r^2 \dfrac{d\theta}{dr}. Try it on the family r = 2a\cos\theta (circles through the origin with centres on the x-axis) and you will get another family of circles through the origin — this time with centres on the y-axis. The perpendicularity of the two families is a classical result and, once you compute it, obvious from the picture.

Why perpendicularity is the natural rule

In physics, two families of curves arise together all the time: level curves of a scalar field and flow lines of the gradient of that field. The gradient always points perpendicular to the level curves — that is not a choice, that is a theorem of multivariable calculus. So whenever you compute a scalar potential and its gradient, you automatically generate a pair of orthogonal families. Electric field lines and equipotentials. Temperature gradients and isotherms. Altitude contour lines on a map and the lines of steepest descent that a raindrop would follow. Orthogonal trajectories are how you compute one family from the other, in a regime where you can't see the scalar field itself.

Self-orthogonal families

Sometimes a family is its own orthogonal trajectories. The family of parabolas y^2 = 4a(x + a), where a is the parameter, has this property: its orthogonal trajectories form the same family with a different value of a. Check it by running the procedure — the differential equation you get after the swap has the same solution form as the original. Such families are called self-orthogonal, and they come up in the study of confocal conics (ellipses and hyperbolas sharing the same foci, where each ellipse is perpendicular to each hyperbola at every crossing).

Where this leads next

You now know how to take a family of curves, turn it into a differential equation, and extract the perpendicular family by one rearrangement. This is the first real application of differential equations — the first time solving an ODE tells you something geometric you did not already know.