---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
#   How to calculate the effective force on the mast of a racing sailbot
#       (from "Numerical Methods", Chapra & Canale, McGraw-Hill)
                            [ continuation from here ]
       
# We assume that the mast remains vertical.
# If we know that f = 298·z/(z+10/6)·exp(-2·z/10), we must convert to an equivalent
# total force (F) and calculate its effective location above the deck (d)
f = function(z) 298*(z/(z+10/6)*exp(-2*z/10))
F = integral(f,0,10); F
# 735.349
g = function(z) z*f(z); M = integral(g,0,10)    # moment
# 3199.675
d = M/F; d
# 4.351233  (m)
# T: tension in the cable
# H and V; unknown reactions on the mast transmitted by the deck
theta = atan(1/10)
V = F*d; V  (kg)
# 3199.675
T = F*d/cos(theta); T
# 3215.633  (kg)  3220 kg
H = F-T*sin(theta); H
# 415.3815  (kg)  415 kg