Einstein field equations are notoriously challenging to solve due to their
complex mathematical form, with few analytical solutions available in the
absence of highly symmetric systems or ideal matter distribution. However,
accurate solutions are crucial, particularly in systems with strong
gravitational field such as black holes or neutron stars. In this work, we use
neural networks and auto differentiation to solve the Einstein field equations
numerically inspired by the idea of physics-informed neural networks (PINNs).
By utilizing these techniques, we successfully obtain the Schwarzschild metric
and the charged Schwarzschild metric given the energy-momentum tensor of
matter. This innovative method could open up a different way for solving
space-time coupled Einstein field equations and become an integral part of
numerical relativity.Comment: 18 pages, 4 figure