Buscar

Lista 05 Questão 06

Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original

# -*- coding: utf-8 -*-
"""
Created on Mon Oct 09 03:25:22 2017
@author: Vinícius
"""
from raiz import mnr
def f(x):
 return -2 + 6*x - 4*x**2 + 0.5*x**3
 
def df(x):
 return 6 - 8*x + 1.5*x**2
 
x = mnr(f, df, 4.43, 1E-5)
print x
"""
chute inicial 4.5 -> x = 6.15632517466
chute inicial 4.43 -> x = 0.474572439156
"""

Teste o Premium para desbloquear

Aproveite todos os benefícios por 3 dias sem pagar! 😉
Já tem cadastro?

Continue navegando