<span class=$2cos(x/2)cos(y/2)=1$" />

This curve of $2\cos(x/2)\cos(y/2)=1$ looks like a circle squished in from the sides and top and bottom. I know how to parameterize the curve by dividing it into four 90 degree segments, but second derivatives of the parameterized curves are discontinuous at the transition points. It would be nice to find something like $x=r(\theta)\cos(\theta)$ and $y=r(\theta)\sin(\theta)$, similar to what one might find for a circle. I would like at least $C^2$ continuity. Any ideas?

I will try the following and report back later if it works. Center a unit circle on the origin and parameterize it as $\cos\theta$ and $\sin\theta$. Then project a line out from the center to the corresponding point on the curve, $x=r(\theta)\cos\theta$ and $y=r(\theta)\sin\theta$, where $r(\theta)=\sqrt{x(\theta)^2+y(\theta)^2}$.

There may not be a practical way to express $x(t)$ and $y(t)$ as $C^2$ functions over the entire curve, but only as $G^2$ functions. A suitable workaround that effectively eliminates the $G^2$ continuity problem is presented, so the original question will not be marked as solved.

Let two lines through the origin with $±1$ slopes divide the closed curve into four segments, top and bottom, and left and right. In the top and bottom segments $x(t)$ is a linear function of $t$ and $y(t)$ is a nonlinear function of $t$, and in the left and right segments $y(t)$ is a linear function of $t$ and $x(t)$ is a nonlinear function of $t$.

Parameter $t$ is essentially used as a flywheel to carry the $x(t)$ and $y(t)$ curves correctly between the various curve segments. Parameter $t$ is always independent, variable $x$ is always independent in the top and bottom curve segments, and variable $y$ is always independent in the left and right curve segments. A single equation of motion may be used to solve for independent acceleration $\ddot t$ everywhere, a single equation of motion may be used to solve for independent acceleration $\ddot x$ in the top and bottom curve segments, and a single equation of motion may be used to solve for the independent $\ddot y$ in the left and right curve segments.

In each case the computed independent acceleration may be integrated once and twice to obtain corresponding velocity and displacement. A problem associated with using $\ddot t$ is an undesirable jump in dependent variable $\ddot x(t)$ or $\ddot y(t)$ at the curve segment transition points. And a problem associated with solving only for $\ddot x$ or $\ddot y$ is not easily knowing the next curve segment to transition into. The current value assigned to $t$ always indicates the active curve segment associated with the current independent $\ddot x$ or $\ddot y$, and $\dot t$ indicates which curve segment is about to be transitioned into. The currently independent $x(t)=x$ or $y(t)=y$ is a linear function of $t$, so it also holds that $t$ and $\dot t$ are linear functions of the corresponding independent $x$ or $y$ and $\dot x$ or $\dot y$.

In this approach the parameters $t$ and $\dot t$ are incrementally updated and used only for bookkeeping purposes to insure correct transitions between the respective curve segments.

The two curves below show the $x=\theta_e$ and $y=\theta_o$ values plotted against an angle $\theta$ over a $4\pi$ cycle. A single $\sin\theta$ and one inverse cosine was required to obtain both $C^1$ curves. The equation $(1+\cos\theta_e)(1+\cos\theta_o)=1$ was parameterized with $\theta$ to obtain these curves. A slight modification based on the answer to this question will give similar $C^2$ curves.

Even and odd-numbered joint angles of 6R Bricard mechanism/kaleidocycle

  • 1
    $\begingroup$ Expanding $2\cos\left(\frac x2\right)\cos\left(\frac y2\right)=\cos\left(\frac{x+y}2\right)+\cos\left(\frac{x-y}2\right)$ suggests a substitution of$$\cos\left(\frac{x+y}2\right)=\cos^2u\qquad \cos\left(\frac{x-y}2\right)=\sin^2u$$though this only traces out one quarter of the curve (the others can be obtained by reflecting across the axes and/or the line $y=x$). Is this the "four-90°-segment" parameterization you mention? $\endgroup$
    – user170231
    May 26, 2021 at 15:18
  • $\begingroup$ Yes, the curve has four vertices or singular points, one each at the top, bottom, left, and right. I didn't split the curve at the vertices but at points equidistant between between them. In each split segment I solved the equation for the dependent variable in terms of the independent variable. Then I linearly related the independent variable to the parameter as shown in the second figure. $\endgroup$ May 27, 2021 at 5:59

1 Answer 1


I'm not sure if @user170231 realized he practically solved the question with his comment. Using his idea one can construct the parametrization

\begin{cases} \left(\arccos(\cos^2(u))+\arccos(\sin^2(u)),\arccos(\cos^2(u))-\arccos(\sin^2(u))\right) & 0\le u\le \frac{\pi}{2} \\ \left(\arccos(\cos^2(u))-\arccos(\sin^2(u)),\arccos(\cos^2(u))+\arccos(\sin^2(u))\right) & \frac{\pi}{2}\le u\le \pi \\ \left(-\arccos(\cos^2(u))-\arccos(\sin^2(u)),\arccos(\sin^2(u))-\arccos(\cos^2(u))\right) & \pi \le u\le \frac{3 \pi}{2} \\ \left(\arccos(\sin^2(u))-\arccos(\cos^2(u)),-\arccos(\cos^2(u))-\arccos(\sin^2(u))\right) & \frac{3 \pi}{2}\le u\le 2 \pi \end{cases}

which satisfies the requirement of been $C^2$.

  • $\begingroup$ I'll check this out. What if $u$ is made $4\pi$ cyclic and $u$ in the above expressions is replaced by $u/2$? Then $\sin^2(u/2)=(1-\cos u)/2$ and $\cos^2(u/2)=(1+\cos u)/2$. The original equation squared may also be written as $(1+\cos x)(1+\cos y)=1$. $\endgroup$ May 27, 2021 at 5:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .