Message Boards Message Boards

0
|
2647 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Using TrigExpand to expand inside another function

Posted 2 years ago

Dear community, I am trying to manipulate algebraic expressions for the propagation of tidal waves. In particular I would like to expand the trigonometric functions. If I do that as follows, I obtain the expected result.

TrigExpand[Cos[a + b] + Cos[c + d]]
Cos[a] Cos[b] + Cos[c] Cos[d] - Sin[a] Sin[b] - Sin[c] Sin[d]

However, if I try something like

TrigExpand[ArcTan[Cos[a + b] + Cos[c + d]]]    
ArcTan[Cos[a + b] + Cos[c + d]]

Mathematica does not seem to recognize it has to expand the trigonometric functions that are in the Argument of ArcTan. How can I force Mathematica to return

ArcTan[Cos[a] Cos[b] + Cos[c] Cos[d] - Sin[a] Sin[b] - Sin[c] Sin[d]]
POSTED BY: Steven Kaptein
2 Replies

Steven,

one simple way would look like so (i.e. applying TrigExpand on any level of your expression):

TrigExpand //@ ArcTan[Cos[a + b] + Cos[c + d]]
POSTED BY: Henrik Schachner
Posted 2 years ago

Yes, it does the job. Thanks a lot!

POSTED BY: Steven Kaptein
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract