I have solved these both problem and as you know, to write here the latex code of them would take some time. So, would you please be kind enough to compute on your own, or use any computation math tool to do so (I don't know any, except for maxima, and don't know how to compute double integrals there) and check if they are equal with mine?

Thanks.

Problem 1:

if and in other points

Solution problem 1:

Problem 2:

if and in other points

Solution problem 2:

P.S. Both this functions have two "branches". I suppose that's possible to write that in latex more clearly than what I have done. How?