function [F, J] = potrubi9(x,b,ksi,area,L,dp,lambda,d)
ro=1.12;

A1=area(1);
A2=area(2);
A3=area(3);
A4=area(5);
A5=area(6);
A6=area(7);
A7=area(8);
Az=area(10);

ksia=ksi(1);
ksic=ksi(2);
ksid=ksi(3);
ksie=ksi(4);
ksif=ksi(5);
ksiz=ksi(6);

La=L(1);
Lb=L(2);
Lc=L(3);
Ld=L(4);
Le=L(5);
Lf=L(6);
Lz=L(7);

d1=d(1);
d1z=d(2);
d2=d(3);
d3=d(4);
d3b=d(5);
d4=d(6);
d5=d(7);
d6=d(8);
d6e=d(9);
d7=d(10);
dz=d(11);

F = [dp+x(10)^2*ro/2*(1)-(x(10)*Az/2/A1)^2*ro/2*(ksiz)-x(2)^2*ro/2*(ksia+lambda*Lb/d3b+0.57)-x(5)^2*ro/2*(1+ksic);
     dp+x(10)^2*ro/2*(1)-(x(10)*Az/2/A1)^2*ro/2*(ksiz)-x(2)^2*ro/2*(ksia+lambda*Lb/d3b+0.57)-x(6)^2*ro/2*(1+ksid);
     dp+x(10)^2*ro/2*(1)-(x(10)*Az/2/A1)^2*ro/2*(ksiz)-x(7)^2*ro/2*(ksie)-x(8)^2*ro/2*(1+ksif);
    (x(3)*A3)-(x(6)*A5);
    (x(7)*0.5*A6)-(x(8)*A7);
    (x(6)*A5)+(x(5)*A4)-(x(1)*A1);
    (x(2)*A2)-(x(3)*A3)-(x(4)*A3);
    (x(7)*A6)-(x(9)*A1);
    (x(1)*A1)-(x(2)*A2);
    (x(10)*Az)-2*(x(8)*A7)-(x(6)*A5)-(x(5)*A4)];

J=[-(ksiz/2+lambda*0/2/d1)*x(1)*ro,-(ksia+lambda*0/2/d2+lambda*Lb/d3b)*x(2)*ro,0,-(lambda*Lc/2/d3)*x(4)*ro,-(1+ksic+lambda*Lc/2/d4)*x(5)*ro,0,0,0,0,(1-lambda*Lz/dz)*x(10)*ro;
   -(ksiz/2+lambda*La/2/d1)*x(1)*ro,-(ksia+lambda*La/2/d2+lambda*Lb/d3b)*x(2)*ro,-(lambda*Ld/2/d3)*x(3)*ro,0,0,-(1+ksid+lambda*Ld/2/d5)*x(6)*ro,0,0,0,(1-lambda*Lz/dz)*x(10)*ro;
   -(ksiz/2)*x(1)*ro,0,0,0,0,0,-(ksie+lambda*Le/2/d6e+lambda*Lf/2/d6)*x(7)*ro,-(1+ksif+lambda*Lf/2/d7)*x(8)*ro,-(ksiz/2+lambda*Le/2/d1)*x(9)*ro,(1-lambda*Lz/dz)*x(10)*ro;
   0,0,A3,0,0,-A5,0,0,0,0;
   0,0,0,0,0,0,A6/2,-A7,0,0;
   -A1,0,0,0,A4,A5,0,0,0,0;
   0,A2,-A3,-A3,0,0,0,0,0,0;
   0,0,0,0,0,0,A6,0,-A1,0;
   A1,-A2,0,0,0,0,0,0,0,0;
   0,0,0,0,-A4,-A5,0,-2*A7,0,Az];

