Synchronization and anti-synchronization of chaotic systems: A differential and algebraic approach