```python
# https://colab.research.google.com/github/kassbohm/wb-snippets/blob/master/ipynb/TEM_11/Selbst/2.6.ipynb

from sympy import *

EI, q1, q2, l = var("EI, q1, q2, l")
C1, C2 = var("C1, C2")
x, xi = var("x, xi")

pprint("\nA:")
A = q1/2*l + (q2 - q1)/6*l
pprint(A)

qx = (q2 - q1)*x/l + q1
Rx = (qx - q1)*x/2
R1 = q1*x

Mx = -R1*x/2 - Rx*x/3 + x*A
tmp = Mx
tmp = apart(tmp,x)


pprint("\nM(x):")
# - EI w'' = M(x):
Mx = -R1*x/2 - Rx*x/3 + x*A
tmp = apart(Mx,x)
pprint(tmp)

# - EI w':
tmp = integrate(tmp,x) + C1
# - EI w:
tmp = integrate(tmp,x) + C2


pprint("\n\n- EI w / l⁴:")
w = - tmp/EI
tmp = - EI*w/l**4
tmp = tmp.expand()
tmp = tmp.subs(x, xi*l)
pprint(tmp)
pprint("\nwith  ξ = x/l.")


# eq1: w(x=0)=0
eq1 = Eq( w.subs(x,0), 0)
# eq2: w(x=l)=0
eq2 = Eq( w.subs(x,l), 0)

sol = solve([eq1, eq2],[C1, C2])

C1s = sol[C1]
C2s = sol[C2]

pprint("\nC1:")
pprint(C1s)

pprint("\nC2:")
pprint(C2s)

w = w.subs({C1: C1s, C2: C2s})

pprint("\n\n360 EI w / l⁴:")
w = w * 360 * EI / l**4
w = w.subs(x, xi*l)
w = w.expand()
pprint(collect(w,xi))

# A:
# l⋅q₁     ⎛  q₁   q₂⎞
# ──── + l⋅⎜- ── + ──⎟
#  2       ⎝  6    6 ⎠
#
# M(x):
#       2                      3
#   q₁⋅x      ⎛l⋅q₁   l⋅q₂⎞   x ⋅(q₁ - q₂)
# - ───── + x⋅⎜──── + ────⎟ + ────────────
#     2       ⎝ 3      6  ⎠       6⋅l
#
#
# - EI w / l⁴:
#                 5       4       3       5       3
# C₁⋅ξ   C₂   q₁⋅ξ    q₁⋅ξ    q₁⋅ξ    q₂⋅ξ    q₂⋅ξ
# ──── + ── + ───── - ───── + ───── - ───── + ─────
#   3     4    120      24      18     120      36
#  l     l
#
# with  ξ = x/l.
#
# C1:
#   3
# -l ⋅(8⋅q₁ + 7⋅q₂)
# ──────────────────
#        360
#
# C2:
# 0
#
#
# 360 EI w / l⁴:
#        4    5                   3
# 15⋅q₁⋅ξ  + ξ ⋅(-3⋅q₁ + 3⋅q₂) + ξ ⋅(-20⋅q₁ - 10⋅q₂) + ξ⋅(8⋅q₁ + 7⋅q₂)

```

78cb14c7d823bea2ce6d6249feac1e3a72650f76
ipynb
Jupyter Notebook
ipynb/TEM_11/Selbst/2.6.ipynb
kassbohm/wb-snippets
f1ac5194e9f60a9260d096ba5ed1ce40b844a3fe
MIT
ipynb/TEM_11/Selbst/2.6.ipynb
kassbohm/wb-snippets
f1ac5194e9f60a9260d096ba5ed1ce40b844a3fe
MIT
ipynb/TEM_11/Selbst/2.6.ipynb
kassbohm/wb-snippets
f1ac5194e9f60a9260d096ba5ed1ce40b844a3fe
MIT
Qwen/Qwen-72B
1. YES
2. YES