An elimination theory for differential algebra