Taylor series

JesperHP

TS Contributor
#1
This is probably really easy to see..... but I just can not get it right:

// Set y = exp(x). Then x - log(1 + exp(x)) = log(y) - log(y + 1).
// Expand in Taylor series around y.
// log(y) - log(y+1) = - 1/y - 1/y^2 + O(1/y^3).

I do not see how to arrive at the taylor series expansion. Could anyone help with a hint or a complete solution?