functions must be continuous at a point for any derivatives to exist at that point. Your function is rather discontinuous everywhere.
I'm trying to find the first and second derivative (at 0) of a rather strange function. Let g(x) = 1 if x is rational, -1 if x is irrational. Let f(x) = x^3* g(x). I convinced myself earlier that the first and second derivative at 0 does not exist as the function is not continuous, but i'm not sure if i'm right. Is there a good way to do this using the definition of a derivative(I can't figure out how), any other help would be great too.
@plato, i do see that as |g(x)| = 1. But, how would that be incorporated into the problem? I'm not sure where you're going with that. Also, i'm pretty sure I just proved the function is continuous at 0.
Plato's point is that this function is continuous at x= 0. [tex]\lim_{x\to 0} f(x)= f(0)= 0[tex].
To find the derivative at x= 0, use the definition: . But . What happens to that as h goes to 0? And, of course, to find the second derivative, do that again.
Do you see why f(x) is defined as ? What would be true if f had been defined as ?
@HallsOfIvy Okay, that makes sense I just used what plato showed me to show the function is continuous at 0. This makes sense so both the first and second derivative are 0. To compute the second derivative you just do the same thing but set f(x) = x^2g(x), right?
So, if f(x) was defined as x^2 g(x) the second derivative at 0 would just be g(x) = 1, or would it be defined. I guess i'm not sure if lim h-> 0 of g(h) is 1 or undefined. I'm starting to think it is undefined as the rationals are dense in R; hence, its oscillating between -1 and 1. Right?
It breaks down when f(x) = 2x g(x). Let's just look at f(x) = x g(x)
lim (h-->0) ((x+h)g(x+h) - x g(x))/h
Evaluating this at x=0 we get
lim(h-->0) (h g(h) - 0)/h = g(h), and this limit does not exist
you've lost the factor of x^{n} that was causing your x^{n} g(x) to have a limit at 0
so no, your second derivative of x^{2} g(x) does not equal 2. It doesn't exist.
when you work these limit problems any squared and higher terms of differentials (and h is one even if it isn't labeled so) get tossed.
((x+h)g(x+h))^{2} - x^{2} g(x)^{2} = (x^{2} + 2xh + h^{2})*1 - x^{2}*1
now we toss the h^{2} and get 2xh. Dividing by h you get 2x and at 0 this is 0.
The only effect g(x) has on the problem is to require there be at least a power of x multiplying g(x) in order for it's limit at 0 to converge.