xaktly | Functions

Parametric functions

A new way to look at functions

So far we've looked at functions written as y = f(x) = (some function of the variable x) or x = f(y) = (some function of the variable y). Often, especially in physical science, it's convenient to look at functions of two or more variables (but we'll stick to two here) in a different way, as parametric functions. The easiest way of thinking about parametric functions is to introduce the concept of time.

Think about drawing a function like a parabola, from left to right, as time unfolds. Then it's easy to start thinking about both the x-coordinate and the y-coordinate changing as a function of time: x = f(t), y = g(t). In fact, we call time the parameter in this sense.

In this section we're going to explore functions for which a point on the graph, (x, y) is given by (f(t), g(t)) – parametric functions.

Parametric functions: Definition

Parametric functions are functions of a number of coordinates (2 for the 2-dimensional plane, 3 for 3-D space, and so on), where each of coordinate (x, y, z ...) is expressed as another function of some parameter, like time: x = f(t), y = g(t), z = h(t), and so on.

Function: $y = f(x)$       Parametric: $x = g(t), \: y = h(t)$

Example 1:   $f(t) = t^2 + t, \; g(t) = t + 1$

Let's take a look at this graph by making a table of (x, y) coordinates, but we'll match them up with the t's and keep track of those, too.

The x-coordinates of each point on the graph of this function are given by x = f(t), and the y's by y = g(t). The (x, y) pairs are plotted in the graph below. Clearly a sideways parabola like this isn't a function when written as y = f(x) because there are two y values for all but one of the x's in the domain. But in parametric form, there's one and only one (x, y) pair for each t. The function would actually have to loop back on itself and intersect to make a duplicate.

The parametric function $x = t^2, \; y = t + 1$ would be double-valued if written in y = f(x) form, but in parametric form, it's a perfectly acceptable single-valued function. There is a unique x and y for each value of t.

Notice also that the function actually has a direction as t increases; in this case it goes from down to up.

While t is often time, it doesn't have to be. In cases where time is a parameter, it couldn't, of course, take on negative values.

Example 2: The circle   $x^2 + y^2 = r^2$

In order to express a circle as a function, we'd need to solve for y as a function of x (in this case, the radius r would be a fixed number). In taking the required square root, we'd actually get two functions with the ± we'd have to attach to the radical, like this:

Now we have a functional form for either the top half of a circle (the "+" function) or the bottom (the "-" function), but not both. If we think about expressing x and y in terms of another variable, however, we can find a nice parametric form for a circle. The obvious parameter is the angle of the circle, measured, as usual, from the positive side of the x-axis in a counterclockwise direction. Here's the diagram:

So our parameterization is $x = r\cdot cos(\theta),$ and $y = r\cdot sin(\theta),$ which traces out a circle of radius r, from $\theta = 0$ to $\theta = 2\pi.$

You might recognize these transformations between polar coordinates (r, θ) and Cartesian coordinates (x, y) if you've worked in polar coordinates before.

Parametric curves have direction

If we calculate the first few points of that circle, say for angles of θ = 0, π/4 and π/2, we can see that the circle is traced in a counterclockwise direction as θ increases. Here are those values in a table:

and here's how they look on a plot of the circle:

Eliminating the parameter to regain functional form

That's a fancy way of saying "converting from parametric to function form." We'll take our first two examples as they were given in parametric form above, and see how we can get them back to functional form.

Take the first example above. We can eliminate the parameter, t, by rearranging the expression for y and plugging y-1 in for t in the expression for x.

We get

\begin{align} x &= (y - 1)^2 + y - 1 \\ &= y^2 - 2y + 1 + y - 1 \\ &= y^2 - y \end{align}

Now we can complete the square on y in a few steps to solve for y:

Identify the perfect square on the left and find a common denominator on the right to get:

$$\left( y - \frac{1}{2} \right)^2 = \frac{4x + 1}{4}$$

And finally

$$y = \frac{1 ± \sqrt{4x + 1}}{2}$$

We notice that this function comes in two halves, the upper and the lower, as we would expect for a sideways parabola.

The circle

Our first example had the parameterization

$$x = r\cdot sin(\theta) \; \; and \; \; y = r\cdot cos(\theta)$$

If we're lucky enough to recognize the possibilities in writing x2 + y2, we'll see that

\begin{align} x^2 + y^2 &= r^2 sin^2 (\theta) + r^2 cos^2 (\theta) \\[5pt] &= r^2(cos^2(\theta) + sin^2(\theta)) \\[5pt] &= r^2 \end{align}

... and this is just the equation of a circle of radius r. It turns out that parameterizations of the form $x = a\cdot cos(kx)$,   $y = a\cdot sin(kx)$ are very common in the physical sciences, so it's worth getting used to manipulating them if that's where you're headed.

Example 3: $x = 5\cdot cos(t)$,   $y = 2\cdot sin(t)$

First let's make a table to get an idea of the shape and direction of the graph of this curve, then we'll eliminate the parameter to shed some more light on it.

Here's what the graph of that looks like. The direction of the curve is counterclockwise. It's an ellipse with a major axis of 5 units and a minor axis of 2, so that gives us an idea of what the non-parametric form should look like.

Now let's convert to standard form by eliminating the parameter. Suspecting that this is an ellipse, which will involve the squares of x and y, we'll begin by squaring the parameterization:

\begin{align} x^2 &= 25 cos^2(t) \\ y^2 &= 4 sin^2(t) \end{align}

Now divide by 25 on the top and 4 on the bottom:

$$\frac{x^2}{25} = cos^2(t) \;\;\; \frac{y^2}{4} = sin^2(t)$$

Now we can add these two equations, using the Pythagorean identity to get one on the right side ...

$$\frac{x^2}{25} + \frac{y^2}{4} = cos^2(t) + sin^2(t) = 1$$

So the formula of our ellipse is

$$\frac{x^2}{25} + \frac{y^2}{4} = 1$$

which indeed has a long axis along x of length 10 (= 2 × 5) and a short axis along y of 4 units (2 × 2). See the conic sections section if you need a refresher on ellipses.

It's not necessarily worth memorizing, but we've also got the idea that the parameterization x = a·cos(t), y = b·sin(t) is an ellipse centered at the origin with axes of 2a and 2b.

Practice problems

Convert each of these parametric curves to y = f(x) form. Plot a few points of each in parametric form to get an idea of the shape of the curve.

 1 \begin{align} x &= 3 \, sin(t) \\[5pt] y &= 2 \, cos(t) \end{align} 2 \begin{align} x &= t \, cos(t) \\[5pt] y &= t \, sin(t) \end{align} 3 \begin{align} x &= t^2 + t \\[5pt] y &= 2t - 1 \end{align} 4 \begin{align} x &= sin^2(t) \\[5pt] y &= 2 \, cos(t) \end{align}

Parametric functions in Calculus

Parametric functions allow us to calculate (using integration) both the length of a curve and the amount of surface area on a given 3-dimensional curve. As you study

multi-variable calculus, you'll see that the idea of "surface area" can be extended to figures in higher dimensions, too. It's a tricky thing to wrap your head around, the surface area of a 5-dimensional object, but it's mathematically sound.

The slope of a parametric curve

Finding the slope of a parametric curve at a point is just finding the derivative at that point. The trouble is that we want dy/dx when what we have to work with is x = f(t) and y = g(t). But as long as we're working with the Leibniz form of derivative notation, the solution is pretty obvious:

$$\frac{\frac{dy}{dt}}{\frac{dx}{dt}} = \frac{dy}{dt} \cdot \frac{dt}{dx} = \frac{dy}{dx}$$

So to find the slope of a parametric function at a point, we take the derivative with respect to y and divide by the derivative with respect to x. This method can be generalized for higher dimensions, too.

Example

Find the slope and concavity of   $x = t^2$,   $y = 2 sin(t)$ at time   t = 3

Solution: First we find the derivatives of x and y with respect to t:

$$\frac{dx}{dt} = 2t \;\;\; \frac{dy}{dt} = 2cos(t)$$

Then take the ratio Dx / Dy:

$$\frac{dy}{dx} = \frac{2 cos(t)}{2t} = \frac{cos(t)}{t}$$

That's the general derivative of the function. Noticed that it's undefined at t = 0. The specific slope at t = 3 is

$$\frac{dy}{dx} \, \bigg|_{t = 3} = \frac{cos(3)}{3} = -0.330$$

(Remember that we do calculus in radians.)

Now to determine the concavity, we need to calculate the second derivatives. The second derivative is a bit tricky. It looks like this:

$$\frac{d^2y}{dx^2} = \frac{\frac{d}{dt} \left( \frac{dy}{dt}\right)}{\frac{dx}{dt}} = \frac{d}{dt} \frac{dy}{dx} \frac{dt}{dx}$$

Now we can take the second derivative of dy/dx and plug in the rest:

\begin{align} \frac{d^2y}{dx^2} &= \frac{\frac{d}{dt}\left(\frac{cos(t)}{t}\right)}{2t} \\ \\ &= \frac{-t sin(t) - cos(t)}{2t^3} \end{align}

Then we just evaluate that at x = 3:

$$\frac{d^2y}{dx^2} \, \bigg|_{t = 3} = \frac{-3 sin(3) - cos(3)}{2 \cdot 27} \gt 0$$

Here is a plot of that parametric function. The graph may not look concave up at t = 3, but there is an inflection point at about t = 2.7, and it is.

Example

Find all points of horizontal and vertical tangency on the curve $x = 3 cos(t), \; y = 3 sin(t)$

A tangent is horizontal to this parametric curve if dy/dt = 0 and dx/dt ≠ 0, and it is vertical if dx/dt = 0 and dy/dt ≠ 0. First we'll calculate the derivatives:

Now it's just a matter of plugging t = 0, π, π/2 and 3π/2 into our parametric equations to get vertical tangents at (3, 0) and (-3, 0), and horizontal tangents at (0, 3) and (0, -3).

The graph of this parametric function is a circle:

Arc length – length of a curve

Let's go back to a circle to calculate arc length. It's handy because we already know that the length of a circle is its circumference, $c = 2\pi r,$ so we should get that answer. If we take a chord, s, of the circle, we can calculate its length as shown below:

Now we can blow the circle up a bit and take an infinitesimally small chord, ds, and show that its length is just (ds)2 = (dx)2 + (dy)2.

So we have an equation for the length of the infinitesimal arc,ds:

$$dx = \sqrt{(dx)^2 + (dy)^2}$$

Here is how we incorporate the parameter, t, into that expression:

$$ds = \sqrt{\left( \frac{dx}{dt} \right)^2 + \left( \frac{dy}{dt} \right)^2}$$

Now we can use the parameterization, $x = r cos(t)$ and $y = r sin(t)$ (I'm switching from θ to t here because t is more commonly used to denote a parameter) to find

$$\left(\frac{dx}{dt}\right)^2 + \left(\frac{dy}{dt}\right)^2 = r^2[cos^2(t) + sin^2(t)]$$

where the term in square brackets is just one by the Pythagorean identity. We solve for ds by taking the square root of r2 to get

$$ds = r\, dt$$

Finally, we can integrate those infinitesimal segments of arc around the circle, from 0 to to find the formula for the circumference of a circle, c = 2πr – pretty cool.

$$s = \int_0^{2\pi} \, r\, dt = rt \bigg|_0^{2\pi} = 2\pi r$$

In general, we can state the length of a smooth curve in the box below.

Arc length

If a smooth curve is defined parametrically by

$$x = f(t), \: y = g(t) \: \: \text{ for a ≤ t ≤ b}$$

then its length is given by

$$s = \int_a^b \sqrt{[f'(t)]^2 + [g'(t)]^2} dt = \int_a^b \sqrt{\left( \frac{dx}{dt} \right)^2 + \left( \frac{dy}{dt} \right)^2} dt$$

Time is not a dimension

My students often have the mistaken impression that time is the "fourth dimension." It's not. In fact, any real problem in physics can have many true dimensions. For example, the position of an airplane in the sky is only fully specified by a set of x, y and z coordinates and three angles, pitch, roll and yaw, to describe the orientation of the plane with respect to the ground. It's a six-dimensional problem. Time, on the other hand, is never a dimension. Dimensions can have negative and positive values. Time is never negative. Time is always a parameter, not a dimension.

xaktly.com by Dr. Jeff Cruzan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. © 2012, Jeff Cruzan. All text and images on this website not specifically attributed to another source were created by me and I reserve all rights as to their use. Any opinions expressed on this website are entirely mine, and do not necessarily reflect the views of any of my employers. Please feel free to send any questions or comments to jeff.cruzan@verizon.net.