a weak derivative
How do you differentiate a function with a corner, where the ordinary derivative jumps and the second derivative seems to blow up? The weak derivative is the answer: it transfers the differentiation off the rough function and onto a perfectly smooth test partner, using integration by parts as the bridge. It keeps everything that integration by parts requires while quietly dropping the demand that the function be smooth.
Here is the mechanism in one move. For a nice function u, integration by parts says integral of (the derivative of u) times phi dx = minus integral of u times (the derivative of phi) dx, for any smooth bump function phi that vanishes near the boundary (the boundary terms die because phi is zero there). The right-hand side never differentiates u — it only differentiates phi. So we turn that identity into a definition: we say a function g is the weak derivative of u (in direction x_i) if integral of g times phi dx = minus integral of u times (the partial derivative of phi with respect to x_i) dx holds for every such test function phi. Whenever a classical derivative exists it satisfies this, so the weak derivative agrees with the ordinary one and extends it to functions that have no pointwise derivative. Higher weak derivatives just integrate by parts more times, each flip contributing a minus sign: integral of (k-th weak derivative of u) phi = (-1)^k integral of u (k-th derivative of phi).
This is the keystone the whole Sobolev edifice rests on — a Sobolev space is precisely the set of functions whose weak derivatives (up to some order) exist and are integrable enough. The weak derivative is the same idea as the distributional derivative, just restricted to cases where the result is an honest function rather than something singular like a delta. Caveat: not every function has a weak derivative that is a function — the absolute value |x| does (its weak derivative is the sign function), but the step function does not, because differentiating a jump produces a Dirac delta, which is a distribution, not a function. So 'weak derivative' is the well-behaved middle ground between classical derivatives and full-blown distributions.
Take u(x) = |x| on (-1, 1). For any test phi, integration by parts on each side of 0 gives integral of |x| phi'(x) dx = minus integral of sgn(x) phi(x) dx, where sgn(x) is -1 for x < 0 and +1 for x > 0. By definition this says the weak derivative of |x| is sgn(x): a genuine (bounded, integrable) function, even though |x| has no classical derivative at 0.
Integration by parts defines the derivative of |x| as sgn(x) — no smoothness at the corner required.
A weak derivative, when it exists, is unique only up to changing the function on a set of measure zero — Sobolev functions are really equivalence classes. And a function can have a weak first derivative but not a weak second: each order is a separate requirement.