My Math Forum  

Go Back   My Math Forum > High School Math Forum > Algebra

Algebra Pre-Algebra and Basic Algebra Math Forum


Reply
 
LinkBack Thread Tools Display Modes
February 1st, 2012, 07:37 PM   #11
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 14,597
Thanks: 1039

Re: Ellipse inside a circle - intersection

Quote:
Originally Posted by greg1313
Me? No.
No, I meant Andromedus...
Denis is offline  
 
February 2nd, 2012, 03:33 AM   #12
Newbie
 
Joined: Feb 2012

Posts: 7
Thanks: 0

Re: Ellipse inside a circle - intersection

Greg: Thank you for your help. But I think your equation for the ellipse assumes it is centred on the origin. For my situation, we can assume the circle is centred on the origin, but the vertical centre of the ellipse in relation to the circle is not zero, so its equation is

(x^2 / a^2) + ((y - ye)^2) / b^2 = 1 where ye is the vertical centre of the ellipse.

Following your method, rearranging this for y and substituting into the equation of the circle, gives an equation which is somewhat more complex, and I then have the problem of solving it for x. That's where I get stuck.

Denis: Well, that quartic may well be correct, but by itself it's really not much use to me - it's the solutions of it I need.
Andromedus is offline  
February 2nd, 2012, 03:42 AM   #13
Global Moderator
 
greg1313's Avatar
 
Joined: Oct 2008
From: London, Ontario, Canada - The Forest City

Posts: 7,974
Thanks: 1156

Math Focus: Elementary mathematics and beyond
Re: Ellipse inside a circle - intersection

Yes, that was on oversight on my part. I will try to solve for x, being more careful. If I arrive at useful results I will post them.
greg1313 is offline  
February 2nd, 2012, 04:24 AM   #14
Global Moderator
 
greg1313's Avatar
 
Joined: Oct 2008
From: London, Ontario, Canada - The Forest City

Posts: 7,974
Thanks: 1156

Math Focus: Elementary mathematics and beyond
Re: Ellipse inside a circle - intersection

It gets pretty nasty.

What language(s) are you writing your code in? My thinking is that you could use a module that handles these sorts of things. Though an algebraic solution would be ideal, a numerical solution, with suitable precision, should suffice.

There is a program, PARI/GP, that has a 'solve' function.

Here is the output from the associated help query: solve(X=a,b,expr): real root of expression expr (X between a and b), where expr(a)*expr(b)<=0.

I know PARI/GP has a C library that probably includes this function, and it is freely distributed; you don't have to pay use it.

Let us know what you think.

Here is a simple example of solve:

Code:
input: solve(x=1,3,x^2-2*x+1)
output: 1.000000000000000000000000000
greg1313 is offline  
February 2nd, 2012, 05:21 AM   #15
Newbie
 
Joined: Feb 2012

Posts: 7
Thanks: 0

Re: Ellipse inside a circle - intersection

Thanks Greg - I tried putting the equations into an online solver (www.wolframalpha.com) and it did produce some solutions but, as you said, it does get pretty nasty, and I haven't had much luck so far integrating them successfully into my program. When I set out along this route I hadn't thought the solution would be so unwieldy. I'm probably going to have a rethink about the route I'm taking. I'm using ActionScript3 for Flash, btw. The whole purpose of this was to get my program to draw and fill some geometrical shapes, but given the complexity of doing it mathematically, I'll probably try pre-rendering those shapes in a graphics program instead.

Thanks everyone for their help.
Andromedus is offline  
February 2nd, 2012, 12:31 PM   #16
Newbie
 
Joined: Feb 2012

Posts: 7
Thanks: 0

Re: Ellipse inside a circle - intersection

Just a quick follow up - I finally got an equation (thanks to mathnerds.org) which works perfectly for this special case:

y = w / (1 - (b^2 / a^2))

where y is the vertical intersect point, w is the vertical height of the ellipse and a and b are the semi major/minor axis. The equation was derived by equating gradients - the gradient of the circle and the gradient of the ellipse are the same at the intersect point in this special case because they form a tangent.

Thanks to everyone who helped.
Andromedus is offline  
February 2nd, 2012, 01:45 PM   #17
Global Moderator
 
greg1313's Avatar
 
Joined: Oct 2008
From: London, Ontario, Canada - The Forest City

Posts: 7,974
Thanks: 1156

Math Focus: Elementary mathematics and beyond
Re: Ellipse inside a circle - intersection

greg1313 is offline  
February 2nd, 2012, 02:17 PM   #18
Global Moderator
 
greg1313's Avatar
 
Joined: Oct 2008
From: London, Ontario, Canada - The Forest City

Posts: 7,974
Thanks: 1156

Math Focus: Elementary mathematics and beyond
Re: Ellipse inside a circle - intersection

I wonder what technique they used to derive that. Calculus, maybe? Is there a link to their solution? Did they show you how they worked it out?
greg1313 is offline  
February 3rd, 2012, 01:03 PM   #19
Newbie
 
Joined: Feb 2012

Posts: 7
Thanks: 0

Re: Ellipse inside a circle - intersection

Expressions for the gradients of the circle and tangent were found by differentiation, then equated to each other.

This was the response from the volunteer at mathnerd.org:

Quote:
Implicit differentiation gives us that the slope of the tangent to the circle at this point is

-x_0/y_0

while the slope of the ellipse is

-b^2/a^2 x_0/(y_0 - y_e)

Setting these equal gives us that

b^2/a^2 = (y_0 - y_e)/y_0

and so the ratio of b to a is already nailed down. Requiring that (x_0,y_0) lie on the elllipse (i.e., satisfy the equation of the ellipse) will then completely determine a and b in terms of r, y_0 and y_e.
Andromedus is offline  
Reply

  My Math Forum > High School Math Forum > Algebra

Tags
circle, ellipse, inside, intersection



Search tags for this page
Click on a term to search for related topics.
Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
coordinated intersection of ellipse with a line on given ang white_flag Algebra 14 July 19th, 2012 11:07 AM
Circles inside a circle Bogauss Algebra 1 February 10th, 2012 06:06 PM
Ellipse and line intersection ace11 Algebra 4 July 12th, 2009 10:29 PM
Ellipse Ellipse Intersection tom-9000 Algebra 1 June 17th, 2009 02:40 PM
Trying to find the intersection of an ellipse and a line BillBiggs Algebra 11 June 15th, 2009 04:47 PM





Copyright © 2019 My Math Forum. All rights reserved.