# Leibniz's rule and differentiability of a function.

1. Dec 19, 2012

### peripatein

Hi,
1. The problem statement, all variables and given/known data

(I) The following function is defined for α,β>0:
f(x) = { xβsin(1/xα), x≠0;
{ 0, x=0

I was asked for the values of α,β for which f(x) would be continuous at 0, differentiable at 0, continuously differentiable at 0, and twice differentiable at 0.

(II) I was asked to find the sum Ʃ(k=0,n) keκx

(III) Using Leibniz's rule, I am trying to evaluate (exsinx)(n).

2. Relevant equations

3. The attempt at a solution

(I) Would it be correct to write that f(x) is continuous at x=0 for any Natural α,β>=1?
I tried to equate the limits of the first derivatives at x=0 and got that there are no values of α,β for which f(x) is differentiable at 0. Is that correct? There also no values of α,β for which f(x) is continuously differentiable nor for which the second derivative would exist at x=0.
Are these statements correct?

(II) I first found the sum of the geometric progression Ʃ(k=0,n) eκx, which is (ex(n+1) - 1)/(ex - 1).
Is this result now to be multiplied by Ʃ(k=0,n) k, i.e. the arithmetic progression whose first term is 1 and last enx, with d=1?

(III) I know the final answer, namely 2n/2exsin(x+π/4), but do not quite understand how it was derived. Could someone please explain it to me? PS. I am not allowed to apply Euler's formula.

2. Dec 19, 2012

### pasmith

Assuming $f: [0,\infty) \to \mathbb{R}$ and with one-sided limits at 0:

$f(x)$ is continuous at 0 for any $\beta > 0$, because $|f(x) - 0| \leq |x^{\beta}| \to 0$ as $x \to 0$.

$f(x)$ is differentiable at 0 with $f'(0) = 0$ for any $\beta > 1$, since $f(x)/x = x^{\beta - 1}\sin(x^{-\alpha}) \to 0$ as $x \to 0$ by the above.

For the next two, I need the result that if
$$g(x) = \left\{\begin{array}{r@{\quad}l} 0 & x = 0 \\ x^\gamma \cos(x^{-\alpha}) & x \neq 0 \end{array} \right.$$
then $g(x)$ is continuous at 0 for $\gamma > 0$, because $|g(x)| \leq |x^\gamma| \to 0$ as $x \to 0$.

$f(x)$ is continuously differentiable at 0 with $f'(0) = 0$ provided $\beta > 1$ and $\beta > \alpha + 1$, since for $x \neq 0$,
$f'(x) = \beta x^{\beta - 1}\sin(x^{-\alpha}) - \alpha x^{\beta - \alpha - 1}\cos(x^{-\alpha})$.

$f(x)$ is twice differentiable at 0 with $f''(0) = 0$ provided $\beta > 2$ and $\beta > \alpha + 2$, since then $f'(x)/x = \beta x^{\beta - 2}\sin(x^{-\alpha}) - \alpha x^{\beta - \alpha - 2}\cos(x^{-\alpha}) \to 0$ as $x \to 0$ by the above.

If you want to consider $x < 0$ as well then these results certainly hold for integer $\alpha$ and $\beta$.

No. The easiest way to do this sum is
$$\sum_{k=0}^n ke^{kx} = \sum_{k=0}^n \frac{\mathrm{d}}{\mathrm{d}x} e^{kx} = \frac{\mathrm{d}}{\mathrm{d}x} \sum_{k=0}^n e^{kx}$$
by linearity of the derivative.

I think that result is wrong: it doesn't hold when $n = 2$.

Starting with $n = 1$:
$$(e^x \sin x)' = e^x (\sin x + \cos x) = \sqrt 2 e^x \sin (x + (\pi/4))$$
since if
$$R \sin (x + \alpha) = R \sin x \cos \alpha + R \cos x \sin \alpha = \sin x + \cos x$$
then $R = \sqrt 2$ and $\tan \alpha = 1$ so that $\alpha = \pi/4$.
Then for $n = 2$:
$$(e^x \sin x)'' = (\sqrt 2 e^x \sin (x + (\pi/4)))' = 2e^x \sin (x + (\pi/2))$$
This suggests that the actual result is
$$(e^x \sin x)^{(n)} = 2^{n/2} e^x \sin(x + (n\pi/4))$$
which can be proven by induction.

Last edited: Dec 19, 2012
3. Dec 19, 2012

### peripatein

Pasmith, in your answer to my first question, for f(x) to be differentiable at x=0, why ought not alpha to be less than beta - 1?

4. Dec 19, 2012

### pasmith

Because
$$f'(0) = \lim_{x \to 0^{+}} \frac{f(x) -f(0)}{x} = \lim_{x \to 0^{+}} x^{\beta - 1}\sin(x^{-\alpha})$$
which exists for all $\alpha> 0$ if $\beta > 1$ and doesn't exist for any $\alpha > 0$ if $\beta \leq 1$. The condition on $\alpha$ is only required for the derivative to be continuous at 0.

5. Dec 19, 2012

### peripatein

Do we demand f'(0)=0 and f''(0)=0, so that the derivative is continuous, as every differentiable function must also be continuous? Is that why?

6. Dec 20, 2012

### pasmith

The only way for f'(0) to exist at all is if f'(0) = 0. Derivatives are not necessarily continuous, and existence of f'(0) is necessary but not sufficient for f'(x) to be continuous at 0; the extra condition on $\alpha$ is required. It is certainly necessary that f'(x) be continuous at 0 for f to be twice differentiable at 0, but for
$$f''(0) = \lim_{x \to 0} \frac{f'(x) - f'(0)}{x} = \lim_{x \to 0} \frac{f'(x)}{x}$$
to exist a stronger condition is required, and that results in f''(0) = 0.