Working With Parametric Equations In Practice

The basic idea is that you stop writing y as a function of x and instead write both x and y as functions of some third variable, usually t. You get dx/dt and dy/dt instead of a single derivative. Everything else follows from that shift. The chain rule does the rest. When you need the slope of the curve at any point, you compute dy/dx by dividing dy/dt by dx/dt. That is the first thing that trips people up because it only works when dx/dt is not zero. If dx/dt equals zero at some value of t, you have either a vertical tangent or a cusp, and you need to check the limit carefully rather than just declaring the derivative undefined. I learned that the hard way on a project involving a curtate cycloid where the parameter passed through a point where both derivatives were momentarily zero. L'Hopital's rule applied twice before you got a finite result. Without that, you waste an afternoon wondering why your plotting script keeps spitting out NaN values.

Calculus Of Parametric Equations

For arc length, you integrate the square root of dx/dt squared plus dy/dt squared over whatever interval of t you are working with. That formula is straightforward until you run into an integral that does not have an elementary antiderivative. Elliptic integrals show up here with any degree of regularity. When that happens, you switch to numerical quadrature. Gaussian quadrature with fifteen points gives you about six digits of accuracy on most smooth parametric curves in a fraction of a second. Area under a parametric curve works differently than you might expect from single variable calculus. You integrate y times dx/dt with respect to t. The sign matters because the curve can trace forward and backward as t increases. If you are computing area enclosed by a closed parametric loop, using Green's theorem in the form of one half the integral of x dy minus y dx gives you a more symmetric and numerically stable result. The one sided version fails when the curve doubles back on itself within the same t interval. Curvature is another place where direct formulas save you time. The standard expression is x prime times y double prime minus y prime times x double prime, all divided by the quantity x prime squared plus y prime squared raised to the three halves power. You do not want to re derive this every time. You also do not want to compute it by first finding the unit tangent vector and then differentiating it, because that introduces unnecessary floating point error. I saw a simulation team waste two days debugging curvature oscillations that turned out to be caused by evaluating the tangent vector at nearly collinear points on a finely sampled cubic Bézier curve. Plugging the raw derivatives directly into the formula eliminated the noise entirely.

The method has real limitations. Parametric representations introduce a parameter that has no physical meaning in many applications. Reparameterizing by arc length is theoretically clean but usually requires solving an integral numerically first, which defeats the purpose if you need speed. Singular points where both derivatives vanish break most symbolic computation packages unless you handle them explicitly. Polar curves are a special case of parametric curves, but trying to force every polar problem into parametric form just adds an extra layer of algebra for no gain. If you are doing this by hand, keep a table of derivatives organized by order. First derivatives for slope and area, second derivatives for curvature and concavity. Mix them up and you will carry sign errors through three pages of work. If you are doing this computationally, write a small wrapper that evaluates x, y, dx/dt, and dy/dt together at each sample point. It cuts runtime by roughly seventy percent on anything larger than a five minute trajectory because you stop recomputing the same expressions three times. The formulas themselves are not complicated. The difficulty comes from the boundary conditions and the singularities. Spend time checking what happens at the endpoints of your t interval before you integrate or differentiate further. Most of the problems I have seen over the years trace back to an endpoint where dx/dt crosses zero without anyone noticing.

Get the Full Details

Calculus 2: Parametric Equations (13 of 20) Parametric Equations with ...
Calculus 2: Parametric Equations (13 of 20) Parametric Equations with ...