Tag Info

New answers tagged

1

I would like to share more universal method I use in my scientific manipulations involving trigonomeric expressions of real arguments. It does not require any identities used by hand and is mathematically coincise. The idea is to convert trigonometric expression to exponents, which in turn will play the role of monomials. Then you can use very powerful ...


3

Expanding Cos[2 x] to 1 - Sin[x]^2 and simplifying are somewhat opposite procedures. Simplify basically reduces the leaf count (see How do I invoke the default complexity function? for more details). As we can see the number of leaves in the goal is twice the numbers of leaves in the starting expression: LeafCount /@ {Cos[2 x], 1 - Sin[x]^2} (* {4, 8} ...


7

One way will be to add it to the definition of Cos by Unprotecting it. Unprotect[Cos] Cos[2 x] := 1 - 2 Sin[x]^2 Protect[Cos] Then evaluating the following: 2 Cos[2 x] + 3 x Cos[2 x] + Tan[x] Sin[x] Cos[2 x] + Exp[Tan[Cos[2 x]]] gives: Which you can further Simplify if you so please. Notice that the desired replacement has occurred everywhere ...


2

You could go ahead and modify the mathematica output manually by defining exactly what you want to have transformed. In your case this would look like this: MakeBoxes[Cos[2*x_], StandardForm] := RowBox[{MakeBoxes[1 - 2 Sin[x]^2]}]; This effectively turns every occurrence of Cos[2x] in StandardForm into 1 - 2 Sin[x]^2. I use this to get a certain standard ...


0

You cannot use underscore in a name Format[th[n_]] := Subscript[th, n] expr = Cos[th[1]]^2 + 2*Cos[th[1]]*Cos[th[2]] + 2*Sin[th[1]]*Sin[th[2]] + Sin[th[1]]^2 As suggested by Guess who it is expr // TrigExpand



Top 50 recent answers are included