How do you sketch the graph that satisfies f'(x)=1 when x>-2, f'(x)=-1 when x<-2, f(-2)=-4?

1 Answer
Dec 14, 2016

# f(x) = { (-x+a, x < -2), (-4, x = -2), (x+b, x > -2) :}# where #a,b# are constants

Explanation:

For #x < -2# we have #f'(x)=-1 => f(x)=-x+a#, ie a straight line with gradient #-1#

For #x > -2# we have #f'(x)=1 => f(x)=x+b#, ie a straight line with gradient #1#

We want #f(-2)=-4# and we are not told anything about the gradient when #x=-2# (and in fact #f'(-2)# will be undefined) and we are not told that that the function should be continuous.

Combining the results we get:

# f(x) = { (-x+a, x < -2), (-4, x = -2), (x+b, x > -2) :}# where #a,b# are constants

If we wanted a continuous solutions then we would need:

For #x < -2 => 2+a = -4 \ \ \ \ => a=-6 #
For #x > -2 => -2+b = -4 => b=-2 #

And so:

# f(x) = { (-x-6, x < -2), (-4, x = -2), (x-2, x > -2) :}#

Which we can graph as follows:
enter image source here

But equally we could choose any values for the arbitrary constants #a# and #b#, for example we could choose #a=b=0# to get

# f(x) = { (-x, x < -2), (-4, x = -2), (x, x > -2) :}#

Which we can graph as follows:
enter image source here