# Integration using tutorials raises a dummy symbol error.

+1 vote

I am trying to derive Schwarzchild Solution and I reach a statement that needs to be integrated with respect to r. But, it raises an error which states I need to specify a dummy symbol. How do I do this integration?

Here is the code

{r,t,\phi,\theta}::Coordinate;
{\mu,\nu,\rho,\sigma,\lambda,\kappa,\chi,\gamma}::Indices(values={t,r,\phi,\theta}, position=fixed);
\partial{#}::PartialDerivative;
g_{\mu\nu}::Metric.
g^{\mu\nu}::InverseMetric.
{a,b,c,d}::Symbol;
{a,b}::Depends(r);
ss:= { g_{t t} = -exp{2a},
g_{r r} = exp{2b},
g_{\theta \theta} = r**2,
g_{\phi \phi}=r**2 \sin(\theta)**2
};
complete(ss, $g^{\mu\nu}$);
ch:= \Gamma^{\mu}_{\nu\rho} = 1/2 g^{\mu\sigma} (
\partial_{\rho}{g_{\nu\sigma}}
+\partial_{\nu}{g_{\rho\sigma}}
-\partial_{\sigma}{g_{\nu\rho}} ):
evaluate(ch, ss, rhsonly=True);
rm:= R^{\rho}_{\sigma\mu\nu} = \partial_{\mu}{\Gamma^{\rho}_{\nu\sigma}}
-\partial_{\nu}{\Gamma^{\rho}_{\mu\sigma}}
+\Gamma^{\rho}_{\mu\lambda} \Gamma^{\lambda}_{\nu\sigma}
-\Gamma^{\rho}_{\nu\lambda} \Gamma^{\lambda}_{\mu\sigma};
substitute(rm, ch);
evaluate(rm, ss, rhsonly=True);
rc:= R_{\sigma\nu} = R^{\rho}_{\sigma\rho\nu};
substitute(rc, rm)
evaluate(rc, ss, rhsonly=True);
rtt:= R_{t t} \exp{2b-2a} + R_{r r}=0;
substitute(rtt,rc);
evaluate(rtt,rc,simplify=True);
sympy.integrate(_);

With that, the following will produce your answer $a=C_1 - b$:
solvers.dsolve(rtt, $a$);