Message Boards Message Boards


How to convert the Euler formula in trigonometric form

Posted 9 years ago
4 Replies
1 Total Likes
I want to convert the following euler formula in trigonometric form
there is a command called ComplexExpand
But it will produce the undesired results

the instructions below the picture will differentiate the equation and then expand it
it will produce the undesired result 

f2 = D[f1[t],t] // ComplexExpand

 Desired  result 
r3'[t]*( Cos[q3[t]] + I Sin[q3[t]] )-
r1(q1)'[t]*( Cos[q1[t]] + I Sin[q1[t]] )+
r2(q2)'[t]*( Cos[q2[t]] + I Sin[q2[t]] )+
r3[t](q3)'[t]*( Cos[q3[t]] + I Sin[q3[t]] )
POSTED BY: Robert Chen
4 Replies
Posted 9 years ago
If i change the format of the equation

It will output the result  I want
I don't know why it would produce the different results

f[t_] = r2 E^(I q2[t]) + r3[t] E^(I q3[t]) - r1 E^(I q1[t])
f2 =  f'[t] // ComplexExpand
POSTED BY: Robert Chen

Also, try ExpToTrig[] 
f1 = D[r2 Expand[I q2[t]] + r3 Exp[I q3[t]] - r1 Exp[I q1[t]], t];
f1 // ExpToTrig
f1  // ExpToTrig  // TrigReduce (* also useful *)

POSTED BY: Ivan Morozov
Hello and welcome to the Wolfram Community! Please take a few minutes to read this tutorial about correct posting – especially of Mathematica code:

How to type up a post: editor tutorial & general tips

If you will not follow the tutorial, other members of community may not be able to test your code. To edit your post – click “Edit” in the lower right corner of your post.
POSTED BY: Moderation Team
Try using ComplexExpand on the expression.
POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract