0
$\begingroup$

I try

Coefficient[E^(I a (t - b)), E^(I a t)]

and expect the output

E^(-I a b)

but in fact I get 0.

What should be corrected in my code? I cannot solve this problem for a week.

$\endgroup$
8
  • 2
    $\begingroup$ Since the documentation on Coefficient[] speaks of polynomials only, why do you expect anything sensible? $\endgroup$
    – Igor Rivin
    Commented Oct 6, 2014 at 17:19
  • $\begingroup$ @IgorRivin So is it possible to do what I want? $\endgroup$
    – Vladimir
    Commented Oct 6, 2014 at 17:20
  • $\begingroup$ I am sure it is possible, but it may be a little painful, the question is: what is it you are really trying to do? $\endgroup$
    – Igor Rivin
    Commented Oct 6, 2014 at 17:22
  • $\begingroup$ I need to collect the coefficients of exponents with particular powers e.g. E^(I a t), E^(I b t) and so on. Now I see that it is not a Coefficient[] but any other method. Somehow I did not pay attention that Coefficient[] processes only polynomials. $\endgroup$
    – Vladimir
    Commented Oct 6, 2014 at 17:24
  • 2
    $\begingroup$ Possibly you can get the sort of behavior you want by using TrigExpand[ExpToTrig[expression]] and the trying to extract the coefficients of Cos[a*t] and Sin[a*t]. Another approach would be to recast as an explicit polynomial, by converting Exp[I*a*t] to a "variable" eiat and likewise for Exp[I*a*b]. $\endgroup$ Commented Oct 6, 2014 at 17:54

1 Answer 1

2
$\begingroup$
Coefficient[E^(I a (t - b)) // ExpandAll, E^(I a t)]

(* Exp[-I a b] *)
$\endgroup$
1
  • $\begingroup$ You can delete your comment, just click on the "X" sign next to the time. I'll delete mine, I can't delete yours. $\endgroup$
    – RunnyKine
    Commented Oct 6, 2014 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.