MATLAB: Solving the following integral in MatLab

numerical integration

Can anyone please help me to solve the following integration in MatLab.
int(log2(1+x)*exp(-c*x/(a-b*x)),x,0,inf)
I tried in Matlab and Mathematica. But the following results is found int((log(x + 1)*exp(-(c*x)/(a – b*x)))/log(2), x, 0, Inf)
and Mathematica shows the following message, Integrate::idiv: Integral of E^((c x)/(-a+b x)) Log[1+x] does not converge on {0,\[Infinity]}. >>
Is there anyway to solve this?
Thanks in advance.

Best Answer

If b and c are both nonzero, then as x approaches infinity the factor exp(-c*x/(a-b*x)) approaches exp(c/b) which would be nonzero and log2(1+x) approaches infinity. It is therefore obvious that the integral does not converge at the upper limit as x approaches infinity, since the integrand approaches infinity. You should not be asking how to solve this integral. You should be looking into whatever reasoning led to the integral and reconsider that reasoning if you expected a finite answer.