'''simple docstring'''




from __future__ import annotations

from collections.abc import Callable

def _lowercase	(      lowerCamelCase__							,    lowerCamelCase__							,    lowerCamelCase__							,    lowerCamelCase__ = 100							,    )					->       float:





       """simple docstring"""


       __UpperCAmelCase  :				Union[str, Any]       				=		x_start
       __UpperCAmelCase  :				Optional[int]       				=		fnc(lowerCamelCase__						)
       __UpperCAmelCase  :				List[Any]       				=		0.0
       for _ in range(lowerCamelCase__						):
              # Approximates small segments of curve as linear and solve
              # for trapezoidal area
              __UpperCAmelCase  :				List[Any]       				=		(x_end - x_start) / steps + xa
              __UpperCAmelCase  :				Optional[int]       				=		fnc(lowerCamelCase__						)
              area += abs(fxa + fxa						) * (xa - xa) / 2
              # Increment step
              __UpperCAmelCase  :				Tuple       				=		xa
              __UpperCAmelCase  :				Optional[int]       				=		fxa
       return area


if __name__ == "__main__":

   def _lowercase	(      lowerCamelCase__						)					->       Optional[Any]:





          """simple docstring"""


          return x**3 + x**2

   print("f(x) = x^3 + x^2")
   print("The area between the curve, x = -5, x = 5 and the x axis is:")
   _a   :	List[Any] 							=   10
   while i <= 100000:
      print(f"""with {i} steps: {trapezoidal_area(f, -5, 5, i)}""")
      i *= 10







'''simple docstring'''




class 		__A       :






       def __init__(      self				,     UpperCamelCase_      ):
              __UpperCAmelCase  :				Any       				=		set_counts
              __UpperCAmelCase  :				int       				=		max(UpperCamelCase_      )
              __UpperCAmelCase  :				List[str]       				=		len(UpperCamelCase_      )
              __UpperCAmelCase  :				Any       				=		[1] * num_sets
              __UpperCAmelCase  :				Any       				=		list(range(UpperCamelCase_      )      )






       def 			_snake_case						(      self				,     UpperCamelCase_				,     UpperCamelCase_      ):
              __UpperCAmelCase  :				Optional[int]       				=		self.get_parent(UpperCamelCase_      )
              __UpperCAmelCase  :				List[Any]       				=		self.get_parent(UpperCamelCase_      )

              if src_parent == dst_parent:
                     return False

              if self.ranks[dst_parent] >= self.ranks[src_parent]:
                     self.set_counts[dst_parent] += self.set_counts[src_parent]
                     __UpperCAmelCase  :				Optional[Any]       				=		0
                     __UpperCAmelCase  :				List[Any]       				=		dst_parent
                     if self.ranks[dst_parent] == self.ranks[src_parent]:
                            self.ranks[dst_parent] += 1
                     __UpperCAmelCase  :				Union[str, Any]       				=		self.set_counts[dst_parent]
              else:
                     self.set_counts[src_parent] += self.set_counts[dst_parent]
                     __UpperCAmelCase  :				Union[str, Any]       				=		0
                     __UpperCAmelCase  :				Dict       				=		src_parent
                     __UpperCAmelCase  :				Dict       				=		self.set_counts[src_parent]

              __UpperCAmelCase  :				Dict       				=		max(self.max_set				,     UpperCamelCase_      )
              return True







       def 			_snake_case						(      self				,     UpperCamelCase_      ):
              if self.parents[disj_set] == disj_set:
                     return disj_set
              __UpperCAmelCase  :				str       				=		self.get_parent(self.parents[disj_set]      )
              return self.parents[disj_set]






