
import numpy as np



def 		UpperCamelCase     (       _UpperCAmelCase  :   Tuple ,			_UpperCAmelCase  :   Optional[int] ,			_UpperCAmelCase  :   List[str] ,			_UpperCAmelCase  :   Dict ,			_UpperCAmelCase  :   Optional[Any]  )   ->			int:






						'''simple docstring'''

						_lowercase       :	str           =   int(np.ceil((x_end - xa) / h  )  )
						_lowercase       :	int           =   np.zeros((n + 1,)  )
						_lowercase       :	Optional[int]           =   ya
						_lowercase       :	str           =   xa

						for k in range(_UpperCAmelCase  ):
												_lowercase       :	Any           =   f(_UpperCAmelCase ,			y[k]  )
												_lowercase       :	Tuple           =   f(x + 0.5 * h ,			y[k] + 0.5 * h * ka  )
												_lowercase       :	Any           =   f(x + 0.5 * h ,			y[k] + 0.5 * h * ka  )
												_lowercase       :	Dict           =   f(x + h ,			y[k] + h * ka  )
												_lowercase       :	Any           =   y[k] + (1 / 6) * h * (ka + 2 * ka + 2 * ka + ka)
												x += h

						return y


if __name__ == "__main__":
							import doctest

							doctest.testmod()






def 		UpperCamelCase     (       _UpperCAmelCase  :   list[int] ,			_UpperCAmelCase  :   list[int]  )   ->			tuple[float, float]:






						'''simple docstring'''

						if not len(_UpperCAmelCase  ) == len(_UpperCAmelCase  ) == 3:
												raise ValueError("Please enter a valid equation."  )
						if equationa[0] == equationa[1] == equationa[0] == equationa[1] == 0:
												raise ValueError("Both a & b of two equations can't be zero."  )

						# Extract the coefficients
						_lowercase      ,    _lowercase      ,    _lowercase       :	List[str]           =   equationa
						_lowercase      ,    _lowercase      ,    _lowercase       :	List[str]           =   equationa

						# Calculate the determinants of the matrices
						_lowercase       :	List[Any]           =   aa * ba - aa * ba
						_lowercase       :	Tuple           =   ca * ba - ca * ba
						_lowercase       :	Union[str, Any]           =   aa * ca - aa * ca

						# Check if the system of linear equations has a solution (using Cramer's rule)
						if determinant == 0:
												if determinant_x == determinant_y == 0:
																		raise ValueError("Infinite solutions. (Consistent system)"  )
												else:
																		raise ValueError("No solution. (Inconsistent system)"  )
						else:
												if determinant_x == determinant_y == 0:
																		# Trivial solution (Inconsistent system)
																		return (0.0, 0.0)
												else:
																		_lowercase       :	str           =   determinant_x / determinant
																		_lowercase       :	Union[str, Any]           =   determinant_y / determinant
																		# Non-Trivial Solution (Consistent system)
																		return (x, y)




