Skip to main content
added 1 character in body
Source Link
Wizard
  • 2.7k
  • 18
  • 28

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]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 notation for dirac delta functions.

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 notation for dirac delta functions.

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 notation for dirac delta functions.

Source Link
Wizard
  • 2.7k
  • 18
  • 28

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 notation for dirac delta functions.