# Math Help - Math Exam, due in about 18 hours

1. ## Math Exam, due in about 18 hours

I'm new here, and wanted to ask this about a week ago, but I got the other 6 problems that I was going to ask for on my own, and with friends.

The alst problem bothering us is:

For what integers p > 0 is

f(x) = $x^p*sin(1/x) x =/= 0
0 x=0$

Differentiable? For what p is the derivative continuous?

My work: All I have for the most part is the general derivative of the top equation.

$x^p*((cos(1/x)*(-1/x^2))+(sin(1/x)*px^(p-1))$ (that is, in the last part, p times x raised to the power of (p-1)

That factors if we pull out the x raised to the power of (p-1) to:

$x^(p-1)*(-cos(1/x)*(1/x)+sin(1/x)*p)$

Notice that if we pull out that x from the left side, we have reduced from $1/x^2$ to $1/x$.

Help? I think it is whenever p > 2, that it will be continuous because by that, the function would converge to zero as the functions approaches x=0 from the left or right sides.

Would the derivative be continuous for p = anything?

2. Originally Posted by ZevWolf
I'm new here, and wanted to ask this about a week ago, but I got the other 6 problems that I was going to ask for on my own, and with friends.

The alst problem bothering us is:

For what integers p > 0 is

f(x) = $x^p*sin(1/x) x =/= 0
0 x=0$

Differentiable? For what p is the derivative continuous?

My work: All I have for the most part is the general derivative of the top equation.

$x^p*((cos(1/x)*(-1/x^2))+(sin(1/x)*px^(p-1))$ (that is, in the last part, p times x raised to the power of (p-1)

That factors if we pull out the x raised to the power of (p-1) to:

$x^(p-1)*(-cos(1/x)*(1/x)+sin(1/x)*p)$

Notice that if we pull out that x from the left side, we have reduced from $1/x^2$ to $1/x$.

Help? I think it is whenever p > 2, that it will be continuous because by that, the function would converge to zero as the functions approaches x=0 from the left or right sides.

Would the derivative be continuous for p = anything?
I was mystified by your definition of f(x) at first but eventually realized you meant f(x) is defined piecewise as $x^p*sin(1/x)$ when $x \neq 0$ and $0$ when $x = 0$. (I'm not sure how to make it look nice with a big left brace in LaTeX.)

I'll edit this post in a bit to address the problem itself, but thought it might help others to know what f(x) is in the meantime.

EDIT 1: It's been a while since I've done these, so first, a sketch:

f(x) is differentiable at $x=a$ if both left and right derivatives exist at $a$ and they are equal.

We'll only need to check the case $x = 0$ because it's pretty clear that the derivative is well defined when $x \neq 0$.

I'll edit again when I get a bit further.

EDIT 2: I realized just now that it's more convenient for everyone if people make new replies rather than editing existing posts. That way, the poster gets to use the "preview" feature, and everyone else can get email notification. Sorry, I'm new here.

Anyway, this is what I came up with:

You found that

$f'(x)=x^p*((cos(1/x)*(-1/x^2))+(sin(1/x)*px^{p-1})$
$=x^{p-1}*(-cos(1/x)*(1/x)+sin(1/x)*p)$

when $x \neq 0$. I agree with this part.

In what follows, when I assign a name to a limit (like $L_1$), I mean that this name applies only in the case that the limit exists.

We should use the definitions for right-derivative

$L_1 = lim_{h->0^+}(f(a+h)-f(a))/h$

and left-derivative,

$L_2 = lim_{h->0^-}(f(a+h)-f(a))/h$

to find out whether f(x) is differentiable at x=a=0. If both limits exist and $L_1=L_2$ then the derivative exists and $f'(0)=L_1=L_2$. We should not think only in terms of

$L_3 = lim_{x->0}f'(x)$

because it's possible that f'(0) exists but either (1) $L_3$ doesn't exist, or (2) $L_3$ exists but $f'(0) \neq L_3$, and in both cases (1) and (2), f(x) will be differentiable, but the derivative will not be continuous. It is also generally possible for $L_3$ to exist but f'(0) to not exist, in which case f(x) will not be differentiable but we might mistakenly think it is. This is a bit tricky to realize, but I believe it's the whole point of the problem.

So first, the right derivative:

$L_1 = lim_{h->0^+}(f(a+h)-f(a))/h$
$=lim_{h->0^+}(f(0+h)-f(0))/h$
$=lim_{h->0^+}(h^p*sin(1/h)-0)/h$
$=lim_{h->0^+}h^{p-1}*sin(1/h)$

If p = 1, then we have

$L_1=lim_{h->0^+}h^0*sin(1/h)$
$=lim_{h->0^+}sin(1/h)$

which does not exist since sin(1/h) oscillates an infinite number of times in any closed interval [0, b], b > 0.

If p > 1, then we'll be able to use the sandwich theorem (aka squeeze theorem) to determine that both right- and left-derivatives exist and equal 0.

So the first part of the question is answered: f(x) is differentiable if and only if p > 1.

For the second part we need to check

$L_3 = lim_{x->0}f'(x)$

I believe it's most useful to express f'(x) like this

$f'(x)=-x^{p-2}*cos(1/x)+p*x^{p-1}*sin(1/x)$

because otherwise we might fall into a certain trap: if $lim_{x->0}g(x)=0$ and $lim_{x->0}h(x)$ is undefined, it would be wrong to conclude that $lim_{x->0}(g(x)h(x))=0$, for example consider $g(x)=x$ and $h(x)=x^{-4/3}$.

Anyway it's my understanding that

$lim_{x->0}(-x^{p-2}*cos(1/x))$

only exists when p > 2, in which case it will be 0 by the sandwich theorem. So overall f'(x) will be continuous only in the case p > 2.

I think this is right but again it's been a while, so please check my work and see if you agree.

By the way in LaTeX the way to get superscripts with more than one character is like this, without spaces: [ math]x^{p-1}[ /math].

3. Oh, sorry about that - meant to define it as a piece-wise function, such that:
if x = 0, f(x) = 0
x not equal to 0, f(x) is that long equation

4. We should know that the derivative should be continuous wherever it exists.

based on my work of factoring out an x^(p-1) from the derivative, whenever x = 0, one of the factors from the multiplication is 0, so the whole derivative should be 0, regardless of what p is.

From what I understand (and I may very well be wrong), the only sticking point is whether the function itself is continuous for p (and we are pretty sure that it isn't all values of p, because I'd submitted it as a homework a week before, and he marked it wrong).

Ah, yes, and I also didn't notice the new edit. Thanks for the help with the exponents by the way.

5. Triple posting is not allowed, but I can't message for a response to my questions. I just noticed the response 5 minutes ago. So if a moderator can, please edit and consolidate my posts.

Originally Posted by undefined
EDIT 2: Anyway, this is what I came up with:

You found that

$f'(x)=x^p*((cos(1/x)*(-1/x^2))+(sin(1/x)*px^{p-1})$
$=x^{p-1}*(-cos(1/x)*(1/x)+sin(1/x)*p)$

when $x \neq 0$. I agree with this part.
Good to know I did something right :S

In what follows, when I assign a name to a limit (like $L_1$), I mean that this name applies only in the case that the limit exists.

We should use the definitions for right-derivative

$L_1 = lim_{h->0^+}(f(a+h)-f(a))/h$

and left-derivative,

$L_2 = lim_{h->0^-}(f(a+h)-f(a))/h$

to find out whether f(x) is differentiable at x=a=0. If both limits exist and $L_1=L_2$ then the derivative exists and $f'(0)=L_1=L_2$. We should not think only in terms of

$L_3 = lim_{x->0}f'(x)$

because it's possible that f'(0) exists but either (1) $L_3$ doesn't exist, or (2) $L_3$ exists but $f'(0) \neq L_3$, and in both cases (1) and (2), f(x) will be differentiable, but the derivative will not be continuous. It is also generally possible for $L_3$ to exist but f'(0) to not exist, in which case f(x) will not be differentiable but we might mistakenly think it is. This is a bit tricky to realize, but I believe it's the whole point of the problem.

I follow you on this as well, that the limit may exist on both sides, but not necessarily equal

So first, the right derivative:

$L_1 = lim_{h->0^+}(f(a+h)-f(a))/h$
$=lim_{h->0^+}(f(0+h)-f(0))/h$
$=lim_{h->0^+}(h^p*sin(1/h)-0)/h$
$=lim_{h->0^+}h^{p-1}*sin(1/h)$

If p = 1, then we have

$L_1=lim_{h->0^+}h^0*sin(1/h)$
$=lim_{h->0^+}sin(1/h)$

which does not exist since sin(1/h) oscillates an infinite number of times in any closed interval [0, b], b > 0.

If p > 1, then we'll be able to use the sandwich theorem (aka squeeze theorem) to determine that both right- and left-derivatives exist and equal 0.

So the first part of the question is answered: f(x) is differentiable if and only if p > 1.

That makes sense.

For the second part we need to check

$L_3 = lim_{x->0}f'(x)$

I believe it's most useful to express f'(x) like this

$f'(x)=-x^{p-2}*cos(1/x)+p*x^{p-1}*sin(1/x)$

Okay, took a minute to realize, but yes - I agree

because otherwise we might fall into a certain trap: if $lim_{x->0}g(x)=0$ and $lim_{x->0}h(x)$ is undefined, it would be wrong to conclude that $lim_{x->0}(g(x)h(x))=0$, for example consider $g(x)=x$ and $h(x)=x^{-4/3}$.

Anyway it's my understanding that

$lim_{x->0}(-x^{p-2}*cos(1/x))$

only exists when p > 2, in which case it will be 0 by the sandwich theorem. So overall f'(x) will be continuous only in the case p > 2.

I think this is right but again it's been a while, so please check my work and see if you agree.

The work is very complicated, and it will take my mind 10 minutes to understand, but for now, let's agree that the work is correct. I thank you for your help, greatly.

6. Originally Posted by ZevWolf
Triple posting is not allowed, but I can't message for a response to my questions. I just noticed the response 5 minutes ago. So if a moderator can, please edit and consolidate my posts.
I don't know the rules on triple posting, but hopefully you will be able to reply to this if you still have questions.

Originally Posted by ZevWolf
When p = 2, f'(0) = 0, but $lim_{x->0}f'(x)$ does not exist. I'm attaching a picture I made with Mathematica showing f'(x) when p = 2. As you can see, this oscillates more and more the closer x gets to 0. You may think of f'(x) defined piecewise: $f'(x)=x^{p-1}*(-cos(1/x)*(1/x)+sin(1/x)*p)$ when $x \neq 0$, and $f'(x)=0$ when $x = 0$.