The function y is defined as:
y = 2e^(x-0.5x^2) + 2e^(-x) if x > 0, 1 + x^2
Using a for loop or otherwise:
a) Determine the values of y in a vector called z for x values from -2 to 2 in steps of 0.2. Display the values of vector z.
b) Determine and display the sum of values of the vector z.