Update app.py
Browse files5 unmodified lines6789101112135 unmodified linesprint("Input:", input_field)print("Difficulté:", difficulty)q = """When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$"""return q# Créer l'interface utilisateur Gradio5 unmodified lines67891011121314151617181920212223242526272829303132333435363738394041424344455 unmodified linesprint("Input:", input_field)print("Difficulté:", difficulty)q = """ **a)**Soit \(O\) l'origine du repère et \(x\) la coordonnée du centre du cube sur l'axe \(Ox\).Au point de départ, l'énergie potentielle est :$$E_{p_1}=mgl(h_1+L\sin\alpha)$$Au point d'arrivée, l'énergie potentielle est nulle.Le travail de la force de frottement est :$$W_f=-\mu_c Nl\cos\alpha$$Le théorème de l'énergie cinétique nous donne :$$E_{p_1}+W_f=E_{c_2}$$D'où :$$\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}$$Avec \(N=mg\cos\alpha\), on obtient :$$\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}$$b)Lorsque le cube est au point \(B_2\), son énergie mécanique est :$$\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}$$c)Lorsque le cube s'arrête, son énergie cinétique est nulle.Son énergie potentielle est :$$E_{p_3}=mgl(h_2+L\sin\alpha)$$Le théorème de l'énergie cinétique nous donne :$$E_2=E_{p_3}$$D'où :$$\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}$$d)Lorsque le cube revient en \(B_1\), son énergie cinétique est nulle.Son énergie potentielle est :$$E_{p_4}=mgl(h_1+L\sin\alpha)$$Le théorème de l'énergie cinétique nous donne :$$E_3=E_{p_4}$$D'où :$$\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}$$ """return q# Créer l'interface utilisateur Gradio
app.py+34-2