Add equation solve function