A Parametric Curve

Today I decided to find parametric equations to graph a curve resembling:

goalBy putting some axes in the same picture, I decided it looked pretty similar to the graph for cosine (shown below in blue):


One may think of y=\cos(x) as a parametric curve given by the equations x(t)=t, y(t)=\cos(t). I want to use this as my base, and modify it just slightly to get the above curve. So I begin by assuming the curve I want has y(t)=\cos(t). Next, I have to think about x(t). I know that if x(t)=t, then I’ll get the graph of cosine, so I need to modify x(t) slightly. Perhaps I could make x(t)=t+o(t), thinking of o(t) as some offset function.

What does my offset function look like? Well, comparing the graph I want with the graph for cosine, I see that I want my offset function to be 0 at t=0,\pi/2,\pi,3\pi/2, and 2\pi. From t=0 to t=\pi/2, the curve I want is to the right of cosine, so the x-offset should be positive. Then from t=\pi/2 to t=\pi, my offset is negative, and then positive and negative again on the intervals (\pi,3\pi/2) and (3\pi/2,2\pi). If I sketch a graph, it ends up looking something like:

offsetThat looks very much like o(t)=\sin(2t). Of course, I’m not sure how the amplitude of the offset needs to work out yet, so I’ll work with a family of curves o(t)=c\cdot \sin(2t), and thus the family of parametric equations

\begin{array}{rcl}x(t)&=&t+c\cdot \sin(2t)\\ y(t)&=&\cos(t)\end{array}

By playing around with different values of c you get a nice collection of curves:

many1Here, the black curve is c=1. Then they go red, blue, green, orange, increasing c by .5 each time. So in the end, the orange curve has c=3.

Notice that sometime between c=2 (blue) and c=2.5 (green), the curve starts having self intersections. So the obvious question is, what value of c is the smallest that gives self intersection? Judging by the pictures, this will also cause a shared vertical tangent at each intersection point, which will have x-coordinate \pi.

Well, ok, vertical tangents occur when x'(t)=0 (and y'(t)\neq 0), so find x'(t)=1+2c\cdot \cos(2t) and solve to find t=\frac{1}{2}\arccos(-1/(2c)). Call this value t_0. We want x(t_0)=\pi, so we have to solve \frac{1}{2}\arccos(-1/(2c))+c\cdot \sin(\arccos(-1/(2c)))=\pi. Not something I know how to do. Sure, you can simplify \sin(\arccos(A)) using known formulas, but it doesn’t help much. Another idea is to use a double-angle identity to write x'(t)=1+2c(1-2\sin^2(t)), with a zero at t=\arcsin\left(\sqrt{\frac{2c+1}{4c}}\right). This is mildly optimistic, because we now have \sin mixing with \arcsin, but it still doesn’t seem to get us very far. I messed about for a while on Maple and came up with a decimal value around 2.315643114. I’ve not thought of another way to do this, or how to solve those equations, perhaps somebody’s got an idea?

I mentioned that I was thinking about these things on twitter, and @samjshah replied:

i think the exact answer for c is the solution to this eqn: .5arccos(-1/(2c))+.5sqrt(4c^2+1)=pi. great problem!

Looks like we were thinking along the same lines (I’ve @replied him, to see if he’d like to leave a comment below).

So anyway, that’s about as far as I’ve taken it, and probably about as far as I plan to go. For grins, I also plotted some negative values for c:

negcThe colors correspond to coefficients as in the previous picture, it’s just the negative value of the constants (so, e.g., black corresponds to c=-1). Looks like if we keep going (larger negative values) we’ll start getting more self intersections, so again you might ask where. Seems like it should be a pretty similar exercise (I didn’t assume c>0 in my work above – at least, not on purpose).

In case you were curious, I made all of the above pictures using fooplot.com, which I’ve found to be pretty handy. It’s also fun to make animations in Maple, using something along the lines of (after a with(plots)):


Tags: ,

8 Responses to “A Parametric Curve”

  1. samjshah Says:

    Yup, we did the exact same thing! It was so much fun to think about this – i feel like my brain has become mush over my winter break. For me, the problem boiled down to two things, vertical tangent lines and noticing that the graphs were symmetric about x=pi.

    POINT 1: So I looked for vertical tangent lines — for each value of c (except c=0) there are two of them. To do that, I did the same thing as you, pretty much. I said dy/dx=dy/dt / dx/dt and then asked: where does dx/dt=0?

    POINT 2: Then we had to find the value of c which makes two vertical tangent lines occur at the same point (so they are the same vertical tangent line). But since the graphs are symmetric about x=pi, we know that that is the point where the vertical tangent lines occur.

    So using the t-value found from point 1, and substituting that in the equation x(t)=pi from point 2, we get the equation I found (which is identical to yours).

    Interestingly, we didn’t use the fact that y(t)=cos(t). All we needed to have for y(t) is a some function which is symmetric around x=pi. So the answer holds true if we have y(t)=abs(x-pi), for example. And you generate a cool graph if you have y(t)=1/cos(x).

  2. samjshah Says:

    Oops, I have a typo sign error in my twitter post… it should read: .5\cos^{-1}(-\frac{1}{2c})+.5\sqrt{4c^1-1}=\pi I think.

    Also, it turns out that we can even simplify that equation more to make finding an exact approximation for c easier.

    If we have \cos^{-1}(-\frac{1}{2c})+\sqrt{4c^1-1}=2\pi (multiplying both sides of the equation by 2), and we call the first term \alpha, we can see that the second term will be -\tan(\alpha). So we’ve turned that ugly beast into the equation:


    Not that I know how to nicely get a good approximate solution to that equation (taylor series?), but you have to admit, that’s much nicer to look at.

    Then we can use \alpha to get c.

    I’ll continue thinking how to solve that equation with \alpha to get increasingly good approximations… But I doubt I’ll get anywhere.

  3. sumidiot Says:

    Whoo, I like those other suggestions for y(t). I may have to play around and see what else I can come up with for pretty graphs just by changing y.

    I also thought there might be a sign error in that formula, but no worries. Now there’s a power typo 🙂 4c^2-1 inside the root. But that \tan(\alpha) suggestion is fantastic! And the Taylor series for tan(\alpha) of course starts with an \alpha, so that linear term will drop out. Very nice. I don’t know where to go from there with the series, but I still like it.

  4. samjshah Says:

    After I posted the comment, I saw the power error. Argh. I wish we could edit comments!

    As for the \alpha-\tan\alpha = 2\pi equation, I wonder what the other solutions mean… since there an infinite number of them. Are they special at all? Do they yield values for c which give interesting pictures? I tried one other one (minus the “real” answer one) and it was boring. But it must mean SOMETHING that makes it different than the other values….

    Let’s leave it to others, I say…

  5. Analyzing Parametric Equations « Continuous Everywhere but Differentiable Nowhere Says:

    […] Analyzing Parametric Equations Jump to Comments I saw a tweet that sumidiot posted on the parametric equations and and spent a good 30 minutes thinking about the value of which makes the graph intersect itself exactly once. I was going to post about my solution, but I was beaten to the punch. And thank goodness, because there are graphs and everything on sumidiot’s solution, which you should read here. […]

  6. sumidiot Says:

    I’ve got a guess about the other (positive) solutions. The values of c correspond to how wide each period of the graph is. So the first solution to what we’re asking about above corresponds to a vertical tangent at x=\pi coming from the first period of the graph (on the initial down-swing, starting from t=0). The next smallest positive solution seems like it should correspond to a vertical tangent at x=\pi coming from the second period of the graph (some t\in [2\pi,4\pi]. I’m not sure if this description makes terribly much sense.

    Guess I might head back in to the office this afternoon to play with this some more 🙂

  7. sumidiot Says:

    Perhaps a better way to say what I’m thinking about in that previous comment is to say that larger values of c push that first bulge (the interval t\in [0,\pi/2]) of the curve out to other multiples of \pi.

  8. A Polar Curve « Sumidiot’s Blog Says:

    […] 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 […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: