I am interested in eliminating higher-order trigonometric terms from a long symbolic expression.

Specifically I want to reproduce this simplification that is done (in a tutorial I am working through): enter image description here From this, I want to find: enter image description here

which should have the form:

enter image description here

So far (to no success) I've tried the Coefficents function (I added code at the end), and the Fourier series function (which appears to freeze).

Additionally, (if interested) here's is the code for the expression that I want to simplify:

f =  r (E^(I x) - 1)/(1 - r^2 E^(I x)) /. r -> .999

fω = f /. {x -> ω/FSR};
fωConj = ComplexExpand[Conjugate[fω]] // Simplify
fωmΩ = 
fω /. ω -> (ω - Ω);
fωmΩc = fωConj /. ω -> (ω - Ω);
fωpΩ  = fω /. ω -> (ω + Ω);
fωpΩc = fωConj /. ω -> (ω + Ω);

Ereflected = 
  E0 (fω E^(I ω t)  + β fωpΩ E^(I (ω + Ω) t) - β fωmΩ E^(I (ω - Ω) t) );
EreflectedConj = E0 (fωConj E^(-I ω t)  + β fωpΩc E^(-I (ω + Ω) t) - β fωmΩc E^(-I (ω - Ω) t) );

Preflected = Ereflected*EreflectedConj

attempt1 = Coefficient[Preflected, { Cos [Ω], Sin[Ω ]}]
attempt2 = FourierSeries[Preflected, Ω, 2]

EDIT: I realize that I should be more clear. I am interested specifically in "pulling out" the terms that have Sin[Ω t] and Cos[Ω t], but not higher terms. These first terms:

enter image description here

I am not particularly interested in "pulling out" - if that makes this problem easier.

  • $\begingroup$ Thank you for adding further details! I've formatted special characters in your question for readability. Would you check that I have not messed up anything? $\endgroup$ – MarcoB Mar 7 at 19:33
  • $\begingroup$ Thanks for the edit. I think the edited code is accurate (I fixed the spacing of the Iwt part by the way) $\endgroup$ – Sonali Gera Mar 7 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.