Lösung des Übungsblattes Nr. 8

Lagrangegleichungen erster Art

Clear[R, m, k, t, φ, y1, x, y]

g1 = x[t]^2 + (((y[t] - y1[t]))^2) - (R^2)

dgl = {
        m y1''[t] == 
          m g  -  k (y1[t] - y0) + λ1 D[g1, y1[t]] + 
            λ2 D[g2, y1[t]], 
        m x''[t] == 
          λ1 D[g1, x[t]] + λ2 D[g2, x[t]], 
        m y''[t] == 
          m g + λ1 D[g1, y[t]] + λ2 D[g2, y[t]]}

x[t] = R Sin[φ[t]]; y[t] = y1[t] + R Cos[φ[t]];

x''[t] = D[x[t], t, t]

y''[t] = D[y[t], t, t]

Solve[dgl, {y1''[t], φ''[t], λ1}] // 
      Simplify

Lagrangegleichungen zweiter Art

Clear[R, m, k, t, φ, y1]

x = R Sin[φ[t]]; y = y1[t] + R Cos[φ[t]];

T1 = (m/2) (((D[y1[t], t]))^2)

T2 = (m/2) ((((D[x, t]))^2) + (((D[y, t]))^2)) // Simplify

V1 = -m g y1[t] + (k/2) (((y1[t] - y0))^2)

V2 = -m g y

L = T1 + T2 - V1 - V2 // Simplify

dgl = {D[D[L, y1'[t]], t] == D[L, y1[t]], 
          D[D[L, φ'[t]], t] == D[L, φ[t]]} // Simplify

Solve[dgl, {y1''[t], φ''[t]}] // Simplify