#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 16 10:43:26 2025

@author: fabrice
"""

import matplotlib.pyplot as plt
import numpy as np
m=0.05
g=9.8
a=0.1
om0=np.sqrt(g/a)
Om=5*om0/3
alpha=(om0/Om)**2

def Ep(x):
    return 0.5*m*Om**2*a**2*(x**2-2*alpha*x)
    
x=np.linspace(0,1,1000)

plt.figure()
plt.plot(x,Ep(x))
plt.title('Énergie potentiel en fonction de $\zeta$')
plt.grid()
plt.xlabel('$\zeta$')
plt.ylabel('E_p en J')
plt.show()