1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Cor(x,y) function(I don't know if this is useful)

  1. Mar 14, 2012 #1
    So, I was working on computer science homework, and I decided that I would make a sequence, where there would be a coordinate given, such as (4,6), and there would be a given set of expressions, which are x = y/x and y = x/y, then you would repeat this. Now, what got me interested in this is when I repeated this over and over again, the coordinates would repeat. Then, I plotted the points on a coordinate plane, and this is what I got with, for example (3,3), which got me an iscoceles triangle.

    http://img23.imageshack.us/img23/4966/triangled.png [Broken]

    Which, then, with this method, I made a theorem that if both the x and y value are equal to each other and are larger than 0, then the formed triangle will always have two congruent sides.

    I don't know if this is useful or has already been done before, so this is just an interesting find.
    Last edited by a moderator: May 5, 2017
  2. jcsd
  3. Mar 14, 2012 #2

    Stephen Tashi

    User Avatar
    Science Advisor

    It isn't clear what you mean by "repeat this". If you began with (3,3) then x = 3/3 = 1 and y = 3/3 = 1. If we perform the same process on (1,1) we get (1,1) again. It isn't clear what you graphed.
  4. Mar 14, 2012 #3
    I'd be interested to learn what you did if you found a sequence which somehow produced an isosceles triangle, but like Stephen said I can't figure out what you did.

    Can you post the code you wrote or write explicitly how you defined the sequence?
  5. Mar 15, 2012 #4
    I must have not explained well enough. Sorry about that.

    Here is the code that loops:

    Code (Text):

    x = y / x*10;
    y = x / y*10;
    alarm[0] = 15;

    //In this code, create a point object that will show the
    //coordinates of the points.
    From this image shown:

    http://img811.imageshack.us/img811/8404/proofqj.png [Broken]

    If you were to use the Distance formula, you would get two segments with the distance of 311.28, while the last segment's distance is 329.98, which in proof form, would be that AB = AC by the Distance Formula.

    Also, I ran some more tests, and I noticed that isosceles triangles only form with this sequence when both the x and y coordinate are equal.
    Last edited by a moderator: May 5, 2017
  6. Mar 15, 2012 #5
    bump - Sorry, I really need a response.
  7. Mar 16, 2012 #6
    Anyone? I need assistance here.
  8. Mar 17, 2012 #7
    Is anyone not even visiting this topic? Bump.
  9. Mar 17, 2012 #8

    Stephen Tashi

    User Avatar
    Science Advisor

    Let the initial point be ( x[n],y[n]) with x[n] = y[n] = A

    After the execution of the two steps, the point is (10, 100/A)

    After another execution of the two steps, the point is (100/A, 10)

    So the x and y values are interchanged. Interchanging the (x,y) and y values of a point is the same as "reflecting the point" about the line y = x.
    It isn't surprising that that a point (A,A) which lies on the line y = x forms an isoceles triangle with a point (x,y) and the reflection of that point about y = x.
  10. Mar 18, 2012 #9
    Is it suprising that that by increasing the x value by 1, or even any number, would always result in this same pattern?
    http://img442.imageshack.us/img442/418/newuw.png [Broken]

    For any x and y value, you will always get the result of this triangle. Also, depending on the equation you use, the value after words will always be the same, such as if every step you were to do the square root of x + y / 2, you will always receive the value of 11.91 if you increase x by 1.
    Last edited by a moderator: May 5, 2017
  11. Mar 18, 2012 #10


    User Avatar
    Science Advisor

    Bumping like that is a sure way to get yourself banned.

    In any case, what kind of response do you expect?

    For this to compile x and y will have to have been defined separately. What are they?

    What is "instance_create(X,Y,Z)"?

  12. Mar 18, 2012 #11
    Sorry, I thought the rules said you could bump after 24 hours.

    I expected a response to say whether it was something interesting, for this is the General Math section.

    X and Y are the coordinates on the coordinate plane, if I already said that(I might have not though)

    The rest of the code is not important, for it is just for putting the points on the coordinate plane.

    Now, I really want a response. Every topic I make, they are always ignored.

    EDIT: Here is an equation I left out:

    http://img20.imageshack.us/img20/3619/equationb.png [Broken]

    Here is what the equation means. In the equation, as easily pointed out, the resulting outcome will equal 0. Now, in the equation, we first get the coordinates, or x and y, from the newly given point. After being given the newly given point, which is the result of cor(x,y) with increasing the x value, you enter it into the expression sqr(x / ny), which n is the variable that increases by 1. And, the result will be 0.

    The fastest way(or faster) to calculate the number to 0 would be to instead have n = n+n, being n equaled 1 in the first place.
    Last edited by a moderator: May 5, 2017
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook