Docfile commited on
Commit
0da0908
·
verified ·
1 Parent(s): 3fd48fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +34 -2
app.py CHANGED
@@ -6,8 +6,40 @@ def generate_data(subject, input_field, difficulty):
6
  print("Input:", input_field)
7
  print("Difficulté:", difficulty)
8
 
9
- q = """When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
10
- $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$"""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  return q
12
 
13
  # Créer l'interface utilisateur Gradio
 
6
  print("Input:", input_field)
7
  print("Difficulté:", difficulty)
8
 
9
+ q = """ **a)**
10
+ Soit \(O\) l'origine du repère et \(x\) la coordonnée du centre du cube sur l'axe \(Ox\).
11
+ Au point de départ, l'énergie potentielle est :
12
+ $$E_{p_1}=mgl(h_1+L\sin\alpha)$$
13
+ Au point d'arrivée, l'énergie potentielle est nulle.
14
+ Le travail de la force de frottement est :
15
+ $$W_f=-\mu_c Nl\cos\alpha$$
16
+ Le théorème de l'énergie cinétique nous donne :
17
+ $$E_{p_1}+W_f=E_{c_2}$$
18
+ D'où :
19
+ $$\begin{split}mgl(h_1+L\sin\alpha)-\mu_c Nl\cos\alpha &= \frac{1}{2}mv^2 \\\ \iff v &= \sqrt{2gl(h_1+L\sin\alpha)-2\mu_c Nl\cos\alpha} \end{split}$$
20
+ Avec \(N=mg\cos\alpha\), on obtient :
21
+ $$\begin{split}v &= \sqrt{2gl(h_1+L\sin\alpha)-2\mu_c mgl\cos^2\alpha} \\\ &= \sqrt{2gL\left(h_1+L\sin\alpha- \mu_c l\cos^2\alpha\right)} \end{split}$$
22
+ b)
23
+ Lorsque le cube est au point \(B_2\), son énergie mécanique est :
24
+ $$\begin{split}E_2 &= E_{c_2}+E_{p_2} \\\ &= \frac{1}{2}mv^2 \\\ &= mgL\left(h_1+L\sin\alpha- \mu_c l\cos^2\alpha\right) \end{split}$$
25
+ c)
26
+ Lorsque le cube s'arrête, son énergie cinétique est nulle.
27
+ Son énergie potentielle est :
28
+ $$E_{p_3}=mgl(h_2+L\sin\alpha)$$
29
+ Le théorème de l'énergie cinétique nous donne :
30
+ $$E_2=E_{p_3}$$
31
+ D'où :
32
+ $$\begin{split}mgL\left(h_1+L\sin\alpha- \mu_c l\cos^2\alpha\right) &= mgL(h_2+L\sin\alpha) \\\ \iff h_2 &= h_1-\mu_c l\cos^2\alpha \end{split}$$
33
+ d)
34
+ Lorsque le cube revient en \(B_1\), son énergie cinétique est nulle.
35
+ Son énergie potentielle est :
36
+ $$E_{p_4}=mgl(h_1+L\sin\alpha)$$
37
+ Le théorème de l'énergie cinétique nous donne :
38
+ $$E_3=E_{p_4}$$
39
+ D'où :
40
+ $$\begin{split}E_3 &= mgL\left(h_2+L\sin\alpha- \mu_c l\cos^2\alpha\right) \\\ &= mgL\left(h_1+L\sin\alpha-\mu_c l\cos^2\alpha-\mu_c l\cos^2\alpha\right) \\\ &= mgL\left(h_1+L\sin\alpha-2\mu_c l\cos^2\alpha\right) \end{split}$$ """
41
+
42
+
43
  return q
44
 
45
  # Créer l'interface utilisateur Gradio