# Continuity problem

• Dec 19th 2012, 04:34 AM
Nora314
Continuity problem
Hi everyone, this is a problem from a previous exam. I manage to solve half of it, but am struggling with the second half.

f(x) = x2 + x - 1 for x ≥ 0
f(x) = a cos(x) + b sin(x) for x < 0

Find a and b so that f(x) is continuous and differentiable for all x = 0

Can someone help solve this?

Thank you all!
• Dec 19th 2012, 05:00 AM
emakarov
Re: Continuity problem
Quote:

Originally Posted by Nora314
f(x) = x2 + x - 1 for x ≥ 0
f(x) = a cos(x) + b sin(x) for x < 0

Find a and b so that f(x) is continuous and differentiable for all x = 0

Well, I found the required a and b for some x = 0, but I am not sure about all of them. (Smile)

Equate the values of the two functions at 0, as well as the values of their derivatives at 0. You'll get two equations in a and b.
• Dec 19th 2012, 05:31 AM
Nora314
Re: Continuity problem

I wrote it a bit weirdly, but the functions I wrote are actually supposed to be one function. Would what you said still work then? :) I found that a = 1, by investigating the limit as x approaches 0.
• Dec 19th 2012, 05:47 AM
emakarov
Re: Continuity problem
Quote:

Originally Posted by Nora314
the functions I wrote are actually supposed to be one function. Would what you said still work then? :)

Yes.

Quote:

Originally Posted by Nora314
I found that a = 1, by investigating the limit as x approaches 0.

x² + x - 1 = -1 when x = 0 and a cos(x) + b sin(x) = a when x = 0. Therefore a = -1. Now find the left and right derivatives at 0 and equate them.
• Dec 19th 2012, 06:07 AM
Nora314
Re: Continuity problem
Thanks for the help, I did that. Let me see, derivative on the right is 2x + 1 and on the left -sin x + b cosx. When I put them equal to each other and x = 0, I got b = 1.

In the answer key it says the opposite values, it says that a = 1 and b = -1. I manged to get that answer too by using another method. Perhaps it does not matter if the values of a and b are switched around ? (lol, I always think that).

Ok, I solved it both ways now :) do you know why the answers are switched around when we use this method?

And btw, I really like your signature ^^
• Dec 19th 2012, 06:25 AM
emakarov
Re: Continuity problem
Quote:

Originally Posted by Nora314
Let me see, derivative on the right is 2x + 1 and on the left -sin x + b cosx.

Since a = -1, the left derivative is sin(x) + b cos(x), but since sin(0) = 0, the sign of sin(x) does not matter.

Quote:

Originally Posted by Nora314
In the answer key it says the opposite values, it says that a = 1 and b = -1.

a = -1 and b = 1 gives the red graph, while a = 1 and b = -1 gives the blue one.

https://s3.amazonaws.com/grapher/exports/oollgddx7i.png

Perhaps the textbook authors thought that the left function is a sin(x) + b cos(x).

Quote:

Originally Posted by Nora314
And btw, I really like your signature ^^

Thanks!
• Dec 19th 2012, 06:58 AM
Nora314
Re: Continuity problem
Thank you so so much for your help ^^ It makes a lot more sense now. It is really nice that you made a graph and everything!