Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2013-07-12 04:00:33

gnitsuk
Member
Registered: 2006-02-09
Posts: 118

Conic Sections

Hello.  I wonder could anyone help me with the following.

All conic sections can be represented by the equation:

Let's start with the parabola. This is the curve comprised of the locus of points whose distance to a line ax+by+c=0 (the directorix) is always the same as their distance to a point (u,v) (the focus).

So, given the directorix and the focus can one derive the general form given above for that particular parabola?

Yes. One can equate the distance of the general point (x,y) from the directorix and the focus like so:

Now one just moves everything to the left hand side, collects up terms in x^2,y^2,xy,x and y and obtains the results:






Good. So given u,v,a,b,c as input, one can calculate A,B,C,D,E and F as output.

How about the inverse. Given a general conic (A,B,C,D,E,F) known the be a parabola, can one find the focus and directorix.

Yes. From the first two equations above, we have:


Now this alone is not sufficient to determine a and b, as each square root may be either positive or negative, but we also have the third equation above. So if we calculate the positive roots and then find that -2ab is not equal to C then we can choose either a or b and reverse its sign and we are done. So we now know a and b. The remaining equations give as c,u and v as:



Job done.

My question is, how about the hyperbola and the ellipse. Can we do the same thing?

Let's just consider the hyperbola.

The first part is easy enough. Given the foci ( two of them obviously, (a,b) and (c,d) ) of the hyperbola we can set the difference of the distances from the general point (x,y) on the hyperbola to these foci to be a constant (say k) to obtain:

Now again, we collect powers of x and y etc. and after the dust has settled we obtain:






This all works perfectly well. I've written code to allow me to move the mouse around on the screen to define the position of the second focus given the first and the hyperbola is drawn from the calculated values of A,B,C,D,E and F and all is well.

BUT, how about obtaining a,c,b,d from A,B,C,D,E and F. That looks hard to me.

As you can see, I've been pleasantly busy. So after all this my question is:

Given the general equation of a hyperbola or ellipse. How to find the foci?

I have solved the problem fully for the parabola as you see above. But only half the problem for the hyperbola and ellipse (i.e. given the foci I can obtain the general equation).

Thanks for any suggestions. There may be a much simpler approach which I am missing.

Last edited by gnitsuk (2013-07-14 20:28:01)

Offline

#2 2013-07-12 07:21:13

bob bundy
Moderator
Registered: 2010-06-20
Posts: 6,383

Re: Conic Sections

hi gnitsuk

Wow!  The parabola algebra is impressive.  Well done! smile

But I wouldn't do these like this.

The curve will still be the same under a change of coordinates, so it will be a lot easier to work with curves that have the coordinate axes as the lines of symmetry.  The properties will be unchanged.

That's how I'd do it.  smile

Bob


You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei

Offline

#3 2013-07-14 20:23:59

gnitsuk
Member
Registered: 2006-02-09
Posts: 118

Re: Conic Sections

Thanks for your suggestion.

I agree with you, things would be much simpler in such a change of reference.

I wonder though, if the task of finding the suitable reference frame is not itself just as difficult.

Say for example we take the specific hyperbola:

How can one determine the correct change of reference frame that will make the coordinate axes become the lines of symmetry of the hyperbola?

Thanks for any help.

Last edited by gnitsuk (2013-07-14 23:53:42)

Offline

#4 2013-07-18 02:27:22

gnitsuk
Member
Registered: 2006-02-09
Posts: 118

Re: Conic Sections

To futher complete this topic I'll post that I now have a solution for the hyperbola.

The task is:

Given the conic section :

Find the foci.

(If the equation represents a parabola

then one should find the focus and directorix, but case is solved above).

If the equation represents a hyperbola, which will be the case when

then the method is as follows:

Find the asymptotes of the hyperbola

case B != 0.0:

Gradients given by

Intercepts by

case B = 0.0:

Gradients given by

and other asymptote vertical

Intercetps by

and

This covers all cases of the hyperbola.

Now, find intersection points of these two lines, this is the centre of the hyperbola.

Next find the two lines which bisect the two angles formed by the two asymptotes. Only one of these lines will intersect the hyperbola, the two intersection points are the vertices of the hyperbola.

Let a = the distance from the centre to a vertex.

Next, move from the centre a distance ae along the line joining the two vertices towards each vertex where e is the eccentricity of the hyperbola calculated as:

where n is 1 or -1 as the determinant:

is negative or positive respectively.

This gives the two foci of the hyperbola.

I've got this running nicely in an interactive application and it works very well.

If anyone can think of a more elegant method I'd be very glad to hear.

Onward to the ellipse..........

Last edited by gnitsuk (2013-07-18 04:20:38)

Offline

#5 2013-08-04 19:41:52

peter307
Member
Registered: 2013-08-04
Posts: 2

Re: Conic Sections

Thanks, gnitsuk and others. I just registered in this forum because I was looking for a solution for exactly this problem.
I understood that, given the general equation of conic sections, the (best?) way to find the foci, is to
1. determine the type
2. rework the equation to the Standard form (rotate and translate)
3. find the foci, which should not be difficult
4. rotate and translate these, using info resulting from step 2
but...
I want to solve this in one step, foci directly from the general equation...just for fun
My Java program draws neat conic sections, drawn by 3 or 5 points. Drawing from 3 points (ellipse, hyperbola or parabola), 2 of these points are the foci. The 'problem' is the 5 points solution.
The 5 points are all on the outline (most often forming an ellipse) and to draw this conic I determine the coefficients A to F.
Than drawing the center goes well, but for the foci it seems I have to revert to the steps above and I don't like that.
just letting you know...

Offline

#6 2013-08-05 06:24:24

bob bundy
Moderator
Registered: 2010-06-20
Posts: 6,383

Re: Conic Sections

hi peter307,

Welcome to the forum.

Post 4 has a formula for the foci of the general hyperbola.  I'm working on a method to transform a general conic into a simple one

eg.

I've got the translation sorted but  I'm all tied up with the rotation at the moment.

It sounds like you have both steps, in which case cannot you just convert the algorithm into a formula for the foci?

Bob


You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei

Offline

#7 2013-08-06 04:37:12

peter307
Member
Registered: 2013-08-04
Posts: 2

Re: Conic Sections

hi Bob,

I had to sort things out first, but now I have the rotation working:

You start with the hyperbola x.x / a.a - y.y / b.b - 1 = 0  [ x.x means x squared etc.]

This is a hyperbola with its center in the origin (0,0)

It's general equation is: A.x.x + C.y.y + F = 0

thus:
A = 1/a.a
C = -1/b.b
F = -1
(B = D = E = 0)

Rotation with angle theta means replacing
   x by  x.cos(theta) + y.sin(theta)   and
   y by  y.cos(theta) -  x.sin(theta)

Doing the algebra you find new coëfficients that describe the rotated hyperbola.

In Java:

// this is a method in my Conics-class, using global variables A thru F, that I adjust, forming a new Conics 

public void     rotate(double theta) {
   
      double c = cos(theta);
      double s = sin(theta);
     
      A1 = A*c*c + C*s*s;
      B1 = 2.0*c*s*(A-C);
      C1 = A*s*s + C*c*c;
   
      if (B != 0) {
         B1 = B1 + B*(c*c-s*s);
         A1 = A1 - B*c*s;
         C1 = C1 + B*c*s;
      }
      new Conics(A1, B1, C1, 0, 0, -1); // the class that produces a Shape (where A=A1, B=B1 andsoforth)
   }
when the original hyperbola already has a nonzero B-coefficient (was already rotated by some angle), you have to solve

B1 = B(xc+ys)(yc-xs) [same replacement of x and y as above]
 
this produces extra x.x and y.y terms, that you must add to A and C respectively.
   
success.

peter

Offline

Board footer

Powered by FluxBB