Calc help please ASAP

<p>test tomorrow and i dont know how to do these type of problems:</p>

<p>ok i have a freaking test in the morning and there is a type of problem i cant do. it goes like this:
f(x)= 3-x x is less than 1
ax^2+bx, x is greater than or equal to 1
where a and b are constants</p>

<p>questions:
a) if the function is continuous for all x, what is the relationship between a and b
b) find the unique values for a and b that will make f both continuous and differentiable</p>

<p>Please help i have no idea what im doing and each prob is worth 10 points... im going to miss others so i need at least partial credit</p>

<p>a) f(x) is continuous at all points including x = 1, so:
3 - 1 = a(1)²+b(1)
a + b = 2
b) f(x) is differentiable at all points, so its derivative is continuous at all points including x = 1, so:
-1 = 2a(1) + b = 2a + b
Solving the two equations gives a = -3 and b = 5.</p>

<p>ummm in part b where did that -1 come from???</p>

<p>It is the derivative of 3 - x</p>

<p>what subject is this? diff eq?</p>

<p>Calculus 1</p>