For the 1st one you wouldn't really need matlab I guess to find the area under the curve, it is 0 and so is its energy. For the 2nd one I got A=1.73 and so E=2.99.
area under curve = evaluate integral from t=t1 to t=t2. in this case t=-2 to t=5 since they are both defined only that far.
energy = area2
The Attempt at a Solution
Used matlab and the waveforms for the functions are plotted below. I used trapz() to approximate the integral i.e. to find the area. I could post the matlab code but wouldn't think it would be of much use.