


from __future__ import annotations

from collections.abc import Callable



def      _lowerCAmelCase  (							lowerCAmelCase_							:Callable[[int | float], int | float]						,  lowerCAmelCase_							:int | float						,  lowerCAmelCase_							:int | float						,  lowerCAmelCase_							:int = 100						,  )->float:
   '''simple docstring'''






   snake_case_         =   x_start
   snake_case_         =   fnc(lowerCAmelCase_							)
   snake_case_         =   0.0

   for _ in range(lowerCAmelCase_							):
      # Approximates small segments of curve as linear and solve
      # for trapezoidal area
      snake_case_         =   (x_end - x_start) / steps + xa
      snake_case_         =   fnc(lowerCAmelCase_							)
      area += abs(fxa + fxa							) * (xa - xa) / 2

      # Increment step
      snake_case_         =   xa
      snake_case_         =   fxa
   return area


if __name__ == "__main__":



   def      _lowerCAmelCase  (							lowerCAmelCase_							:Tuple							)->Any:
      '''simple docstring'''






      return x**3

   print('''f(x) = x^3''')
   print('''The area between the curve, x = -10, x = 10 and the x axis is:''')
   SCREAMING_SNAKE_CASE		:Optional[Any]											=       10
   while i <= 10_00_00:
      SCREAMING_SNAKE_CASE		:List[Any]											=       trapezoidal_area(f, -5, 5, i)
      print(F'''with {i} steps: {area}''')
      i *= 10








from .prime_check import Test

Test()




