Differentiating Piecewise Functions

In summary, there are no absolute minima or maxima, but x=0 and x=4 are within the parameters of the function.
  • #1
Sisyphus
62
0
Hello Calculus Forum,

I need some help in differentiating piecewise functions and finding local/absolute minimum/maximum values. Problem is, I don't know how. For example, ...-x , if x<0
f(x)={ 2x^3-15x^2+36x , if 0<x<4, or x=0, or x=4
... 216-x , if x>4my first inclination is to differentiate each part separately, see where the slopes change in each part, and then calculuate the min/max values using the critical points, but I am not arriving at the correct answers. =\

I can find out the critical points of the middle part pretty easily
(x= 2,x=3), but my answer key also reads that there is a local minimum point at f(0)=0
I really don't have a good idea of how f(0) could be a minimum value, unless it is because x=0 is where the first part of the fuction ends and where the second piece begins, but if I am right in that regard, why isn't x=4 also considered a critical value?

Hope my question makes sense, and so on.

...
 
Physics news on Phys.org
  • #2
Sisyphus said:
Hello Calculus Forum,

I need some help in differentiating piecewise functions and finding local/absolute minimum/maximum values. Problem is, I don't know how. For example,


...-x , if x<0
f(x)={ 2x^3-15x^2+36x , if 0<x<4, or x=0, or x=4
... 216-x , if x>4


my first inclination is to differentiate each part separately, see where the slopes change in each part, and then calculuate the min/max values using the critical points, but I am not arriving at the correct answers. =\

I can find out the critical points of the middle part pretty easily
(x= 2,x=3), but my answer key also reads that there is a local minimum point at f(0)=0
I really don't have a good idea of how f(0) could be a minimum value, unless it is because x=0 is where the first part of the fuction ends and where the second piece begins, but if I am right in that regard, why isn't x=4 also considered a critical value?

Hope my question makes sense, and so on.

...

There are no critical points "for the middle part"! Remember that a critical may be at a point where the derivative is 0, or where the derivative does not exist. You are given that
f(x)= -x , if x<0
f(x)= 2x^3-15x^2+36x , if 0<x<4, or x=0, or x=4
f(x)= 216-x , if x>4

f'(x)= -1, if x< 0
f'(x)= 6x2-30x+ 36, if 0< x< 4
f'(x)= -1, if x> 4

f'(x) does not exist at x= 0 or 4.

Obviously f' is never 0 for x not between 0 and 4. 6x2- 30x+ 6= 0 is the same as x2- 5x+ 6= (x-6)(x+1) 0 has roots
-1 and 6 which are not between 0 and 4. The only possible local max and min are at 0 and 4!

for x close to 0 but positive, f'(x) is close to 36> 0 so f is increasing to the right of x= 0. On the other hand, for x< 0, f(x)= -x> 0= f(0). Clearly, x= 0 is a local minimum.

for x close to4 but less than 4, f'(x) is close to 24- 120+ 36< 0 so f is decreasing for x< 4. For x> 4 but close to 4, f(x) is close to 212= f(4) but less. Clearly, x= 4 is a local maximum.
 
  • #3
but isn't 6x^2-30x+36=x^2-5x+6=(x-3)(x-2)

which would place its roots inside the given domain?

In addition, since in the original fuction, the domain of the middle function is "x greater than/equal to 0, less than/equal to 4", wouldn't that mean that x=0 and x=4 are within the parameters of the fuction, which would mean that f'(x) would also be defined at those points?

Thanks a lot for the reply, it's already cleared a lot of things for me. If you could just answer some of my last questions here, that'd be great.

Thanks.
 
  • #4
You should be abel to see by inspection that as [itex]x \to -\infty[/itex], [itex]f(x) \to \infty[/itex], and likewise as [itex]x \to \infty[/itex], [itex]f(x) \to -\infty[/itex], so there are no absolute minima or maxima. Sisyphus, you're right, HallsofIvy miscalculated, and on (0,4), f'(x) = 6(x-3)(x-2). So, on (0,4), f''(x) = 12x - 30. f''(2) = -6, and f''(3) = 6, so 2 is a local maximum, and 3 is a local minimum.

Just because f is defined at 0 and 4 doesn't mean f'' is defined there. You should know this. For example, the absolute value function is defined at 0, since |0| = 0, but it has no derivative at 0. So you have to "manually" check the behaviour of the function around 0 and 4.

f(0) = 0, f(4) = 32. It's easy to see that for x < 0 but close to 0, f(x) > 0. For x > 0 but close to 0, f(x) = x(2x² - 15x + 36). x is positive, and since x is small, (2x² - 15x + 36) is approximately 36, i.e. whatever it is, it is positive, so f(x) is positive. So 0 is another local minimum. For x > 4 but close to 4, it's easy to see that f(x) is close to 212 which is greater than f(4) = 32. You can also see that for x < 4 but close to 4, f'(x) is close to 6*4² - 30*4 + 36 = 12 > 0, so f is increasing as it approaches 4 from the left. So 4 is not a local minimum or maximum (because to the right, the f is clearly larger than f(4), and on the left, since f increases as it approaches 4 and f is continuous on [0,4], f must be smaller than f(4)).
 
  • #5
BTW, the tex for

...-x , if x<0
f(x)={ 2x^3-15x^2+36x , if 0<x<4, or x=0, or x=4
... 216-x , if x>4

is:

f(x)=\left\{\begin{array}{cc}-x,&\mbox{ if } x< 0\\2x^3-15x^2+36x , & \mbox{ if } 0\leq x\leq 4 \\216-x, & \mbox{ if }x>4\end{array}\right.

which looks like this:

[tex] f(x)=\left\{\begin{array}{cc}-x,&\mbox{ if }
x< 0\\2x^3-15x^2+36x , & \mbox{ if } 0\leq x\leq 4 \\216-x, & \mbox{ if }x>4\end{array}\right. [/tex]
 
  • #6
Recall that the derivative of a function, say f(x), at a point x=a is given by

[tex]f^{\prime} (a) = \lim_{x\rightarrow a} \frac{f(x)-f(a)}{x-a}[/tex]

which exists if and only if the left- and right-hand limits exist and are equal so that for the above function

[tex]f_+^{\prime} (0) = \lim_{x\rightarrow 0^+} \frac{f(x)-f(0)}{x-0} = \lim_{x\rightarrow 0^+} \frac{(2x^3-15x^2+36x) -0}{x-0}= \lim_{x\rightarrow 0^+} 2x^2-15x+36 = 36[/tex]

but

[tex]f_-^{\prime} (0) = \lim_{x\rightarrow 0^-} \frac{f(x)-f(0)}{x-0} = \lim_{x\rightarrow 0^-} \frac{(-x) -0}{x-0}= \lim_{x\rightarrow 0^-} -1=-1[/tex]

so that [tex]f^{\prime}(0)[/tex] does not exist, note that [tex]f_{-}^{\prime}(a)\mbox{ and }f_{+}^{\prime}(a)[/tex] are called the left- and right-hand derivatives of f(x) at x=a (and, if equal, are then equal to the derivative [tex]f^{\prime}(a)[/tex], similar to left- and right-hand limits).

Try calculating the left- and right-hand derivatives of f(x) at x=4.
 

1. What is a piecewise function?

A piecewise function is a mathematical function that is defined by multiple sub-functions, each of which applies to a different interval or set of values. These sub-functions are usually connected together at specific points, known as breakpoints.

2. How do you identify the breakpoints in a piecewise function?

The breakpoints in a piecewise function are usually found at the points where the sub-functions change. These can be identified by looking at the domain of the function and determining where the values change or where there are discontinuities.

3. What is the purpose of differentiating a piecewise function?

Differentiating a piecewise function allows us to find the rate of change or the slope of the function at specific points. This is useful in applications such as physics, economics, and engineering where we need to calculate rates of change.

4. How do you differentiate a piecewise function?

To differentiate a piecewise function, we differentiate each sub-function separately and then combine the results using the rules of differentiation. We also need to pay attention to the breakpoints, as the derivative may be different on either side of these points.

5. What is the difference between a continuous and a non-continuous piecewise function?

A continuous piecewise function is one in which the sub-functions are connected smoothly, without any breaks or discontinuities. In contrast, a non-continuous piecewise function has at least one point where the sub-functions are not connected, resulting in a break or jump in the graph of the function.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
259
  • Calculus and Beyond Homework Help
Replies
26
Views
887
  • Calculus and Beyond Homework Help
Replies
1
Views
455
  • Calculus and Beyond Homework Help
Replies
7
Views
255
  • Calculus and Beyond Homework Help
Replies
8
Views
456
  • Calculus and Beyond Homework Help
Replies
9
Views
795
  • Calculus and Beyond Homework Help
Replies
4
Views
287
  • Calculus and Beyond Homework Help
Replies
4
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
297
  • Calculus and Beyond Homework Help
Replies
4
Views
902
Back
Top