# Two intersecting triangle

If we assume that s1(x)=s2(x) (the areas of the two triangles are equal) and and we know (x1, y1), (x2, y2), (x3, y3)and also we assume that the line L which is between (x1, y1) and (x, y(x)), because we know for example another point in this line so we know the slope and the line. How can I find x value in ? Is there an easy way to find x?

http://stackoverflow.com/questions/12830146/two-intersecting-triangle-in-r

-
Since you have put no explicit constraints on the common vertex, I see essentially one constraint (equal areas) and three free variables ($x$, $x^*$ and $y^*$). Perhaps the red/green lines through the common vertex are supposed to be straight, but you have not said so and they are not in the diagram. –  Henry Oct 11 '12 at 0:22
The x* and y* and y(x) is a function of x. I know that intead of using equal area we can use |d((x1, y1),(x*(x), y*(x))|*|d((x, y(x)), (x*(x), y*(x))| = |d((x2, y2), (x*(x), y*(x))|*|d((x3, y3), , (x*(x), y*(x))|. –  ben Oct 11 '12 at 0:23
What functions of $x$ are $x^*$ and $y^*$? –  Henry Oct 11 '12 at 0:24
The line between (x, y(x)) and (x3, y3) should be straight. by intersecting two striagth line we can find x* and y* interms of x. –  ben Oct 11 '12 at 0:30
@ben: Sure, it can be done. My way of doing it is unattractive, can just grind it through. Am assuming (it is not absolutely clear from post) that we know the slope of the line through $(x_3,y_3)$ and $(x,y_{(x)})$. –  André Nicolas Oct 11 '12 at 1:15

If we know the slope of the line $\ell$ through the known point $(x_3,y_3)$ and the (unknown) point $(x,y_{(x)})$, then we can find an equation for that line, say $ax+by+c=0$.
Now we can use the formula for the distance of a point from a line to find the distances $d_1$ and $d_2$ from $(x_1,y_1)$ and $(x_2,y_2)$ to $\ell$. These are given by $$d_i=\frac{|ax_i+by_i+c|}{\sqrt{a^2+b^2}}.$$ So we know the heights of the little triangle and the big one. The little one has unknown base $b_1$. The big one has known base $b_2$. For we can find the coordinates you labelled $(x^\ast(x), y^\ast(x))$, the common vertex of the two triangles. This is done by finding the intersection point of the line $\ell$ and the line through $(x_1,y_1)$ and $(x_2,y_2)$. Once we know the intersection point, we can compute $b_2$.
By the equality of areas, we have $$b_1d_1=b_2d_2.$$ so since we know the $d_i$ and $b_2$, we know $b_1$. Finally, we find the point on $\ell$ which is distance $b_1$ from the known point $(x^\ast(x),y^\ast(x))$. Since we know the equation $ax+by+c=0$ of $\ell$, this is not hard. We want to find where the circle with centre the known point $(x^\ast(x),y^\ast(x)$ and radius the known $b_1$ meets the line with equation $ax+by=c$.
By substitution, we end up with a quadratic equation in $x$. There are in general two solutions. The right one can be picked out fairly easily. Or else we can write the equation of $\ell$ parametrically. Then the appropriate value of the parameter can be obtained from the fact that $b_1d_1=b_2d_2$.