calcul du nombre derive d"úne fonction du troisieme degre dont on donne les coefficients (sauf d qui est inutile)
1
VARIABLES
2
compteur EST_DU_TYPE NOMBRE
3
i EST_DU_TYPE NOMBRE
4
d EST_DU_TYPE NOMBRE
5
pas EST_DU_TYPE NOMBRE
6
ecart EST_DU_TYPE NOMBRE
7
nombre_derive EST_DU_TYPE NOMBRE
8
a EST_DU_TYPE NOMBRE
9
b EST_DU_TYPE NOMBRE
10
c EST_DU_TYPE NOMBRE
11
x1 EST_DU_TYPE NOMBRE
12
DEBUT_ALGORITHME
13
AFFICHER "a b et c sont les coefficients d'une fonction du troisieme degre"
14
LIRE a
15
LIRE b
16
LIRE c
17
AFFICHER "x1 est la valeur oú l'on calcule le nombre derive"
18
LIRE x1
19
i PREND_LA_VALEUR 1
20
pas PREND_LA_VALEUR 1/i
21
ecart PREND_LA_VALEUR F1(x1+pas)-F1(x1)
22
TANT_QUE (ecart>0.00001) FAIRE
23
DEBUT_TANT_QUE
24
i PREND_LA_VALEUR i+1
25
pas PREND_LA_VALEUR pow(1/i,2)
26
ecart PREND_LA_VALEUR F1(x1+pas)-F1(x1)
27
d PREND_LA_VALEUR ecart/pas
28
FIN_TANT_QUE
29
AFFICHER "En "
30
AFFICHER x1
31
AFFICHER " le nombre derive de "
32
AFFICHER a
33
AFFICHER "x^3+"
34
AFFICHER b
35
AFFICHER "x^2+"
36
AFFICHER c
37
AFFICHER "x+d est environ :"
38
AFFICHER d
39
40
FIN_ALGORITHME
41
42 Fonction numérique utilisée :
43 F1(x)=a*pow(x,3)+b*pow(x,2)+c*pow(x,1)