Differentiability of composite functions

1. Apr 28, 2012

raphile

Hi, I have a small question about this. Using the chain rule, I know that a composition of differentiable functions is differentiable. But is it also true that if a composition of functions is differentiable, then all the functions in the composition must be differentiable?

For example, if $f(g(x))$ is differentiable, does that imply $f(x)$ and $g(x)$ are both differentiable?

Thanks!

2. Apr 28, 2012

DonAntonio

$\cos\sqrt{x}$ is differentiable from the right at $x=0$ , but $\sqrt{x}$ isn't...

DonAntonio

3. Apr 28, 2012

Office_Shredder

Staff Emeritus
Examples can be constructed where f(x) or g(x) can be arbitrarily bad (for example discontinuous) yet f(g(x)) is differentiable

A classic example of this is when f(x)=1 and g(x) is any function you pick. f(g(x))=1 so this composition is differentiable, but g(x) clearly doesn't have to be.

For the other way around consider f(x)="any function which is always negative" if x<1 (for example -x6), and x4 if x >=1. Now let g(x) = x2+3. Because g(x)>=1 always, f(g(x)) is always differentiable (because we are always using the x4 portion of f(x) thanks to how g was constructed), even though a large chunk of f(x) is not differentiable.

4. Apr 30, 2012

raphile

Thanks for the help and examples!