Skip to main content
deleted 184 characters in body
Source Link
Kuba
  • 138.9k
  • 13
  • 297
  • 803

One way would be like the following. Let us define the function rule as follows:

 Clear[rule]; rule[expr_] :=  ReplaceAll[  expr, {Sin[2 \[Gamma]_]γ_] -> 2*Sin[\[Gamma]]*Cos[\[Gamma]]2*Sin[γ]*Cos[γ],   Cos[2 \[Gamma]_]γ_] -> Cos[\[Gamma]]^2Cos[γ]^2 - Sin[\[Gamma]]^2Sin[γ]^2}]; 

and map this function on your expression. For the sake of shortness I take here only a small part of your otherwise a too long expression. The effect is, however, the same, I checked. So, let this:

 expr=(Cos[Subscript[\[CapitalTheta]Cos[Subscript[Θ, 12]] Sin[2 \[Gamma]]γ] f[Subscript[r,  1], Subscript[r, 2], \[Alpha]α, \[Beta]β, \[Gamma]γ, Subscript[\[CapitalTheta]Subscript[Θ, 12]])/(2 Sin[\[Beta]]Sin[β] Sin[  Subscript[\[CapitalTheta]Subscript[Θ, 12]]^2 \!\(\*SubsuperscriptBox[\(r\), \(1\), \(2\)]\) Subscript[\[Mu]Subscript[μ, 1]) 

be your expression in the StandardForm. Then this

Map[rule, expr]//TraditionalForm 

returning this:

(* (sin(\[Gamma]γ) cos(\[Gamma]γ) cos(Subscript[\[CapitalTheta]Subscript[Θ, 12]) f(Subscript[r, 1], Subscript[r, 2]],\[Alpha]α,\[Beta]β,\[Gamma]γ,Subscript[\[CapitalTheta] Subscript[Θ, 12]) )/(Subscript[\[Mu]Subscript[μ, 1] Subsuperscript[r, 1, 2] sin(\[Beta]β)  sin(Subscript[\[CapitalTheta]Subscript[Θ, 12])^2) *) 

Though it looks awfully here, this: enter image description here is

enter image description here

is what you see on the screen. And suchlike looks each term.

One way would be like the following. Let us define the function rule as follows:

 Clear[rule]; rule[expr_] :=  ReplaceAll[  expr, {Sin[2 \[Gamma]_] -> 2*Sin[\[Gamma]]*Cos[\[Gamma]], Cos[2 \[Gamma]_] -> Cos[\[Gamma]]^2 - Sin[\[Gamma]]^2}]; 

and map this function on your expression. For the sake of shortness I take here only a small part of your otherwise a too long expression. The effect is, however, the same, I checked. So, let this:

 expr=(Cos[Subscript[\[CapitalTheta], 12]] Sin[2 \[Gamma]] f[Subscript[r,  1], Subscript[r, 2], \[Alpha], \[Beta], \[Gamma], Subscript[\[CapitalTheta], 12]])/(2 Sin[\[Beta]] Sin[  Subscript[\[CapitalTheta], 12]]^2 \!\(\*SubsuperscriptBox[\(r\), \(1\), \(2\)]\) Subscript[\[Mu], 1]) 

be your expression in the StandardForm. Then this

Map[rule, expr]//TraditionalForm 

returning this:

(* (sin(\[Gamma]) cos(\[Gamma]) cos(Subscript[\[CapitalTheta], 12]) f(Subscript[r, 1],Subscript[r, 2],\[Alpha],\[Beta],\[Gamma],Subscript[\[CapitalTheta], 12]))/(Subscript[\[Mu], 1] Subsuperscript[r, 1, 2] sin(\[Beta]) sin(Subscript[\[CapitalTheta], 12])^2) *) 

Though it looks awfully here, this: enter image description here is what you see on the screen. And suchlike looks each term.

One way would be like the following. Let us define the function rule as follows:

Clear[rule]; rule[expr_] := ReplaceAll[ expr, {Sin[2 γ_] -> 2*Sin[γ]*Cos[γ],   Cos[2 γ_] -> Cos[γ]^2 - Sin[γ]^2}]; 

and map this function on your expression. For the sake of shortness I take here only a small part of your otherwise a too long expression. The effect is, however, the same, I checked. So, let this:

 expr=(Cos[Subscript[Θ, 12]] Sin[2 γ] f[Subscript[r, 1], Subscript[r, 2], α, β, γ, Subscript[Θ, 12]])/(2 Sin[β] Sin[ Subscript[Θ, 12]]^2 \!\(\*SubsuperscriptBox[\(r\), \(1\), \(2\)]\) Subscript[μ, 1]) 

be your expression in the StandardForm. Then this

Map[rule, expr]//TraditionalForm 

returning this:

(* (sin(γ) cos(γ) cos(Subscript[Θ, 12]) f(Subscript[r, 1], Subscript[r, ],α,β,γ, Subscript[Θ, 12]) )/(Subscript[μ, 1] Subsuperscript[r, 1, 2] sin(β)  sin(Subscript[Θ, 12])^2) *) 

Though it looks awfully here, this:

enter image description here

is what you see on the screen. And suchlike looks each term.

Source Link
Alexei Boulbitch
  • 40.8k
  • 2
  • 51
  • 102

One way would be like the following. Let us define the function rule as follows:

 Clear[rule]; rule[expr_] := ReplaceAll[ expr, {Sin[2 \[Gamma]_] -> 2*Sin[\[Gamma]]*Cos[\[Gamma]], Cos[2 \[Gamma]_] -> Cos[\[Gamma]]^2 - Sin[\[Gamma]]^2}]; 

and map this function on your expression. For the sake of shortness I take here only a small part of your otherwise a too long expression. The effect is, however, the same, I checked. So, let this:

 expr=(Cos[Subscript[\[CapitalTheta], 12]] Sin[2 \[Gamma]] f[Subscript[r, 1], Subscript[r, 2], \[Alpha], \[Beta], \[Gamma], Subscript[\[CapitalTheta], 12]])/(2 Sin[\[Beta]] Sin[ Subscript[\[CapitalTheta], 12]]^2 \!\(\*SubsuperscriptBox[\(r\), \(1\), \(2\)]\) Subscript[\[Mu], 1]) 

be your expression in the StandardForm. Then this

Map[rule, expr]//TraditionalForm 

returning this:

(* (sin(\[Gamma]) cos(\[Gamma]) cos(Subscript[\[CapitalTheta], 12]) f(Subscript[r, 1],Subscript[r, 2],\[Alpha],\[Beta],\[Gamma],Subscript[\[CapitalTheta], 12]))/(Subscript[\[Mu], 1] Subsuperscript[r, 1, 2] sin(\[Beta]) sin(Subscript[\[CapitalTheta], 12])^2) *) 

Though it looks awfully here, this: enter image description here is what you see on the screen. And suchlike looks each term.