Results 1 to 17 of 17

Thread: An easy problem!

  1. #1

    Thread Starter
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

    An easy problem!

    solve for x if:

    arcsin(x)=cos(x)

    accurate to 10 decimal places.

  2. #2
    Registered User Lior's Avatar
    Join Date
    Jan 2000
    Posts
    307

    Cool An idea for an answer...

    Hi,

    When I tried to solve this equation I've noticed a few facts:

    1. As X grows Cos(X) decreases and ArcSin(X) Increases so the equation actually claims that the two functions meet somewhere on the way.

    2. Using the function ArcSin(x) means -1<X<1

    3. Cos(-X) = Cos(+X) which means that both for positive and negative angle the cosine function always returns a positive value.

    4. ArcSin(-X) = -ArcSin(X) which means that the returned value is positive only if the angle is positive and vice versa.

    5. That's why there is no need to look for X<0, or in other words, the new more specefic range for X is now 0<X<1

    6. If X>(Pi/180) Then ArcSin(X)>1 which exceeds the definition range of X.

    7. Therefore, we can now be even more specific and say that X must be between 0<X<=(Pi/180)

    That's what I concluded so far.

    I guess we can now simply code a little program for scanning all numbers from 0 to Pi/180 for solving the equation ArcSin(X)=Cos(X) increasing the loop's variable each time by 10^(-10) or any other precision wanted.

    As far as I know, VB does not support the ArcSin funtion, but anyway, you can calculate it through the supported ArcTan function, Called Atn(X) in VB:

    ArcSin(X) = Atn(X / Sqr(1-X*X))

    To convert degrees to radians multiply degrees by Pi/180.

    To convert radians to degrees multiply radians by 180/Pi.


    Hey..., On a second thought..., I guess I actually already told the answer without noticing it.

    X=Pi/180, no?

    Since Pi is irrational constant, it's a bit hard to post the answer decimally.

    Have a good day.
    Last edited by Lior; Sep 17th, 2002 at 05:26 AM.

  3. #3
    Fanatic Member sql_lall's Avatar
    Join Date
    Jul 2002
    Location
    Up Above (i.e. AUS)
    Posts
    571

    Cool!

    Thanks for the formula (i was always wondering how to do that)

    Anyway, just wondering if those equations were in degrees, radians, or Gradients (though i guess you *could* convert at the end i suppose)

    Oh, and that increment won't work necessarily (almost definitely), as the number is more than likely to have square-roots in it somewhere. (though now i've said that, the answer will probably be 0.001 or something simple )

    Anyway, that process (making the X bounds smaller by using the Arcsin part, then from this making the X bounds smaller by using the cos part) maybe can be used over and over again to find limits for X.

    P.S. do you actually know the answer, or want to find it out??
    sql_lall

  4. #4
    Registered User Lior's Avatar
    Join Date
    Jan 2000
    Posts
    307
    Hi,

    The equation I posted was in radians.

    I dont know the answer, but I have some kind of intuition it's Pi/180.

    We just need to calculate Pi far enough so it wont make any differences within the first 10 digits if is divided by 180.

  5. #5

    Thread Starter
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    The answer is not pi/180.

    pi/180 = .01745329252

    the arcsin of that being .017454178738

    the cos of pi/180 is .999847695156

    let me get you started:

    cos(x)-arcsin(x)=0

    and .5 < x < 1

  6. #6

    Thread Starter
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    No one has an answer?

  7. #7
    Registered User Lior's Avatar
    Join Date
    Jan 2000
    Posts
    307
    Excuse me, but:

    Arcsin(Pi/180) = 1.00005077653060952047020393467106

    and not as you posted.

    and Cos(Pi/180) = 0.99999995360411414000711804671704

    I think this difference occurs only because pi is not calculated far enough.

    But I will try to develop your way now too...

    Talk to you later.

  8. #8
    Registered User Lior's Avatar
    Join Date
    Jan 2000
    Posts
    307

    Question X has no solution ???

    It's kind of weird, but using the way of simplifying expressions, It looks like X has no solution, as I will explain:

    Since we use ArcSin(X) then -1<=X<=1

    As we said above, Cos(-X) = Cos(X) and ArcSin(-X) = -ArcSin(X) so we can say now that 0<X<1 (X is obviously not 0 and not 1)

    Now let's go to the actual work:

    If ArcSin(X) = Cos(X) Then their derivatives are also equal:

    ArcSin'(X) = Cos'(X)

    1 / Sqrt( 1 - X²) = -Sin(X)

    Sin(X) = -1 / Sqrt(1 - X²)

    Now, remember we said that 0<X<1 ?
    If so, Sin(X) is clearly positive, right?
    If Sin(X) is positive, then the denominator Sqrt(1 - X²) must be negative (we got -1 at the numerator).
    As you can see, the denominator is always positive because 0<X<1

    In conclusion, we got one side of the equation being always positive, while the other side is always negative.

    This definitely ruined my strong intuition X was Pi/180.

    By the way, if you claim X does really equal to some number, Where was I mistaken above?

  9. #9
    Registered User Lior's Avatar
    Join Date
    Jan 2000
    Posts
    307
    Well ???

  10. #10

    Thread Starter
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    I assure you X has a solution.

    Here's a hint where:

    .5 < x < .7

  11. #11

    Thread Starter
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    I was using radians. Yes in degrees you're right.

  12. #12

    Thread Starter
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    In degrees the answer would be within:

    0 < x < .1

    In degrees the answer is still not pi/180. Although pi/180 is close.

  13. #13
    Registered User Lior's Avatar
    Join Date
    Jan 2000
    Posts
    307
    But tell me where I am mistaken, where I show X may not has any solution. (a few posts above)

  14. #14

    Thread Starter
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    Sin(X) = -1 / Sqrt(1 - X²)

    Is not true.

    Nor is:

    1 / Sqrt( 1 - X²) = -Sin(X)

    How you got these is beyond me.


  15. #15
    Registered User Lior's Avatar
    Join Date
    Jan 2000
    Posts
    307
    It's known that the derivative of the ArcSin function is:

    ArcSin'(X) = 1 / Sqrt( 1 - X²)

    and the derivative of Cos(x) is:

    Cos'(X) = -Sin(X)

    when we compare them against each other, we come up with no solution for X.

    Weird !!!

  16. #16
    Lively Member
    Join Date
    Apr 2003
    Location
    Georgetown, Texas
    Posts
    114
    You could try x = 0.69481 96907 29, or:
    arcsin(x) = 0.76816 91567 34
    cos(x) = 0.76816 91567 38

  17. #17
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    tried to use my calculator to solve this and i got
    x=0.017452405627727
    my calc also showed that
    pi/180=0.017453292519943
    so its almost equal
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width