-->
Méthode d'Euler
Xmin = -0.3
Xmax = 1.3
Ymin = -0.3
Ymax = 4.2
AxeX = true
AxeY = true
Grille = true
GradX = 0.1
GradY = 0.1
pas = 0.005
A = [0,1]
T = [A]
txt = ""
var timer = setInterval(function (){trace()},50)
function trace(){
trait = 1
couleur = noir
effaceEcran()
traceG()
traceX()
traceY()
trait = 2
couleur = noir
segment([1,0.05],[1,-0.05])
segment([0.02,1],[-0.02,1])
segment([0.02,2],[-0.02,2])
segment([0.02,3],[-0.02,3])
texte("1",[0.98,-0.25])
texte("1",[-0.09,0.95])
texte("2",[-0.09,1.95])
texte("3",[-0.09,2.95])
trait = 1
couleur = rouge
point(A)
couleur = noir
A = traceTangente(A)
T.push(A)
for(var i=0;i < T.length; i++){
trait = 0.5
point(T[i])
}
if( Math.round(1000*A[0])/1000 == 1 ){
txt = A[1];
A = [0,1]
T = [A]
}
texte(txt,[0.4,0.5])
}
function traceTangente(X){
trait = 1
couleur = bleu
droiteParam(X,[1,X[1]])
couleur = noir
return [X[0]+pas,X[1]*(1+pas)]
}
p = 0.0001
B = [0,1]
for(i = 0; i < 1/p; i++){
B[1] = B[1]*(1+p)
B[0] = B[0]+p
}
afficher(B[1])