#  Think c1, c2, c3, c4, c5, c6, c8 as functions of c7.
#  The procedure dc23458overdc7 compute the derivative
#
#    c2'-c3'+c4'-c5'+c8'
#
#  Input x:vector contains c1,c2,c3,c4,c5,c6,c8. 
#
#                                        Ren-Cang Li, June 1, 1996
#                                        na.rcli@na-net.ornl.gov

dc23458overdc7:=proc(x:vector, c7)
    local F7, i, j, dc, b;
    F7:=matrix(7,7): dc:=vector(7): b:=vector(7): 
    for i from 1 to 7 do
       for j from 1 to 6 do
           F7[i,j]:=subs(c[1]=x[1],c[2]=x[2],c[3]=x[3],c[4]=x[4],
                      c[5]=x[5],c[6]=x[6],c[7]=c7,c[8]=x[7],g[i][j]):
       od:
    od: 
    for i from 1 to 7 do
        F7[i,7]:=subs(c[1]=x[1],c[2]=x[2],c[3]=x[3],c[4]=x[4],
                      c[5]=x[5],c[6]=x[6],c[7]=c7,c[8]=x[7],g[i][8]):
        b[i]:=-subs(c[1]=x[1],c[2]=x[2],c[3]=x[3],c[4]=x[4],
                      c[5]=x[5],c[6]=x[6],c[7]=c7,c[8]=x[7],g[i][7]):
    od:
    dc:=linsolve(F7,b):
    dc[2]-dc[3]+dc[4]-dc[5]+dc[7];
end:
