Kay-Michael Voit wrote:
> Hello,
> I'm trying to solve a PDE using a Exp ansatz.
> Now I am am stuck with the equation of the form
> a Exp[I k x] + b Exp[I k x] == 0 (though much more complicated)
> What I would like to do is a comparison of coefficients. How can I make
> Mathemetica to show me a form of the equation where I can easily read
> the comparison equations?
> (In the above equation
> (a + b) Exp[I k x] == 0
> for example.)
>
> Regards
> Kay-Michael Voit
One way is to use Collect. I show I slightly more complicated example below.
In[1]:= InputForm[Collect[a*Exp[I*k*x] + b*Exp[I*m*x] +
c*Exp[I*k*x] + d*Exp[I*n*x] + e*Exp[I*m*x], Exp[_]]]
Out[1]//InputForm= (a + c)*E^(I*k*x) + (b + e)*E^(I*m*x) + d*E^(I*n*x)
Daniel Lichtblau
WOlfram Research