```python
from sympy import *

pprint("\nDistributed load:")
q, l, xi = var("q, l, xi")

N1 = -xi**3 + 2*xi**2 - xi
N2 = 2*xi**3 - 3*xi**2 + 1
N3 = -xi**3 + xi**2
N4 = -2*xi**3 + 3*xi**2

pprint("\nq₁:")
q1 = 2*q*xi
pprint(q1)
pprint("\nq₂:")
q2 = 2*q*(1 - xi)
pprint(q2)

M1 =  integrate( N1*q1*l *l, (xi, 0, S(1)/2))
M1 += integrate( N1*q2*l *l, (xi, S(1)/2, 1))

F1 =  integrate( N2*q1 *l, (xi, 0, S(1)/2))
F1 += integrate( N2*q2 *l, (xi, S(1)/2, 1))

M2 =  integrate( N3*q1*l *l, (xi, 0, S(1)/2))
M2 += integrate( N3*q2*l *l, (xi, S(1)/2, 1))

F2 =  integrate( N4*q1 *l, (xi, 0, S(1)/2))
F2 += integrate( N4*q2 *l, (xi, S(1)/2, 1))

f = Matrix([M1, F1, M2, F2])
pprint("\nNodal loads:")
pprint(f)

# Distributed load:
#
# q₁:
# 2⋅q⋅ξ
#
# q₂:
# 2⋅q⋅(-ξ + 1)
#
# Nodal loads:
# ⎡    2   ⎤
# ⎢-5⋅l ⋅q ⎥
# ⎢────────⎥
# ⎢   96   ⎥
# ⎢        ⎥
# ⎢  l⋅q   ⎥
# ⎢  ───   ⎥
# ⎢   4    ⎥
# ⎢        ⎥
# ⎢    2   ⎥
# ⎢ 5⋅l ⋅q ⎥
# ⎢ ────── ⎥
# ⎢   96   ⎥
# ⎢        ⎥
# ⎢  l⋅q   ⎥
# ⎢  ───   ⎥
# ⎣   4    ⎦

```

d8d0ad2cbcd54d8be5f8cda96362dc62f38d7838
ipynb
Jupyter Notebook
ipynb/TM_A/TM_2/distributed-load.ipynb
kassbohm/tm-snippets
5e0621ba2470116e54643b740d1b68b9f28bff12
MIT
ipynb/TM_A/TM_2/distributed-load.ipynb
kassbohm/tm-snippets
5e0621ba2470116e54643b740d1b68b9f28bff12
MIT
ipynb/TM_A/TM_2/distributed-load.ipynb
kassbohm/tm-snippets
5e0621ba2470116e54643b740d1b68b9f28bff12
MIT
Qwen/Qwen-72B
1. YES
2. YES