How to convert the Euler formula in trigonometric form

I want to convert the following euler formula in trigonometric form
there is a command called ComplexExpand
But it will produce the undesired results

(1)
the instructions below the picture will differentiate the equation and then expand it
it will produce the undesired result
5.jpg

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

(2)
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]] )

Try using ComplexExpand on the expression.

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.

Hi,

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 *)

I.M.

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