first attempt at the non-linear equation