par sos-math(21) » sam. 23 janv. 2021 20:09
Bonjour,
la méthode de Newton-Raphson s'applique pour la recherche des solutions de l'équation \( f(x)=0\).
Donc si tu veux l'utiliser pour la recherche du point fixe de ta fonction, il faut appeler ta fonction Newton-Raphson en prenant comme paramètre \(g(x)=f(x)-x\) afin que son "zéro" soit un point fixe pour \(f\).
Donc ton dernier appel sera :
Code : Tout sélectionner
print(rug,newtonRaphson(lambda x: -2*math.log10((1/3.7)*rug+2.51/(20000/x))-x,10000,1/1000,maxiter=100))
Cela doit marcher.
Bonne continuation
Bonjour,
la méthode de Newton-Raphson s'applique pour la recherche des solutions de l'équation \( f(x)=0\).
Donc si tu veux l'utiliser pour la recherche du point fixe de ta fonction, il faut appeler ta fonction Newton-Raphson en prenant comme paramètre \(g(x)=f(x)-x\) afin que son "zéro" soit un point fixe pour \(f\).
Donc ton dernier appel sera :
[code]print(rug,newtonRaphson(lambda x: -2*math.log10((1/3.7)*rug+2.51/(20000/x))-x,10000,1/1000,maxiter=100))[/code]
Cela doit marcher.
Bonne continuation