- #1

- 6

- 0

## Homework Statement

We have a mas m attached to a vertical spring of length (l+x) where l is the natural length.

## Homework Equations

Find the Lagrangian and the hamiltonian of the system if it moves like a pendulum

## The Attempt at a Solution

we know that the lagrangian of a system is defined as:

L=T-V

T=mv

^{2}/2

V=mgy-[kr

^{2}/2]

where

x

_{1}=(l+x)sinθ

y

_{1}=(l+x)cosθ

would you chose your variables the same way?