So far every curve has come solved for y:
y = x^2, y = (3x+1)^5. But some curves
tangle y up with x and refuse to be
untangled. The circle of radius 5 is the classic example:
x^2 + y^2 = 25
We can still find the slope \frac{dy}{dx} — without ever solving
for y. The trick is to differentiate both sides with
respect to x, treating y as a
(hidden) function of x. Then every y-term
picks up an extra \frac{dy}{dx} by the
chain rule:
\frac{d}{dx}\bigl[y^2\bigr] = 2y\cdot\frac{dy}{dx}
That is the chain rule with an outer function u^2 and an inner
function y: bring the power down (2y),
then multiply by the derivative of the inside (\frac{dy}{dx}).
Differentiating the whole equation term by term:
2x + 2y\,\frac{dy}{dx} = 0
Now just solve for \frac{dy}{dx} — subtract
2x and divide by 2y:
\frac{dy}{dx} = -\frac{x}{y}
One formula gives the slope at every point of the circle. At
(3,4) the slope is
-\tfrac{3}{4}; at (4,3) it is
-\tfrac{4}{3}. No solving for y required.