--> //initializations

--> Q=400 //KN/m (load)
 Q  = 

   400.


--> b=1 //m (width)
 b  = 

   1.


--> z=5 //m (depth)
 z  = 

   5.


--> B=2 //m (width of strip footing)
 B  = 

   2.


--> //calculations

--> x=atanh(b/z)
 x  = 

   0.2027326


--> X=2*x // (angle)
 X  = 

   0.4054651


--> q=Q/2 // (load)
 q  = 

   200.


--> nz1=(q/%pi)*(X+sinm(X)) // (max stress at depth)
 nz1  = 

   50.923935


--> nz2=(q*B)/(B+z) // (max stress at depth)
 nz2  = 

   57.142857


--> Pe=((nz2-nz1)*100)/nz1 // (percentage error)
 Pe  = 

   12.212178


--> //results

--> printf('maximum stress at depth z=%f',nz1) //KN/m^2
maximum stress at depth z=50.923935
--> printf('percentage error compare 2 results by distribution method=%f',Pe) //%
percentage error compare 2 results by distribution method=12.212178
--> printf('NOTE: there is calculation mistake in book because in book only 1 digit is consider after decimal')
NOTE: there is calculation mistake in book because in book only 1 digit is consider after decimal
