Rather than ask how to implement your traditional, yet ambiguous
notation on Maxima, I suggest that you start by changing your notation
completely to correspond to what is supported in Maxima.
I think this will then make your problem easy to compute, instead of
hard to even explain.
For example, Maxima can operate with computational functions, arrays,
and array functions like n[i](x,y), and infix operations like +, *.
The notation you present using includes operators like Dx and ', which
are not supported. If you define a function n of one argument, then
n() or just n is wrong. if xi means x_i perhaps it should be
X[i], and if it is a function of x and y
perhaps X[i](x,y). and if y is a function of x, then perhaps it should
always be written as y(x).
You have not distinguished between bound and local variables, either.
n[1](x,y):= Totalderiv(n[0](x,y))
-diff(y(x),x)*Totalderiv(X[i]x,y)); ;;; should be n[0](x,y(x)) ???
n[k](x,,y):= Totalderiv(n[k-1](x,y))- diff(y(x),x,k)*Totalderiv(X[i]x,y));
Totalderiv(z):=diff(z,x)+diff(y(x),x)*diff(z,y); ;;; totally ambiguous
if z contains y, is y the same regardless?
Please look at examples of using Maxima.
N.A.Beishuizen at ctw.utwente.nl wrote:
> 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)
> )$
>
>
Here you use both y(x) and y. How are they related?
> 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)
> )$
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>