Like Tree1Likes
  • 1 Post By manasij7479

inverse of sine?

This is a discussion on inverse of sine? within the General Discussions forums, part of the Community Boards category; Hey guys, I just have a quick question. Is there a true inverse of sine? now I know that an ...

  1. #1
    That weird Java guy xniinja's Avatar
    Join Date
    Jun 2010
    Posts
    230

    inverse of sine?

    Hey guys, I just have a quick question. Is there a true inverse of sine? now I know that an inverse of sine wouldn't be a function, but what if we restricted it. then wouldn't you be able to make a kind-of inverse function?

    Ok I i'm just going to come out and say it, can you solve this? (for 'y' of course)

    Code:
    x=(sqrt(y-2)^2)+(sqrt(-y+4)^2)+sin(y)-2
    this question has been eating at my soul for the past few days and if someone could provide some in-site that would be great

    -thanks in advance

    actually I need it for x=0 to try to find Pi so in that case you can just solve this...


    Code:
    0=(sqrt(y-2)^2)+(sqrt(-y+4)^2)+sin(y)-2
    God... that's ugly.

    -thanks again

    btw: my logic has been all over the place lately so if something looks strange, that's why. like if i am using Pi to find Pi, that's what my friend told me I am doing...
    Last edited by xniinja; 12-13-2011 at 10:04 PM.

  2. #2
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,239
    You can find the inverse of sine modulo 2*Pi, it's called arcsine.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  3. #3
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,831
    y = asin(x)

    If x is zero, so is y.

    Everything else cancels out. This equation gets you no closer to finding Pi.
    Last edited by nonoob; 12-15-2011 at 12:44 PM.

  4. #4
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,545
    If x is 0, y is not 0 (because of -2 term).
    That equation cannot be solved arithmetically AFAIK. You'd have to do it numerically.
    But solve an equation for finding Pi...? Why would you do that?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,182

  6. #6
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638
    that would be insine.

    180 degrees out of phase of sin.

    <joke>

  7. #7
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,831
    Huh Elysia?

    Here's how everything cancels out:

    Original:
    x = (sqrt(y-2)^2) + (sqrt(-y+4)^2) + sin(y) - 2

    Taking square-root then immediately squaring means you haven't done anything.
    This is of course assuming the argument doesn't go negative ... but one could use imaginary numbers and get away with it.

    x = (y - 2) + (-y + 4) + sin(y) - 2

    removing the parenthesis and moving the sin to the last

    x = y - 2 - y + 4 - 2 + sin(y)

    grouping variables and constants together

    x = y - y - 2 + 4 - 2 + sin(y)

    Things cancel out to give

    x = sin(y)

    Now if x is pinned at zero, y is zero. Or it could be any multiple of Pi since Sine is cyclical.
    Last edited by nonoob; 12-16-2011 at 08:24 AM.

  8. #8
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,545
    Ah, I didn't think of sqrt as actual square root. I think I just saw them as sines or something. My bad.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #9
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    Quote Originally Posted by nonoob View Post
    Original:
    x = (sqrt(y-2)^2) + (sqrt(-y+4)^2) + sin(y) - 2

    Taking square-root then immediately squaring means you haven't done anything.
    This is of course assuming the argument doesn't go negative ... but one could use imaginary numbers and get away with it.

    x = (y - 2) + (-y + 4) + sin(y) - 2
    You can't do that; -y+4 isn't the same as (sqrt(4-y))^2, which actually reduced to |4-y|, where || is the absolute value function.

  10. #10
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,498
    Quote Originally Posted by User Name: View Post
    You can't do that; -y+4 isn't the same as (sqrt(4-y))^2, which actually reduced to |4-y|, where || is the absolute value function.
    You are confusing sqrt(x^2) with (sqrt(x))^2 .
    It gives |x| only for the former...but the later remains x.
    User Name: likes this.
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



Popular pages Recent additions subscribe to a feed

Similar Threads

  1. values of sine
    By jacek in forum C Programming
    Replies: 2
    Last Post: 10-31-2009, 04:17 PM
  2. UDF to calculate sine
    By n3cr0_l0rd in forum C Programming
    Replies: 5
    Last Post: 02-26-2009, 07:02 AM
  3. Sine (Sin) Algorithm Help
    By StaticKyle in forum C Programming
    Replies: 52
    Last Post: 05-13-2008, 08:37 AM
  4. Sine approximation Help
    By What111 in forum C Programming
    Replies: 8
    Last Post: 11-04-2007, 05:22 PM
  5. How to program in the inverse sine function
    By Finchie_88 in forum C++ Programming
    Replies: 4
    Last Post: 03-13-2005, 10:56 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21