# Problem with this function continuity and differentiation

1. Apr 28, 2012

### charmedbeauty

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

Suppose that a and b are real numbers. Find all values of a and b (if any) such that the functions f and g, given by

a) f(x)={ax+b if x<0 and sin(x) if x≥0}

b) g(x)={ax+b if x<0 and e2x if x≥0}

are (i) continuous at 0 and (ii) differentiable at 0

2. Relevant equations

3. The attempt at a solution

So for a) f(x)={ax+b if x<0 and sin(x) if x≥0}

as the lim→0+

then sin(0) =0

as the lim →0-

then a(0)+b=b

so hence only when b=0 is the function continuous at 0.

for a) (ii)

do I just use the limit definition

ie,

lim h→0+ = limh→0-

so lim h→0+ (f sin(x+h)-f(sinx)) / h = lim h→0- (f(a(x+h)+b)-f(ax+b))/ h

lim h→0+ sin h / h= sin 0/0 =0 and lim h→0- = a.

so it is only differentiable at 0 when a=0

But the answer says when a=1 and b=0 for a) (ii)

2. Apr 28, 2012

### Dick

The derivative of sin(x) at x=0 isn't 0. limit h->0 sin(h)/h isn't 0. sin(0)/0 isn't 0 either. It's undefined.

3. Apr 28, 2012

### charmedbeauty

Am I using the wrong approach then?

What happens if these terms are undefined, does the formula not work?

4. Apr 28, 2012

### Dick

limit h->0 sin(h)/h is defined. It's just not 0. You don't have any idea what it might be? Try experimenting with a calculator. You really should know what it is. Hopefully the experiment will remind you.

5. Apr 28, 2012

### Bohrok

To make f(x) differentiable at x=0 (or in other words, so that the graph doesn't have a corner), ax+b must have the same slope as the derivative of sinx has at x=0, which would be...?

6. Apr 28, 2012

### charmedbeauty

ohh right its 1, silly me.

7. Apr 28, 2012

### charmedbeauty

Ok so a=1 and b=0.

But for part b) (ii)

I have the limit from 0- =a from part a)
and the lim h-->0+

= f(e2(x+h))-f(e2x) / h

= e2x +e2h-e2x / h

= 1/0 ??

but the answer says a=2 and b=-1??

what am I doing wrong now?

8. Apr 28, 2012

### Dick

Do you have to everything with difference quotients? You aren't very good at it. If f(x)=e^(2x), f(0)=1 and f'(0)=2. Can't you do it by just differentiating using the chain rule?

Last edited: Apr 28, 2012
9. Apr 29, 2012

### charmedbeauty

yeah I guess so
But what am I differentiating exactly??

because Im confused with b=-1

f(0) for the other function =+b
f'(0) = a

DO you have to match these up, because I would say that a=2 and b=1, not -1?
Im confused?

10. Apr 29, 2012

### Dick

I would say a=2 and b=1 as well. There may be an error in your answer key.

11. Apr 29, 2012

### charmedbeauty

ok thanks dick!