Thanks. I forgot about that.
I think I know what happened. It must have again considered d as constant rather than an infinitesimal.There seems to be a simpler solution using the second fundamental theorem of calculus and that would yield
which is the answer given by you.