I'm doing manipulations on functions of the form

$$\phi(x,z,t) = \sum_n a_n(\epsilon x,\epsilon t,z)e^{in( k_ox -\omega_o t + \epsilon \theta(\epsilon x,\epsilon t)))} e^{(k_o+\epsilon k(\epsilon x,\epsilon t) z)},$$ and $$\eta(x,t) =\sum_n b_n(\epsilon x,\epsilon t)e^{in( k_ox -\omega_o t + \epsilon \theta(\epsilon x,\epsilon t)))}$$

for constants $k_o,\omega_o$ and $\epsilon << 1$.

In particular, I'm calculating things like $\phi_t+\frac{1}{2}( \nabla \phi)^2+gz=0$ evaluated at $z=\eta$.

First, I'd like to apply the operators (i.e. the derivatives), and then evaluate that function at $z=\eta$. This I can do using, eg


Now, my problem is that I want to satisfy the equation given above to a certain order. For simpler 1d problems I've used things like "Series" to expand these asymptotic series about $\epsilon=0$. This won't work here, as I need to keep the phases in tact, because of an averaging process I do later on. So, explicitly, my question is, how do I calculate, eg, the derivative written above, and then redefine the phases $n( k_ox -\omega_o t + \epsilon \theta(\epsilon x,\epsilon t)))$ as some constant dummy variable, say $\tau$, and then expand the resulting equation about $\epsilon =0$ to a prescribed order?

Any tips are appreciated,


EDIT: Since I haven't generated much attention, I'll tell you what I'm currently doing, and perhaps someone can suggest a way to automate/improve the procedure.

Currently, I'm calculating the desired equation, evaluating it at the desired place, and then doing a manual search (command+f) to replace all terms $(\epsilon x, \epsilon t) \to (x,t)$, and then doing the same thing to replace the phase with $\tau$, before using the Series function to the desired order. I cannot find relevant resources on how to automate this process. But that's essentially what I'm looking to do.

  • $\begingroup$ The "code" above does not parse. Hard to do much absent a working example. $\endgroup$ – Daniel Lichtblau Oct 7 '14 at 13:41
  • $\begingroup$ @DanielLichtblau Thanks for pointing this out. It should now parse. $\endgroup$ – Nick P Oct 7 '14 at 17:48

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.