Wikipedia:Reference desk/Archives/Mathematics/2011 July 6

= July 6 =

Geometry question
Hello, I am trying to solve a geometry problem, which is illustrated in the figure I attached. Two circles $$C_1$$ and $$C_2$$ with centers at $$O_1$$ and $$O_2$$ are given. Their radii are $$r_1$$ and $$r_2$$ respectively. The distance between their center $$O_1O_2$$ is $$d$$ (not shown in figure). A third circle is to be found such that it satisfies the following constrains: The angles between the tangents at the points of contact should be $$\theta_1$$ and $$\theta_2$$ as shown in the figure. Also, the area bounded between the three circles, which is shown here in yellow, should be $$A$$.

I tried solving this problem using the differential equation $$\frac{y''}{(1+y'^2)^{3/2}}=C$$. This equation needs three boundary conditions: two for the second order ODE and one for constant C. I have three conditions in the form $$d$$, $$A$$ and angles at the two sides, but this quickly leads to very complicated set of transcendental equations containing several sines and cosines. Maybe my approach is wrong. I would be happy if somebody can come up even with the numerical solution, if not analytical solution. All I need is the profile of the part of the third circle, which is in between the other two. Thanks - DSachan (talk) 17:14, 6 July 2011 (UTC)


 * Have you looked at inversion (geometry)? A lot of geometrical problems involving circles are solved using inversion. The differential question is the curvature of a curve $$\gamma(t) = (t,y(t)),$$ so the solutions will be semi-circular arcs for C ≠ 0, or straight lines C = 0. The semi-circular arcs will be of the form $$y(t) = q \pm \sqrt{r^2-(t-p)^2}$$, where (p,q) is the centre of the circle, and r is its radius. The ± comes from the choice of arc: upper or lower semi–circular arc. If you want an explicit parametrisation, then you're better off with $$\gamma(t) = (r\cos t + p, r\sin t + q).$$ — Fly by Night  (  talk  )  17:42, 6 July 2011 (UTC)


 * I haven't used inversion before. It looks like that can be used to solve a simple problem I've never been able to cleanly solve: Given 3 discs (really, the radius of each disc), will they fit in a given triangle (given the lengths of the 3 sides) without overlapping? That turns out to be a very difficult problem to write a solution for. -- k a i n a w &trade; 19:48, 6 July 2011 (UTC)


 * The Inversion (geometry) article says that "Many difficult problems in geometry become much more tractable when an inversion is applied." It's like any tool: if you use it for the right job then you can get very nice results. But if you try to hammer a nail with a saw, then you won't get such nice results. That's not to say that inversion won't work on the problem you mention. I'd need to think about it. I'll drop you a note on your talk page if I make any in-roads. — Fly by Night  (  talk  )  22:02, 6 July 2011 (UTC)

Don't consider differential equations. You already know that the solution is a circle. The circle is specified by three unknown reals, e.g. the center coordinates and the radius. And the constrains must be expressed as equations. Sines and cosines of known angles are just known constants. So write down the equations and solve them. Bo Jacoby (talk) 17:58, 6 July 2011 (UTC).
 * Following purely geometrical approach also leads to having sines and cosines involving unknown angles, for example, the angle that the line through $$O_1$$ to the point of contact of the two circles will also figure out inside sines and cosines. This causes major problems to solve, or, maybe I am missing some major trick here. - DSachan (talk) 18:42, 6 July 2011 (UTC)
 * Fitting.png I've (crudely) redrawn the picture to maybe make things a bit clearer. Letting R be the radius of the top circle, the area of the left and right small triangles are r1R sin θ1 and r2R sin θ2.  The area of the large triangle we can also find in terms of R by first finding the lengths of the 3 sides and then using Heron's formula.  One side we know is d, and the other two we can find in terms of R using the law of cosines on the left and right small triangles.  Finally we need to find the size of the 3 circle wedges, which requires finding the angle for each.  The remaining angles of all the triangles can all be found with law of cosines since we know all the side lengths which gives us what we need.  Then we have the area of all 6 regions as well as the area of the whole triangle, which produces an equation in terms of R.  It seems like it'll be pretty ugly, with a lot of radicals and some inverse cosines, but it should be at least numerically solvable. Rckrone (talk) 01:16, 7 July 2011 (UTC)

The very first tiny simplification to make is to divide all lengths by d and the area by d2. Then the problem is reduced to d=1. When this problem is solved, multiply back by  d and d2. Bo Jacoby (talk) 16:32, 7 July 2011 (UTC).

Let the coordinate system be defined such that So the area equation is The pythagorean theorem provides the equations These are all the equations we need. Unfortunately both the angles x8, x9, x10 and their sines occur. The problem seems not to be algebraic neither in the angles nor in their sines and cosines.
 * the known center of the first circle is O1=(0, 0)
 * the known center of the second circle is O2=(1, 0)
 * the unknown center of the third circle is O3=(x1, x2)
 * the known radius of the first circle is r1
 * the known radius of the second circle is r2
 * the unknown radius of the third circle is x3
 * the unknown angle O2O1P is x8
 * the unknown point P is (x4, x5) = (r1cos(x8), r1sin(x8))
 * the unknown angle QO2O1 is x9
 * the unknown point Q is (x6, x7) = (1 &minus; r2cos(x9), r2sin(x9))
 * the unknown angle PO3Q is x10
 * twice the area of the triangle PQO3 is x32sin(x10) = (x6 &minus; x4)(x2 &minus; x5) &minus; (x7 &minus; x5)(x1 &minus; x4)
 * the known angle O1PO3 is &pi; &minus; &theta;1
 * twice the area of the triangle O1PO3 is x4x2 &minus; x5x1 = r1x3sin(&theta;1)
 * the known angle O2QO3 is &pi; &minus; &theta;2
 * twice the area of the triangle O2O3Q is (1 &minus; x6)x2 &minus; x7(1 &minus; x1) = r2x3sin(&theta;2)
 * twice the known area outside the circles is 2A
 * twice the area of the triangle O1O2O3 is x2
 * twice the total area of the three circular segments is r12x8 + r22x9 + x32x10
 * x2 = 2A + r12x8 + r22x9 + x32x10 + (1 &minus; x6)x2 &minus; x7(1 &minus; x1) + x4x2 &minus; x5x1
 * x32 = (x1 &minus; x4)2 + (x2 &minus; x5)2 = (x1 &minus; x6)2 + (x2 &minus; x7)2

The four variables are eliminated from the remaining equations, giving 6 equations in 6 unknowns. That looks good. The equation 4 is simplified by substituting eq 2 and 3: And now good night! Bo Jacoby (talk) 22:03, 7 July 2011 (UTC).
 * x4 = r1cos(x8)
 * x5 = r1sin(x8)
 * x6 = 1 &minus; r2cos(x9)
 * x7 = r2sin(x9)
 * 1) x32sin(x10) = (1 &minus; r2cos(x9) &minus; r1cos(x8))(x2 &minus; r1sin(x8)) &minus; (r2sin(x9) &minus; r1sin(x8))(x1 &minus; r1cos(x8))
 * 2) x3sin(&theta;1) = cos(x8)x2 &minus; sin(x8)x1
 * 3) x3sin(&theta;2) = cos(x9)x2 &minus; sin(x9)(1 &minus; x1)
 * 4) x2 = 2A + r12x8 + r22x9 + x32x10 + r2cos(x9) x2 &minus; r2sin(x9)(1 &minus; x1) + r1cos(x8)x2 &minus; r1sin(x8)x1
 * 5) x32 = (x1 &minus; r1cos(x8))2 + (x2 &minus; r1sin(x8))2
 * 6) x32 = (1  &minus; x1 &minus; r2cos(x9))2 + (x2 &minus; r2sin(x9))2
 * x2 = 2A + r12x8 + r22x9 + x32x10 + (r2sin(&theta;2) + r1sin(&theta;1))x3


 * Thanks everybody. My special thanks to Bo Jacoby for going all the way to writing down all the relevant equations. I eventually solved it using co-ordinate geometry taking numerical approach. Programming with Mathematica made it fairly straightforward. I also solved it using some manipulations of differential equations and ultimately it boiled down to finding the root of a complicated equation, just like in co-ordinate geometry approach. For those interested in the context, I am trying to model micro-sized liquid droplets resting between two circular cylinders. Gravitation can be neglected due to large viscosity effects in such small dimensions and this leads to constant curvature of the free surface. Contact angles are fixed due to fixed surface tension between the pairs of materials. I may have to return here again, when I eventually go for the simulation of 3D drops. Fly by Night, I will try to solve this problem using inversion also. Thanks - DSachan (talk) 01:19, 8 July 2011 (UTC)
 * You are welcome! The problem is challenging and I did not manage to solve it. It comforts me that it was not elementary school geometry homework. Assume that (d, r1, r2, &theta;1, &theta;2, A, x1, x2, x3) represents a solved case, and k is a positive real number. I exploited the fact that then (kd, kr1, kr2, &theta;1, &theta;2, k2A, kx1, kx2, kx3) represents a solved case too. The mirror symmetry, that so does (d, r2, r1, &theta;2, &theta;1, A, 1 &minus; x1, x2, x3), could be used for simplifying the equations by introducing symmetrical functions. Also the coordinate choice could have been O1=(&minus;1, 0) rather than O1=(0, 0) to make the mirror symmetry clearer. And my unsymmetrical formula for twice the area of triangel PQO3 should be replaced by the symmetrical formula for twice the area of triangel QO3P
 * x32sin(x10) = (x1&minus;x4)(x2&minus;x7) &minus; (x2&minus;x5)(x1&minus;x6)
 * = (x1 &minus; r1cos(x8))(x2 &minus; r2sin(x9)) + (x2 &minus; r1sin(x8))(1 &minus; x1 &minus; r2cos(x9))
 * = x2(1 &minus; r1cos(x8) &minus; r2cos(x9)) + x1(r1sin(x8) &minus; r2sin(x9)) &minus; r1sin(x8) + r1r2sin(x8+x9)
 * Bo Jacoby (talk) 07:18, 8 July 2011 (UTC).