<jupyter_start><jupyter_text>Búsqueda de raíces en Python<jupyter_code>import numpy as np
from scipy.optimize import bisect, newton, fsolve
import matplotlib.pyplot as plt
%matplotlib notebook
def f(x):
    return x**2 + 10*np.sin(x)
x = np.linspace(-8, 8, 1000)
y = f(x)
plt.plot(x, y)
plt.ylim(-10, 50)
fsolve(f, 1)
fsolve(f, -3)
newton(f, 1)
newton(f, 3)
bisect(f, -1, 2)
bisect(f, -4, -1)
fsolve(f, range(-5, 5))<jupyter_output>/home/nguarinz/anaconda3/lib/python3.6/site-packages/scipy/optimize/minpack.py:163: RuntimeWarning: The iteration is not making good progress, as measured by the 
  improvement from the last ten iterations.
  warnings.warn(msg, RuntimeWarning)
{'fraction_non_alphanumeric': 0.13925925925925925, 'fraction_numerical': 0.04296296296296296, 'mean_word_length': 5.09009009009009, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '574924', 'license': 'MIT', 'n_tokens_mistral': 300, 'n_tokens_neox': 283, 'n_words': 72, 'path': 'codigo/metodos_numericos/raices/busqueda_raices.ipynb', 'repo_name': 'AppliedMechanics-EAFIT/Mod_Temporal', 'size': '675'}