file D:\_j_knuba_2026\jMAXIMA\jh_Job_ex07_v2.wxmx
Rectangle B:1, triangle,trapetion (Broken Line)
Figure 1:
Diagram
(%i1) kill(all);

\[\]\[\tag{%o0} \ensuremath{\mathrm{done}}\]

(%i4) long_x:4; label_left:2.5; label_vert:1.5; label_URL:0.2;

\[\]\[\tag{%o1} 4\]

\[\]\[\tag{%o2} 2.5\]

\[\]\[\tag{%o3} 1.5\]

\[\]\[\tag{%o4} 0.2\]

(%i14) ro:1000;g:9.81;x0:0;y0:0;x1:3;y1:2;x2:3;y2:3;B:1;h1:2;

\[\]\[\tag{%o5} 1000\]

\[\]\[\tag{%o6} 9.81\]

\[\]\[\tag{%o7} 0\]

\[\]\[\tag{%o8} 0\]

\[\]\[\tag{%o9} 3\]

\[\]\[\tag{%o10} 2\]

\[\]\[\tag{%o11} 3\]

\[\]\[\tag{%o12} 3\]

\[\]\[\tag{%o13} 1\]

\[\]\[\tag{%o14} 2\]

(%i16) Hall:y2+h1;H:y2y0;

\[\]\[\tag{%o15} 5\]

\[\]\[\tag{%o16} 3\]

P_x

(%i19) h_C:(HallH/2);w:H·B;I:(B·H··3)/12;

\[\]\[\tag{%o17} \frac{7}{2}\]

\[\]\[\tag{%o18} 3\]

\[\]\[\tag{%o19} \frac{9}{4}\]

(%i20) P_x:ro·g·h_C·B;

\[\]\[\tag{%o20} 34335.0\]

(%i22) h_D:h_C+(I)/(h_C·w),numer;h_D_:Hallh_D;

\[\]\[\tag{%o21} 3.7142857142857144\]

\[\]\[\tag{%o22} 1.2857142857142856\]

P_z

(%i23) W1:(((x1x0)·(y1y0))/2)·B,numer;

\[\]\[\tag{%o23} 3\]

(%i24) W2:((((x1x0)+(x2x1))/2)·(y2y1))·B,numer;

\[\]\[\tag{%o24} 1.5\]

(%i26) W:W1+W2;P_z:W·ro·g;

\[\]\[\tag{%o25} 4.5\]

\[\]\[\tag{%o26} 44145.0\]

(%i28) P_z1:W1·ro·g; P_z2:W2·ro·g;

\[\]\[\tag{%o27} 29430.0\]

\[\]\[\tag{%o28} 14715.0\]

(%i30) mP_z1:W1·ro·g·(1/3·(x1x0)); mP_z2:W2·ro·g·(1/2·(x1x0));

\[\]\[\tag{%o29} 29430.0\]

\[\]\[\tag{%o30} 22072.5\]

(%i31) if x0 = x1 and x1 =x2 then x_D=0 else x_D:(mP_z1+mP_z2)/(P_z);

\[\]\[\tag{%o31} 1.1666666666666667\]

(%i32) P:sqrt(P_z··2+P_x··2);

\[\]\[\tag{%o32} 55925.60460111272\]

Phi
(%i34) phi:atan(P_z/P_x);fi_gr:(180/%pi)·phi,numer;

\[\]\[\tag{%o33} 0.9097531579442097\]

\[\]\[\tag{%o34} 52.1250163489018\]

size plot2d - x1
(%i35) x1_:x1x0+long_x;

\[\]\[\tag{%o35} 7\]

scale
(%i37) scale_L:P_x;scale_P_x:P_x/scale_L;

\[\]\[\tag{%o36} 34335.0\]

\[\]\[\tag{%o37} 1.0\]

(%i38) scale_P_z:P_z/scale_L;

\[\]\[\tag{%o38} 1.2857142857142858\]

(%i39) scale_P:P/scale_L;

\[\]\[\tag{%o39} 1.6288220358559113\]

Draw
(%i51) h1;Hall;H;x1;h_D_;x_D;scale_P;scale_P_z;scale_P_x;P;P_x;P_z;

\[\]\[\tag{%o40} 2\]

\[\]\[\tag{%o41} 5\]

\[\]\[\tag{%o42} 3\]

\[\]\[\tag{%o43} 3\]

\[\]\[\tag{%o44} 1.2857142857142856\]

\[\]\[\tag{%o45} 1.1666666666666667\]

\[\]\[\tag{%o46} 1.6288220358559113\]

\[\]\[\tag{%o47} 1.2857142857142858\]

\[\]\[\tag{%o48} 1.0\]

\[\]\[\tag{%o49} 55925.60460111272\]

\[\]\[\tag{%o50} 34335.0\]

\[\]\[\tag{%o51} 44145.0\]

--> /* Definition of a block with local variables  */;
(%i52) ds(r) := block([x, n],
   n:100,
x:r·n,
   x:floor(x),
   x:x/100,
return(x)
)$
(%i58) Pi_x:ds(P_x),numer; Pi_z:ds(P_z),numer; Pi:ds(P),numer; fi_gr:ds(fi_gr),numer; hi_D_:ds(h_D_),numer;xi_D:ds(x_D),numer;

\[\]\[\tag{%o53} 34335\]

\[\]\[\tag{%o54} 44145\]

\[\]\[\tag{%o55} 55925.6\]

\[\]\[\tag{%o56} 52.12\]

\[\]\[\tag{%o57} 1.28\]

\[\]\[\tag{%o58} 1.16\]

inclined flat surface
(%i63) x0;x1;y0;y1;h1;

\[\]\[\tag{%o59} 0\]

\[\]\[\tag{%o60} 3\]

\[\]\[\tag{%o61} 0\]

\[\]\[\tag{%o62} 2\]

\[\]\[\tag{%o63} 2\]

(%i64) fyL1(y1,x1,x):=(y1/x1)·x;

\[\]\[\tag{%o64} \mathop{fyL1}\left( \ensuremath{\mathrm{y1}}\mathop{,}\ensuremath{\mathrm{x1}}\mathop{,}x\right) \mathop{:=}\frac{\ensuremath{\mathrm{y1}}}{\ensuremath{\mathrm{x1}}} x\]

(%i65) plot2d(fyL1(y1,x1,x),[x,0,x1]);

\[\]\[\tag{%o65} false\]

(%i67) x_v:xi_D;y_v:hi_D_;

\[\]\[\tag{%o66} 1.16\]

\[\]\[\tag{%o67} 1.28\]

(%i69) x0_v:x_vscale_P_x;y0_v:y_v+scale_P_z;

\[\]\[\tag{%o68} 0.15999999999999992\]

\[\]\[\tag{%o69} 2.565714285714286\]

(%i70) (y0_vy_v)/(x_vx0_v)=(yy_v)/(x_vx);

\[\]\[\tag{%o70} 1.2857142857142858\mathop{=}\frac{y\mathop{-}1.28}{1.16\mathop{-}x}\]

(%i71) fyV(x_v,y_v,x0_v,y0_v,x):=(x_vx)·((y0_vy_v)/(x_vx0_v))+y_v;

\[\]\[\tag{%o71} \mathop{fyV}\left( \ensuremath{\mathrm{x\_ v}}\mathop{,}\ensuremath{\mathrm{y\_ v}}\mathop{,}\ensuremath{\mathrm{x0\_ v}}\mathop{,}\ensuremath{\mathrm{y0\_ v}}\mathop{,}x\right) \mathop{:=}\left( \ensuremath{\mathrm{x\_ v}}\mathop{-}x\right) \frac{\ensuremath{\mathrm{y0\_ v}}\mathop{-}\ensuremath{\mathrm{y\_ v}}}{\ensuremath{\mathrm{x\_ v}}\mathop{-}\ensuremath{\mathrm{x0\_ v}}}\mathop{+}\ensuremath{\mathrm{y\_ v}}\]

(%i72) fyV(x_v,y_v,x0_v,y0_v,1);

\[\]\[\tag{%o72} 1.4857142857142858\]

(%i73) plot2d(fyV(x_v,y_v,x0_v,y0_v,x),[x,0,x1]);

\[\]\[\tag{%o73} false\]

Figure 2:
Diagram
(%i74) plot2d([fyV(x_v,y_v,x0_v,y0_v,x),fyL1(y1,x1,x)],[x,0,x1]);

\[\]\[\tag{%o74} false\]

Figure 3:
Diagram
(%i75) coord_x(n,x_v,y_v,x0_v,y0_v,y1,x1):=block
([dx,xi,yiC,yiL],
   dx:x1/n,
   x_i:dx,
   for i:1 step 1 thru n do (yiL:fyV(x_v,y_v,x0_v,y0_v,x_i),yiC:fyL1(y1,x1,x_i), if yiL>yiC then (x_i:x_i+dx) else (x_i:x_i)),
       return (x_i)
);

\[\]\[\tag{%o75} \mathop{coord\_ x}\left( n\mathop{,}\ensuremath{\mathrm{x\_ v}}\mathop{,}\ensuremath{\mathrm{y\_ v}}\mathop{,}\ensuremath{\mathrm{x0\_ v}}\mathop{,}\ensuremath{\mathrm{y0\_ v}}\mathop{,}\ensuremath{\mathrm{y1}}\mathop{,}\ensuremath{\mathrm{x1}}\right) \mathop{:=}\]

(%i81) x_v;y_v;x0_v;y0_v;y1;x1;

\[\]\[\tag{%o76} 1.16\]

\[\]\[\tag{%o77} 1.28\]

\[\]\[\tag{%o78} 0.15999999999999992\]

\[\]\[\tag{%o79} 2.565714285714286\]

\[\]\[\tag{%o80} 2\]

\[\]\[\tag{%o81} 3\]

(%i83) X:coord_x(500,x_v,y_v,x0_v,y0_v,y1,x1),numer;Y:fyL1(y1,x1,X),numer;

\[\]\[\tag{%o82} 1.422000000000001\]

\[\]\[\tag{%o83} 0.9480000000000006\]

(%i85) Xi:ds(X),numer; Yi:ds(Y),numer;

\[\]\[\tag{%o84} 1.42\]

\[\]\[\tag{%o85} 0.94\]

(%i86) H2:y2+h1+3;

\[\]\[\tag{%o86} 8\]

(%i87) x_z:x_v;

\[\]\[\tag{%o87} 1.16\]

epura
(%i88) b:(2/Hall)·(Hall0.1·y2);

\[\]\[\tag{%o88} 1.8800000000000001\]

(%i90) (2/Hall)·(Hall1·y2);y2;

\[\]\[\tag{%o89} \mathop{-}\left( \frac{4}{5}\right) \]

\[\]\[\tag{%o90} 3\]

(%i91) if h1 < 2 then Hall_add:Hall+5 else Hall_add:Hall;

\[\]\[\tag{%o91} 5\]

(%i92) draw2d(
   xrange = [2,x1_], /* size picture  x - x1 & y - H1 */
yrange = [0,Hall_add],
   proportional_axes=xy,
   font      = "Arial",
           font_size = 16,
   grid = true,
   line_width=1,
   color=black,
title = "Pressure force on a cinclined flat surface",
    fill_color = light_blue,
   polygon([[x0,y0],[x1,y1],[x2,y2],[x2,Hall],[x0,Hall],[x0,y0]]), /* rectangle Body of presure */
      line_width=4,
      line_type = solid,
   points_joined = true,
   color=red,
   points([[x0,y0],[x1,y1],[x2,y2]]), /* inclined flat surface */
   line_width=1,
   color=black,
    line_type = dashes,
   points_joined = true,
    fill_color = white,
     polygon([[2,0],[0,Hall],[0,y0],[2,0]]), /* rectangle epura of presure P_x */
    fill_color = gray90,
    line_type = solid,
     polygon([[2,0],[(2/Hall)·(Hall1·y2),y2],[0,y2],[0,0],[2,0]]), /* rectangle epura of presure P_x */
   /* Epura  */
   color = "blue",
   line_width=1,
   line_type = solid,
   head_angle = 10,
   head_length = 0.15,
   vector([(2/Hall)·(Hall0.1·y2),0.1·y2],[(2/Hall)·(Hall0.1·y2),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.2·y2),0.2·y2],[(2/Hall)·(Hall0.2·y2),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.3·y2),0.3·y2],[(2/Hall)·(Hall0.3·y2),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.4·y2),0.4·y2],[(2/Hall)·(Hall0.4·y2),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.5·y2),0.5·y2],[(2/Hall)·(Hall0.5·y2),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.6·y2),0.6·y2],[(2/Hall)·(Hall0.6·y2),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.7·y2),0.7·y2],[(2/Hall)·(Hall0.7·y2),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.8·y2),0.8·y2],[(2/Hall)·(Hall0.8·y2),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.9·y2),0.9·y2],[(2/Hall)·(Hall0.9·y2),0]), /* horizontal presure vector p  */  
    color=black,
   fill_color = red,
filled_func = true,
/*  explicit(fy(x),x,0,R),  1/4 circle  */
   fill_color = light_blue,
   line_width=1,
   head_angle = 180,
vector([0,y1],[x1,0]), /* horizontal line between W1 &W2  */
   color = navy,
label(["W1",x1·0.7,y10.2]),
   label(["W2",x1·0.7,H0.2]),
   label_orientation = vertical,
color = "#654321",
label(["Body presure",x1/2,H1]),
   color = "black",
fill_color = light_blue,
   line_width=2,
   head_angle = 15,
   head_length = 0.25,
   color=black,point_type = filled_circle,
  point_size = 1.5,
  points_joined = false,
  points([[x_z,y2]]), /* point P_z */
   points([[X,Y]]), /* point P */
   points([[0,h_D_]]), /* point P_x */
   label_orientation = horizontal,
label(["P_x",x00.5,h_D_+0.3]),
   label_orientation = vertical,
   label(["P_z",x_z0.4,y2+0.9]),
   line_width=1,
   line_type = dashes,
   head_angle = 180,
   vector([1,h_D_],[3·y1,0]), /* horizontal line dot to vector P_x  */
   vector([x_z,y2],[0,y2]), /* vertical line dot to vector P_z  */
   vector([X,Y],[1.5·x1,1.5·scale_P_z·x1]), /* direct angle line dot to vector P  */
   color = "blue",
   line_width=3,
   line_type = solid,
   head_angle = 15,
   head_length = 0.25,
   vector([x01,h_D_],[+scale_P_x,0]), /* horizontal vector P_x  */
   vector([x_z,y2+scale_P_z],[0,scale_P_z]), /* vertical vector P_y  */
   /*  vector([x_z+scale_P_x,h_D_+scale_P_z],[-scale_P_x,-scale_P_z]),  Full vector P  */
   vector([Xscale_P_x,Y+scale_P_z],[+scale_P_x,scale_P_z]), /* Full vector P  */
   font      = "Arial",
           font_size = 16,
  color = "#0e406e",
   label_orientation = horizontal,
label(["www.k123.org.ua ", x1_long_x/2,Hall_addlabel_URL]),
  label(["Kopanytsia Y (c)  2026", x1_long_x/2,Hall_add3·label_URL]),
   label_orientation = horizontal,
/* label([string(P_X), x1-0.8, R/2]) */
   label_alignment = left,
color = black,
label([concat("Y=: ", string(Yi)," m"), x1_label_left, y1·1.6]),
    label([concat("X=: ", string(Xi)," m"), x1_label_left, y1·1.4]),
   label([concat("h_D=: ", string(hi_D_)," m"), x1_label_left, y1·1.2]),
   label([concat("x_z=: ", string(x_z)," m"), x1_label_left, y1]),
   label([concat("P_x=: ", string(Pi_x)," N"), x1_label_left, y1·0.8]),
   label([concat("P_z=: ", string(Pi_z)," N"), x1_label_left, y1·0.6]),
   label([concat("P=: ", string(Pi)," N"), x1_label_left, y1·0.4]),
   label([concat("phi=: ", string(fi_gr)," grad"), x1_label_left, y1·0.2]),
   label([concat("(", string(Xi)," ,", string(Yi)," )"), X+0.1, Y0.1]),
   line_type = solid,
  color=black,line_width=1,
  head_both = true,
  head_length = 0.2,
  head_angle = 10,
   vector([x1+scale_P_x,0],[0,h_D_]), /* h_D_ */
   vector([0,y1+0.3],[x_z,0]), /* x_z */
   label_alignment = center,
   label_orientation = vertical,
   font_size = 10,
label([concat("h_d=: ", string(hi_D_)," m"), x1+0.8, h_D_/2]),
   label_orientation = horizontal,
   label([concat("x_z=: ", string(x_z)," m"), x_z/2,y1+0.5])
);

\[\]\[\tag{%o92} \]

Figure 4:
Diagram

Created with wxMaxima.

The source of this Maxima session can be downloaded here.