# Ricci Tensor and Scalar Curvature calculations using Symbolic module


```python
import sympy
from sympy import cos, sin, sinh
from einsteinpy.symbolic import MetricTensor, RicciTensor, RicciScalar
from einsteinpy.symbolic.predefined import AntiDeSitter
sympy.init_printing()
```

### Defining the Anti-de Sitter spacetime Metric


```python
metric = AntiDeSitter()
metric.tensor()
```

### Calculating the Ricci Tensor(with both indices covariant)


```python
Ric = RicciTensor.from_metric(metric)
Ric.tensor()
```

### Calculating the Ricci Scalar(Scalar Curvature) from the Ricci Tensor


```python
R = RicciScalar.from_riccitensor(Ric)
R.simplify()
R.expr
```

The curavture is -12 which is in-line with the theoretical results

10d8ce85a2c7d158710aea786b39a06d79f9eb2e
ipynb
Jupyter Notebook
EinsteinPy/Ricci Tensor and Scalar Curvature symbolic calculation.ipynb
IsaacW4/Advanced-GR
0351c368321b1a2375e2d328347f79b513be4c08
Apache-2.0
EinsteinPy/Ricci Tensor and Scalar Curvature symbolic calculation.ipynb
IsaacW4/Advanced-GR
0351c368321b1a2375e2d328347f79b513be4c08
Apache-2.0
EinsteinPy/Ricci Tensor and Scalar Curvature symbolic calculation.ipynb
IsaacW4/Advanced-GR
0351c368321b1a2375e2d328347f79b513be4c08
Apache-2.0
Qwen/Qwen-72B
1. YES
2. YES