How do you use the first and second derivatives to sketch y = x - ln |x|?

1 Answer
Jan 12, 2017

y(x) is monotone increasing in (-oo,0) and (1,+oo), decreasing in (0,1), reaches a local minimum for x=1 and is concave up in its whole domain.

Explanation:

We can calculate the first derivative separately for x<0 and x>0:

1) For x<0 we have:

y=x-ln(-x)

(dy)/(dx) = 1-1/x

2) For x>0 we have:

y=x-ln(x)

(dy)/(dx) = 1-1/x

Thus the derivative is the same in the two intervals (-oo,0) and (0,+oo). The second derivative is:

(d^2y)/(dy^2) = d/(dx) (1-1/x)= 1/x^2

We can therefore see that the function has only a critical point for x=1 and that

y'(x) < 0 for x in (-oo,0) uu (0,1)
y'(x) >0 for x in (1,+oo)

so this critical point is a local minimum. It has no inflection points and is concave up in its domain.

We can also note that:

lim_(x->-oo) y(x) = -oo

lim_(x->+oo) y(x) = +oo

lim_(x->0) y(x) = +oo

So y(x) starts from -oo strictly increases approaching +oo for x->0^-, then decraeses starting from +oo as x->0^+, reaches a minimum for x=1 and then starts increasing again approaching +oo for x->+oo.