I got the equation $ \ln(x^2+2x+\frac{1}{2}) = x $ and I need to find the derivative of the function that created by comparing the equation to 0.
First try I did:
$\ln(x^2+2x+\frac{1}{2}) = x \Rightarrow \ln(x^2+2x+\frac{1}{2}) - x = 0 \Rightarrow f(x) = \ln(x^2+2x+\frac{1}{2}) - x \Rightarrow f'(x) = \frac{2x+2}{x^2+2x+\frac{1}{2}} -1 $
Second try I did:
$ \ln(x^2+2x+\frac{1}{2}) = x => e^x=x^2+2x+\frac{1}{2} => f(x)=x^2+2x+\frac{1}{2}-e^x => f'(x)=2x+2-e^x $
So my question is where is my mistake? Which one of the derivatives isn't correct? and why?