Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

An example:

Let f=ae(iωt+3ikx)+b1e(iωt+ikx)+b2e(iωt+ikx)+c1e(iωtikx)+c2e(iωtikx)+de(iωt3ikx). Then

var('omega t k x a b1 b2 c1 c2 d ')
f = a*exp(I*omega*t+3*I*k*x) + b1*exp(I*omega*t+I*k*x) + b2* exp(I*omega*t+I*k*x) + c1*exp(I*omega*t-I*k*x) + c2*exp(I*omega*t-I*k*x) + + d*exp(I*omega*t-3*I*k*x) 
g = ((f/fc).expand())*fc;

produces g=(ae(4ikx)+b1e(2ikx)+b2e(2ikx)+de(2ikx)+c1+c2)e(iωtikx), and we can recover the term inside the parentheses with g.operands()[0].

click to hide/show revision 2
No.2 Revision

An example:

Let f=ae(iωt+3ikx)+b1e(iωt+ikx)+b2e(iωt+ikx)+c1e(iωtikx)+c2e(iωtikx)+de(iωt3ikx). Then

var('omega t k x a b1 b2 c1 c2 d ')
f = a*exp(I*omega*t+3*I*k*x) + b1*exp(I*omega*t+I*k*x) + b2* exp(I*omega*t+I*k*x) b2*exp(I*omega*t+I*k*x) + c1*exp(I*omega*t-I*k*x) + c2*exp(I*omega*t-I*k*x) + + d*exp(I*omega*t-3*I*k*x) 
g = ((f/fc).expand())*fc;

produces g=(ae(4ikx)+b1e(2ikx)+b2e(2ikx)+de(2ikx)+c1+c2)e(iωtikx), and we can recover the term inside the parentheses with g.operands()[0].

click to hide/show revision 3
No.3 Revision

An example:

Let f=ae(iωt+3ikx)+b1e(iωt+ikx)+b2e(iωt+ikx)+c1e(iωtikx)+c2e(iωtikx)+de(iωt3ikx). Then

var('omega t k x a b1 b2 c1 c2 d ')
f = a*exp(I*omega*t+3*I*k*x) + b1*exp(I*omega*t+I*k*x) + b2*exp(I*omega*t+I*k*x) + c1*exp(I*omega*t-I*k*x) + c2*exp(I*omega*t-I*k*x) + d*exp(I*omega*t-3*I*k*x) 
fc = exp(I*omega*t-I*k*x)
g = ((f/fc).expand())*fc;
((f/fc).expand())*fc

produces g=(ae(4ikx)+b1e(2ikx)+b2e(2ikx)+de(2ikx)+c1+c2)e(iωtikx), and we can recover the term inside the parentheses with g.operands()[0].