AI math solver for complex equations