For a function $\sin[2x]$, the operand is $2x$. If we want know the value of the operand by hand, the function is simply $\arcsin(\sin[2x])=2x$. How to do this with Mathematica?

Here's what I tried:

ArcSin[Sin[2 x]]

Which, if you try it, does not provide any information.

  • 1
    $\begingroup$ Do you need to apply ArcSin, or could you just try First@Sin[2 x]; the latter will return the argument of Sin mechanically (for lack of a better word), rather than through calculation. $\endgroup$ – MarcoB Dec 13 '19 at 19:19
  • $\begingroup$ @MarcoB I get the error Syntax::sntxf: "First@" cannot be followed by "[Sin[2*x]]". $\endgroup$ – axsvl77 Dec 13 '19 at 19:21
  • $\begingroup$ I just want the 2x back. I think Mathematica has an easy way that I don't know. $\endgroup$ – axsvl77 Dec 13 '19 at 19:22
  • 1
    $\begingroup$ # & @@ Sin[2 x]? $\endgroup$ – kglr Dec 13 '19 at 19:27
  • 1
    $\begingroup$ This mechanism is pretty fiddly, though, because whatever you pass to First might be evaluated to a different form before First starts extraction of the first argument. For instance, First@Sin[1] works while First@Sin[0] doesn't. $\endgroup$ – kirma Dec 13 '19 at 19:30

Perhaps what you are looking for is:

# & @@ Sin[2 x]

2 x

When the argument is a list and some elements of it have a numerical value we need to use Unevaluated to prevent evaluation of Sin:

# & @@ Unevaluated @ Sin[{2 x, π, 3., y}]

{2 x, π, 3., y}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.