#### D.15.4.36 derivationAdd

Procedure from library `difform.lib` (see difform_lib).

Usage:
  phi+psi; phi,psi derivation

Return:
  the sum of the given derivations

Remark:
  The sum is computed componentwise - this works since the structure lists of derivations are sorted the same way.

Note:
  once can also add polynomials and derivations

Example:

    LIB "difform.lib";
    ring R = 0,(x,y,z),ds;
    diffAlgebra();
    ==> // The differential algebra Omega_R was constructed and the differential \
       forms dDx, dDy, dDz, dx, dy, dz are available.
    list L_1; L_1[1] = list(dx,dy,dz); L_1[2] = list(2x,2y,2z);
    list L_2; L_2[1] = list(dx,dy,dz); L_2[2] = list(y2-x,z4+x+y,y2);
    /////////////////
    // Derivations //
    /////////////////
    derivation phi_1 = L_1; phi_1;
    ==>  Omega_R^1 --> R
    ==>        dx |--> 2x
    ==>        dy |--> 2y
    ==>        dz |--> 2z
    ==>
    ==>
    derivation phi_2 = L_2; phi_2;
    ==>  Omega_R^1 --> R
    ==>        dx |--> -x+y2
    ==>        dy |--> x+y+z4
    ==>        dz |--> y2
    ==>
    ==>
    ////////////////////////
    // Sum of derivations //
    ////////////////////////
    phi_1 + phi_2;
    ==>  Omega_R^1 --> R
    ==>        dx |--> x+y2
    ==>        dy |--> x+3y+z4
    ==>        dz |--> 2z+y2
    ==>
    ==>
    phi_1 + phi_2 + phi_2;
    ==>  Omega_R^1 --> R
    ==>        dx |--> 2y2
    ==>        dy |--> 2x+4y+2z4
    ==>        dz |--> 2z+2y2
    ==>
    ==>
    phi_1 + phi_2 + 3x2;
    ==>  Omega_R^1 --> R
    ==>        dx |--> x+3x2+y2
    ==>        dy |--> x+3y+3x2+z4
    ==>        dz |--> 2z+3x2+y2
    ==>
    ==>
    kill Omega_R,dx,dy,dz,L_1,L_2,phi_1,phi_2;

See also: derivationSub.

User manual for Singular version 4.4.1, 2025, generated by texi2html.