Posts Tagged ‘polar’

Polar Areas

July 20, 2009

This summer I had the opportunity to teach Calc 2 for the third time in a row. The first few topics I covered were, essentially, “Things you can do with integrals.” Like finding arc length, parametric area, surface area of revolution, polar area, and iterated integrals for volumes.

I tried to present these as all following the same basic principle. In each case, you have something you would like to calculate, but it’s a curvy thing, so it’s hard to do. So you split it into lots of little bits, and then approximate whatever it is you are looking for for each of those little bits. Then you take a limit, and it becomes an integral.

This seemed to work out ok, but I did run into a question when we got to polar areas.

When you break up your polar area into lots of little bits, the standard method is to approximate each of those little bits with sectors of circles, which have an easily calculated area. If your small bit is over an interval where \theta changes by some small amount, d\theta, then the area is \frac{1}{2}r^2d\theta, where r is the radius of any sample point in the interval.

What struck me (and at least one of my students) was that you should also be able to approximate this little area using a triangle. Two formulas I came up with were \frac{1}{2}r^2\sin d\theta or r^2\tan(d\theta/2). That’s a little bit of a problem, for an integral, because your differentials shouldn’t be inside other functions like that. Right?

Does anybody know of a different way to express the area of approximating triangles so that you can do the integral for polar area some other way? Or is there some reason I shouldn’t think that such a process might work and give the right integral?

Update 20090814: Several commenters pointed out a typo in the formula above with tangent. A power of two was missing from r, which has since been corrected.

Advertisements

A Polar Curve

March 17, 2009

So I suppose, if I’m being honest, my post from earlier today about piecewise functions wasn’t entirely self-motivated. In all honestly, I sat down and was inspired to find a formula for a new polar curve. I’ve done similar things before. Today’s goal was to find a formula for a polar curve like the following:

My goal

My goal

The red lines are supposed to indicate that the curve is 0 at \theta=\pi/4 and \theta=3\pi/4. My goal in drawing this curve was to find something that looked like a limacon, but had self-intersections away from the origin. It’s a happy coincidence (in my mind, anyway) that the result, when crossings are properly applied, is a trefoil knot.

So, anyway, how to find a formula for my function? The first step, for me, is to unroll it back to a Cartesian form. I’ll call it f_1(x), and it looks something like the following, with 0s at \pi/4,3\pi/4, a min corresponding to the polar point (-3,\pi/2), and a max corresponding to the polar point (2,3\pi/2):

My (Cartesian) goal

My (Cartesian) goal

Next, I know that shifting functions horizontally isn’t too hard, so let me shift left by \pi/4, obtaining a graph like the one above, except passing through the origin. Let’s call this f_2(x):

fooplot-f2

As a third change, though one that’s trickier to sort out algebraically (I’ll do it below), I’ll make the graph more symmetric by assuming the second 0 occurs at x=\pi, instead of at x=\pi/2. Let’s call the resulting graph f_3(x):

fooplot-f3

Now this, to me, looks like the plot of -\sin(x), except for the fact that the amplitude is 3 on the first half, and only 2 on the second half. So let’s call it -a(x)\sin(x), where my amplitude function looks like:

fooplot-aThis is just the curve a(x)=2.5+.5\sin(x), so we have a formula for f_3(x). Namely, f_3(x)=-(2.5+.5\sin(x))\sin(x). Not terribly pretty, but manageable.

Now, how do I do that change that took me from f_2(x) to f_3(x)? Since the graph of f_2(x) is obtained from the graph of f_3(x) by some sort of horizontal manipulations, I know f_2(x)=f_3(s(x)) for some function s(x). What does s(x) look like? Well, it sends 0 to 0, and 2\pi to 2\pi, and also sends \pi/2 to \pi. That gives me three points, (0,0), (\pi/2,\pi), and (2\pi,2\pi) on the graph of s(x), and I’ll define s(x) to be the piecewise linear function connecting them. Because I think maybe it’ll be handy, let me set o(x)=s(x)-x. From my work on piecewise curves in my earlier post (and a handful of algebra and horizontal translations), I know I can write o(x)=\frac{1}{3}(x-\pi-2|x-\pi/2|). The following graph shows s(x) (in black), x (in red), and o(x) (blue):

fooplot-sxo

Thus, I’ve found f_2(x)=f_3(x+o(x)), something I can write out fully if I want (it’s getting to be a pretty long formula). Finally, I shift this graph over to the right by \pi/4 to obtain f_1(x)=f_2(x-\pi/4), with graph:

fooplot-wrongf1

Oh no! That’s not the graph I was expecting at the beginning. My Cartesian goal didn’t hit 2 at x=0. What happened?

Let me plot the function f_1(x), obtained so far, on a wider domain:

fooplot-wrongf1-long

Notice that this looks like a piecewise function. It begins as a sin (sinusoidal, I guess) curve (with modified amplitudes) with period \pi, and then shifts to one with a larger period. I would have probably hoped that the curve I was going for was just going to be periodic itself, so that if I extended the domain in the polar curve, I’d just end up tracing out the trefoil again.

The problem stems from my linear shift function s(x), and it’s accompanying o(x)=s(x)-x. Notice that the formula for o(x) is not periodic. It does what I want on the interval [0,2\pi], but outside of that, it’s negative. That’s not what I wanted, and it matters because I shift some of these negative bits into the picture with my final shift from f_2(x) to f_1(x). How can I take this function that I like on [0,2\pi] and extend it periodically throughout the whole real line?

Let me define another function, m(x), which computes “x\bmod 2\pi“. Usually, I expect the modulus of a number to be taken with respect to an integer, not 2\pi. All the same, we can make it work. The function x\bmod 1 can be written as x-\lfloor x\rfloor (here \lfloor x\rfloor is the “floor” function, returning the greatest integer less than x). The graph of this function is a saw-tooth curve. Of course, I don’t want “x\bmod 1“, but “x\bmod 2\pi“. I just modify x-\lfloor x\rfloor with some factors of 2\pi, obtaining m(x)=2\pi(x/(2\pi)-\lfloor x/(2\pi) \rfloor).

The following plot contains the original o(x) (in green), the saw-tooth curve m(x) (in black), and the nicely periodic offset function \tilde{o}(x)=o(m(x)) (in blue, overlapped by green o(x) in the first positive interval):

fooplot-osawper

Now let’s go back and fix up our functions. The function f_3(x) was fine, it didn’t involve o(x). The definition of f_2(x) above was f_2(x)=f_3(x+o(x)), but that uses the non-periodic offset function o(x). I’ll replace it with it’s period cousin, \tilde{o}(x)=o(m(x)), so that f_2(x)=f_3(x+\tilde{o}(x)). This has the nice periodic graph:

fooplot-actualf2

Finally, f_1(x) was just a horizontal shift of f_2(x), so f_1(x)=f_2(x-\pi/4). This graph looks much better (it’s periodic, and not 2 at x=0).

fooplot-actualf1

Not only is it correct on [0,2\pi], but when plotted as a polar curve, it gives us what we were after all along:

fooplot-f1-polar

Hurray! Now, what are the coordinates of the intersection points (besides the origin)? Does the corner at \pi/4 (coming from the corner on \tilde{o}(x)) in f_1(x) mean this function has a discontinuous derivative? How could it be patched up? Would making o(x) as a quadratic function (I’ve got 3 non-colinear points, which determine a quadratic) work well? Can the symmetry be improved? Perhaps by picking other angles where the curve is 0, or different amplitudes for the inner and outer loop (2 and 3, respectively, in the example above)?

I don’t know the answers to any of those questions. Some I have worked a little on (the last one, since I could do lots of nice plots if I set things up in enough generality in Maple), others, though interesting (points of intersection), I have not.

By the way, I made all of my graphs at fooplot.com (which I’ve used lots, it’s nice).