How can i solve this problem

Whoops, I misread the last a1as being in the denominator and not seeing the a1 inside the log. Hopefully my answer to your subsequent question How to write x*log(1+A/(B*x))? solves your problem. And maybe you’ve now implemented that, so see my answer to your question Why is my program failed? .