the problem is asking to find the local maxima and minima of the function. and determine whether the function has aboslute maxima and minima.

the equation is: y=ln(x^2+1)-x, x is all real numbers

also: y=tanx-x, x=(-pie/2, pie/2)

i know the steps of graphing. but i don't know how to take out the first and second derivatives of this equation with natural log.

can anyone help me with this problem and explain how to solve this differentiate this type of problem with natural log?