Get the derivative of the variable, create it if it doesn't exist.

def der(self, x: Sym):
        """Get the derivative of the variable, create it if it doesn't exist."""
        name = 'der({:s})'.format(x.name())
        if name not in self.scope['dvar'].keys():
            self.scope['dvar'][name] = self.sym.sym(name, *x.shape)
            self.scope['states'].append(x.name())
        return self.scope['dvar'][name]