1

I am getting Sqrt[Sin[a]^2] as the output to a calculation and I want it to be displayed as Sin[a].

Leo
  • 45
  • 1
  • 6
  • 9
    (1) Sqrt[sin^2(a)] is not proper syntax. (2) Sqrt[u^2] does not equal u, even for the real numbers, much less for complex numbers, which is the domain Mathematica works over. You could try Simplify[Sqrt[(sin (a))^2], sin (a) > 0], which yields a sin, an equivalent form of sin(a), according to Mathematica syntax. Probably you want Simplify[Sqrt[Sin[a]^2], Sin[a] > 0] and to learn the syntax of Mathematica. – Michael E2 Jul 18 '17 at 20:58
  • Oh yes, I overlooked that. Thanks. – Leo Jul 19 '17 at 00:37
  • You can use PowerExpand to do this simplification, but you should be sure that this is the right thing to do (see @JohnDoty's answer). – JEM_Mosig Jul 19 '17 at 01:54

1 Answers1

4

Well, proper syntax would help. Then note that

Sqrt[Sin[a]^2] /. a -> -I
(* I Sinh[1] *)

but

Sin[a] /. a -> -I
(* -I Sinh[1] *)
John Doty
  • 13,712
  • 1
  • 22
  • 42