When I take the log of a function, why am I getting different results depending on whether I first factor or not?

140 Views Asked by At

If I take the log of the function t*exp(-t) + exp(-t) I get two different answers depending on whether I first factor or not. I know this is not possible so I'm trying to find out what I'm doing wrong.

1st, no factoring: =log(t) + log(exp(-t)) + log(exp(-t)) = log(t) - t - t

2nd, factor first: =exp(-t)(t + 1) ...then take log =log(exp(-t)) + log(t+1) = -t + log(t+1)

I'd appreciate any insight into where I'm going wrong here.

1

There are 1 best solutions below

0
On

Your 1st assumes that the log of a sum is the sum of the logs. That is not correct. Your second assumes that the log of a product is the sum of the logs. That is correct, so $$ \log(t*\exp(-t) + \exp(-t))=\log(\exp(-t)(t + 1))\\=\log(\exp(-t)) + \log(t+1)\\ = -t + \log(t+1)$$