PDA

View Full Version : Math Help



Drisco
08-15-2012, 10:23 PM
Anyone able to find a formula to get this?

Radius is 1.
X/Y are < 1

3878

http://i.imgur.com/ZltP5.png

X = Formula Here
Y = Formula Here

X and Y are known.

Drisco
08-15-2012, 10:31 PM
More clarity. http://i.imgur.com/iMo7p.png

Bobmuhthol
08-15-2012, 10:43 PM
They're coordinates on a unit circle, so you need to figure out the angle between x and m. p is the cosine of the angle and q is the sine.

Drisco
08-15-2012, 10:57 PM
Are you able to figure it out by what is given? The purple dot?

Bobmuhthol
08-15-2012, 11:32 PM
I didn't try because I hate geometry. But I just thought about it for like 5 seconds, and you have one angle (it's a right triangle) and 2 side lengths (and the hypotenuse), so try using the Law of Cosines to solve for the angles of the triangle (in terms of x and y). The angle between x and m is the same as the angle between x and the hypotenuse because m is the midpoint of the hypotenuse -- I haven't proven it to myself but intuitively I'm pretty sure the midpoint of the hypotenuse must lie orthogonal to the midpoints of both sides.

Latrinsorm
08-15-2012, 11:54 PM
This is probably wrong.

http://img.photobucket.com/albums/v456/johnnyoldschool/driscolulz.jpg

We set our origin at the center of the circle in the usual way: x points to the right, y points up.
We extend a purple line along the x axis to the edge of the circle. This is a radius and therefore of unit length. Therefore p + x0 = 1, where x0 is the little bit that extends past the blue line q, so...
1 - x0 = p

We can also say that q^2 + x0^2 = h^2, where h is the dark red line. We know that q is perpendicular to x because q is by definition wholly on the y axis and x0 is by definition wholly on the x axis.

We can finally say that p^2 + q^2 = 1 because they coordinates on the unit circle.

.

We call angle A the angle formed by x and the original black radius. We then know that sin(A/2) = h / 2.
We call angle B the angle formed in the lower right corner where x meets the original black hypotenuse. By definition tan(B) = y/x.
Because the black radius bisects the hypotenuse, A = B, so...
h = 2 * sin(arctan[y/x]/2)
And because y and x are known we know h as well, so now we take...

x0^2 = h^2 - q^2
x0^2 = h^2 - (1 - p^2)
x0^2 = h^2 - (1 - (1 - x0)^2)
And now we factor...
x0^2 = h^2 - (1 - (1 - 2*x0 + x0^2))
x0^2 = h^2 - (1 - 1 + 2*x0 - x0^2)
x0^2 = h^2 - (2*x0 - x0^2)
x0^2 = h^2 - 2*x0 + x0^2
2*x0 = h^2
x0 = h^2 / 2

And now we know x0 as well, so we turn back around and do...
p = 1 - x0
q = sqrt(1 - p^2) or sqrt(h^2 - x0^2) if you prefer.

In very long form, this would be...
p = 1 - 2 * sin(arctan[y/x]/2)^2

To check ourselves, we should have p -> 0 as x -> 0. As x -> 0, we have arctan(infinity) which returns pi/2 or -pi/2. The sine of pi/4 is 1/sqrt(2), which when squared gives us 1/2, and 1 - 2 * 1/2 = 0 MOTHERFUCKERS!!!

Further, we should have p -> 1 as y -> 0. arctan(0) returns 0, the sine of 0/2 is 0, 0 squared is 0, 2 * 0 is 0, 1 - 0 is 1.

Wheelerm
08-16-2012, 12:40 AM
I don't think this answers the question. He needs a formula for x and a formula for y. This is basically the proof of angles in a unit circle. Laws of sine and cosine. I've been drinking tonight, so probably not much help here, but if you imagine a line extending from the origin to p=1, q=0, x would equal 1. Likewise, when q=1 and p=0, y=1. For any arbitrary p and q between these points, x is a function of p and y is a function of q.

Since p will always be the cosine of theta (theta being the angle between x and m) and q will always be The sine of theta, then x must be m*cos (theta). Similarly, y must be m*sin(theta).

Latrinsorm
08-16-2012, 05:04 PM
I don't think this answers the question. He needs a formula for x and a formula for y. This is basically the proof of angles in a unit circle. Laws of sine and cosine. I've been drinking tonight, so probably not much help here, but if you imagine a line extending from the origin to p=1, q=0, x would equal 1. Likewise, when q=1 and p=0, y=1. For any arbitrary p and q between these points, x is a function of p and y is a function of q.

Since p will always be the cosine of theta (theta being the angle between x and m) and q will always be The sine of theta, then x must be m*cos (theta). Similarly, y must be m*sin(theta).x and y are givens, he said.

Anyway, a new solution came to me in a dream last night.

Angle A = Angle B
tan(angle A) = tan(angle B)
q/p = y/x

And we recall that p^2 + q^2 = 1 and substitute...
p^2 + p^2*(y/x)^2 = 1
p^2 = 1 / (1 + (y/x)^2)

Similarly...
q^2 = 1 / (1 + (x/y)^2)

A little neater than my last solution, plus it won't be as obvious that you didn't do it if you copy it.

.

BUT WHAT'S REALLY COOL is that they're both right, so...
1 / (1 + (y/x)^2) = 1 - 2 * sin(arctan[y/x]/2)^2

Isn't that cool? That's pretty cool.

Androidpk
08-16-2012, 05:07 PM
As cool as a one legged ninja or a blind sniper.