-->
Méthode d'Euler
Xmin = -1
Xmax = 2
Ymin = -1
Ymax = 3
GradX = 0.1
GradY = 0.1
traceG()
traceX()
traceY()
T = [ [[0,1],[1,1]],
[[0.1,1.1],[1,1.1]],
[[0.2,1.21],[1,1.21]],
[[0.3,1.331],[1,1.331]],
[[0.4,1.4641],[1,1.4641]],
[[0.5,1.6105],[1,1.6105]],
[[0.6,1.7716],[1,1.7716]],
[[0.7,1.9487],[1,1.9487]],
[[0.8,2.1436],[1,2.1436]],
[[0.9,2.3580],[1,2.3580]],
[[1,2.5938],[1,2.5938]] ]
coef=[ ["","+1"],["1,1","+0,99"],["1,21","+0,968"],["1,331","+0,9317"],["1,4641","+0,8785"],
["1,6105","+0,8053"],["1,7716","+0,7086"],["1,9487","+0,5846"],["2,1436","+0,4287"],["2,3580","+0,2358"],["2,5938",""]
]
curseur("k",0,0,10,1)
for(i=0;i < {k};i++){
couleur = noir
point(T[i][0])
couleur = rouge
point(T[i+1][0])
}
couleur = rouge
point( T[{k}][0] )
couleur = bleu
droiteParam( T[{k}][0], T[{k}][1] )
texte("k = "+{k},[-0.8,2])
texte("y = "+coef[{k}][0]+"x"+coef[{k}][1],[-0.8,1.8])
trait = 2
couleur = noir
segment([1,0.05],[1,-0.05])
segment([0.05,1],[-0.05,1])
segment([0.05,2],[-0.05,2])
texte("1",[0.98,-0.15])
texte("1",[-0.15,0.95])
texte("2",[-0.15,1.95])
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
x = 0
y = 1
for(i = 0; i < 1/p; i++){
x = x+p
y = y*(1+p)
}
afficher(y)