# [Maxima] dy(x)/dy - prolongation formula

N.A.Beishuizen at ctw.utwente.nl N.A.Beishuizen at ctw.utwente.nl
Sun Nov 30 14:21:12 CST 2008

```Hi Stavros and others,

Ok, maybe there is a simpler way of tackling things.
Maybe you can help me out. Here is exactly what I want.
My maxima code is at the end of the messages.

I want to obtain the kth prolongation, which can be obtained
recursively as:

n(1) = Dx(n) - y' * Dx(xi)
n(k) = Dx(n(k-1)) - dy(k)/dx(k) * Dx(xi)

y' is dy/dx and dy(k)/dx(k) is the kth derivative of y.
n and xi depend on x,y

Dx is the total derivative, which is
Dx = d/dx + y' * d/dy

so, for n(1):
n(1) = Dx(n) - y' * Dx(xi)
n(1) = (d/dx + y' * d/dy)*n - y'*(d/dx + y'*d/dy)*xi
n(1) = dn/dx + y'*(dn/dy - dxi/dx) + (y')^2 * dxi/dy

short notation:
n(1) = n_x + y'*(n_y - xi_x) + (y')^2*xi_y

for n(2):
n(2) = Dx(n(1)) - y'' * Dx(xi)
..
n(2) = n_xx + (2n_xy -xi_xx)y' + (n_yy-2*xi_xy)(y')^2 - xi_yy*(y')^3
+ (n_y - 2xi_x - 3*xi_y*y')*y''

My program is below, but it produces d^2y(x)/dydx terms for eta_(2), which are zero.

the difficulty is that y does not depend on x, but dy/dx exists as a separate independent
variable.

/* construct the total derivative */
total_derivative(f) :=
block([Dx],
/* maybe use 'diff(y,x) here?*/
D_x: diff(f,x) + diff(y(x),x)*diff(f,y),
expand(D_x)
)\$

eta_(j) :=
block([_eta:makelist(0,i,1,j+1) ],
depends([eta,xi],[x,y]),

_eta[1] : eta,

for i:1 thru j do (
_eta[i+1] : total_derivative(_eta[i]) - diff(y(x),x)*total_derivative(xi)
),
expand(_eta)
)\$

```