0

I want to simplify a nonlinear equation with trigonometric terms. After I've expanded I don't want to loose open terms to Trigonometric Addition Formulas (http://mathworld.wolfram.com/TrigonometricAdditionFormulas.html) but others are to be simplified. In other words, I want to exclude addition formulas from the simplification process but I don't want to exclude other identities (such as cos^2 + sin^2 = 1 etc.). For example let my expression will be;

cos(th_1)^2 + 2*cos(th_1)*cos(th_2) + 2*sin(th_1)*sin(th_2)+ sin(th_1)^2

After some kind of "controlled simplification (?)" I want to get;

1 + 2*cos(th_1)*cos(th_2) + 2*sin(th_1)*sin(th_2)

I don't want to get;

1 + 2*cos(th_1 - th_2)

I will use the bold terms' open forms.

I think I will need a clever usage of ExcludedForms, I've tried something but I couldn't do it.

How can I do that?

Thank you.

Sjoerd C. de Vries
  • 65,815
  • 14
  • 188
  • 323

1 Answers1

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

enter image description here

As suggested by Guess who it is

expr // TrigExpand

enter image description here

Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198