Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • $\begingroup$ Thanks, in fact my expression is quite simple: ds2=dr^2 + 1/2 (d\[Theta]^2 + 2 d\[Phi]^2) r^2 - 1/2 d\[Theta]^2 r^2 1 - 2 Sin[\[Phi]]^2, and I get what I want by your method, ds2/. {Cos[2 t_] :> 1 - 2 Sin[t]^2} // Simplify $\endgroup$ Commented Jul 26, 2015 at 3:21
  • 1
    $\begingroup$ @vanabel You're welcome. Sometimes Simplify will convert the expression back to terms of Cos[2 x] and sometimes it will combine the Sin[x] with other terms and not convert it. Trig. is tricky to deal with. BTW, I would not redefine a basic function like Cos in the way RunnyKine does. Since there are, I believe, many rules built into Mathematica about sine and cosine, I would be afraid the redefinition would break something. Just what that is would be difficult to predict. $\endgroup$ Commented Jul 26, 2015 at 3:28