0
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ Have you tried TrigExpand[]? $\endgroup$ Commented Jul 24, 2015 at 11:00
  • $\begingroup$ Hi, welcome to Mathematica.SE. Please have a look at the StackExchange editing-help for improving your formatting in future postings. A useful post which answers many common questions can be found here. Good Mathematica resources can be found here. $\endgroup$ Commented Jul 24, 2015 at 11:07

1 Answer 1

0
$\begingroup$

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

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.