3

How would I plot $r^2 = 36\cos(2\phi)$ in $x$ and $y$ coordinate system?

I know that $r^2 = x^2 + y^2$, and I know that $x = r\cos(\phi)$ and $y = r\sin(\phi)$. However I'm not sure how to proceed.

I get $x^2 + y^2 = 36\cos(2\phi)$. But what next?

I know circle equation $x^2 + y^2 = constant$, but my equation has a non constant on the right hand side.

Any suggestions and ideas appreciated. :)


Edit: I'm adding 100 reputation bounty to anyone who could answer my post and show how to plot this function on paper step by step.

In particular I know how to plot $y = f(x)$, but this function is completely different beast, it has both x and y quadratic.

Any help would be appreciated. I'm learning about polar coordinates.

leo
  • 10,433
bodacydo
  • 3,922
  • $ \frac{x}{(x^2 + y^2)^(1/2)} = \cos(\phi) \frac{y}{(x^2 + y^2)^(1/2)} = \sin(\phi) $

    $ cos^2(\phi) - sin^2cos(\phi) = cos(2 \phi) $

    $ x^2 + y^2 = 36 \frac{( x^2 - y^2)}{ (x^2 + y^2)} $

    $ (x^2 + y^2 )^2 = 36 (x^2 - y^2) $

    – Alan Sep 29 '14 at 21:19
  • @alan, and how do I go about plotting this type of equation? I only know how to plot circle, and equations in form y = f(x). But this equation is in form y^2 + x^2 = f(y^2, x^2)... – bodacydo Sep 29 '14 at 21:21
  • @alan I can divide by x^2-y^2 and get $(x^2+y^2)/(x^2-y^2) = 36$ but I don't know what to do next. – bodacydo Sep 29 '14 at 21:22
  • You could make a table , I believe what you have is a lemniscate, you could perhaps google this to see if this looks right. LInk: http://en.wikipedia.org/wiki/Lemniscate_of_Bernoulli – Alan Sep 29 '14 at 21:23
  • I still don't know how to plot it myself... – bodacydo Oct 01 '14 at 19:19
  • Following are three ways to plot the graph. For some unknown reason, I can't directly post the links. Just copy and paste the lines in gray to Wolfram alpha will generate the plots.

    ordinary plot $y = \pm \sqrt{6\sqrt{2x^2+9}-x^2-18}$
    plot sqrt(6*Sqrt(2*x^2+9)-x^2-18) for x = -6 to 6

    polar plot $r = \sqrt{36\cos(2t)}$
    polar plot r = sqrt(36*cos(2t)) for t = -Pi to Pi

    parametric plot $(x,y) = (\sqrt{36\cos(2t)}\cos t,\sqrt{36\cos(2t)}\sin t)$
    parametric plot sqrt(36*cos(2t))*cos(t), sqrt(36*cos(2t))*sin(t) for t = -Pi to Pi

    – achille hui Oct 01 '14 at 23:53

3 Answers3

3

The implicit equation is $$ \begin{align} r^2 &=36\cos(2\phi)\\ &=36[\cos^2(\phi)-\sin^2(\phi)]\\ r^4 &=36[r^2\cos^2(\phi)-r^2\sin^2(\phi)]\\ x^4+2x^2y^2+y^4 &=36x^2-36y^2 \end{align} $$ But parametrically, to plot the curve, $$ \begin{align} x&=6\cos(\phi)\sqrt{\cos(2\phi)}\\ y&=6\sin(\phi)\sqrt{\cos(2\phi)} \end{align} $$ Since we must have $\cos(2\phi)\ge0$, $\phi\in[-\pi/4,\pi/4]$ (right lobe) or $\phi\in[3\pi/4,5\pi/4]$ (left lobe):

$\hspace{3.5cm}$enter image description here

robjohn
  • 345,667
1

Using $r^2=x^2+y^2,x=r\cos\phi,y=r\sin\phi$, and the trig identity $\cos(2\phi)=\cos^2\phi-\sin^2\phi$, we have

$$r^2=36\cos(2\phi)$$ $$\implies r^4=36r^2(\cos^2\phi-\sin^2\phi)=(6r\cos\phi)^2-(6r\sin\phi)^2$$

$$\implies(x^2+y^2)^2=36x^2-36y^2$$ $$\implies {x}^{4}+2\,{x}^{2}{y}^{2}+{y}^{4}-36\,{x}^{2}+36\,{y}^{2}=0$$

Now let $x^2=a,y^2=b$. We now have

$$a^2+2ab+b^2-36a+36b=0$$ which is just the equation of a parabola. Now plot this. I will allow you to figure out how graphing parabolas works. Once you have this, erase all parts of the curve that are not in the first quadrant. You now have a plot of a set of points $(a,b)=(x^2,y^2)$. So now to convert this to $(x,y)$, just take the positive square roots of those points. For example, the point $(a,b)=(x^2,y^2)=(36,0)$ on the parabola turns into $(6,0)$ on the new curve. Do this until you have a plot of the curve in the first quadrant. Now notice that $(x^2,y^2)=((-x)^2,y^2)$, which means that if a point $(x,y)$ lies on the curve, so does $(-x,y)$. Similarly for $(x,-y)$ and $(-x,-y)$. Plotting the rest of these points in, you should get a curve that looks like an infinity sign. This is called a lemniscate.

Pauly B
  • 5,272
  • I love your answer. I'll try to plot parabola. This is going to be challenging but I'm going to try this. :) – bodacydo Oct 02 '14 at 13:49
0

This is Matlap's script. Note: this is plotting the real values not the imaginary ones( you might get warning in Matlab, to solve this problem, use real())

phi = 0:0.01:pi;
r = sqrt( 36*cos(2*phi) );
x = r.*cos( phi );
y = r.*sin( phi );
plot(x,y)

This is the result

enter image description here

Is this what you're looking for?


Edit: For drawing them both

clear all
clc
phi = 0:0.01:pi;
r = sqrt( 36*cos(2*phi) );
x = r.*cos( phi );
y = r.*sin( phi );

subplot(2,1,1)
plot(x,y)
title('Cartesian Coordinates (x, y)');
xlabel('x-axis');
ylabel('y-axis');
grid on


subplot(2,1,2)
polar(phi, r)
title('Polar  Coordinates (r, \phi)');

enter image description here


Updated:

The following results for $\phi$ from $\pi$ to $2\pi$. For the code, you need to change only this line phi = 0:0.01:pi; to phi = pi:0.01:2*pi;

enter image description here

And for this period phi = 0:0.01:2*pi; the result is as follows

enter image description here

CroCo
  • 1,228