J'ai un problème pour mon exo sur Python (1ère) sur l'allure d'une courbe. Si quelqu'un pourrait juste me donner un coup de pouce ou même m'expliquer je suis dispo, merci. (15pts)

Jai Un Problème Pour Mon Exo Sur Python 1ère Sur Lallure Dune Courbe Si Quelquun Pourrait Juste Me Donner Un Coup De Pouce Ou Même Mexpliquer Je Suis Dispo Merc class=
Jai Un Problème Pour Mon Exo Sur Python 1ère Sur Lallure Dune Courbe Si Quelquun Pourrait Juste Me Donner Un Coup De Pouce Ou Même Mexpliquer Je Suis Dispo Merc class=

Sagot :

caylus

Réponse :

Bonjour,

Explications étape par étape

1)

def taux_variation(f,a,h):

return (f(a+h)-f(a))/h

def appro_derivee(f,xmin,xmax,p,h):

a=xmin

LX=[]

LY=[]

while a < xmax:

LX.append(a)

LY.append(taux_variation(f,a,h))

a=a+p

plt.plot(LX,LY,"b+")

plt.show()

import matplotlib.pyplot as plt

appro_derivee( (lambda x : x*x*x),-5,5,1,0.1 )

2)

a) p est le pas d'incrémemtation des abscisses.

b) LY contient la liste des valeurs des taux de variations de la fonction x³

c) voir image jointe

d)

y'=3x²

e) voir image 2

appro_derivee( (lambda x : x*x*x),-5,5,0.01,0.001 )

3)

a)

g(x)=x^3-7: voir image 3

appro_derivee( (lambda x : x*x*x-7),-10,10,0.1,0.01 )

b)

voir image 4

from math import sqrt

appro_derivee( (lambda x : sqrt(4*x+1)),-0.24,100,0.1,0.01 )

View image caylus
View image caylus
View image caylus
View image caylus