I could not figure out how to get the LaTex to look right with piece wise functions, so I just made a picture. Here are the 2 problems:

Its sopposed to be a piece wise function but I cannot figure out do it with latex.

For no. 1 How do I set it up? Once I get past that, Im sure I can do the rest. Heres what I have:

Is this correct?

For problem no.2, I just need to get to the undertermined coefficient part. So heres what I do for the problem:

Solving for

Does this look correct so far? Thanks guys!