#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Aug  6 16:29:12 2024

@author: sam
"""

import numpy as np
import matplotlib.pyplot as plt



def f(x):
    f = (x**2)*np.sin(1/x)
    return f



h = 1e-10

x = np.linspace(-1,1,1000)

plt.plot(x,(f(x+h)-f(x))/h)