solve function

Solve