you are correct in your last formula.

so doing it directly, you would obtain,

but you could also realize that

and find the derivative of that by the product rule

the slope is not what you saySecond, for the question y=lnx at the point where x=e/2, find the equation of the tangent at that point. Isn't the derivative and slope here 1/2e? The equation given as the answer is y = (2/e)x

the derivative is 1/x, if you plug in x = e/2, you get the slope being 2/e