# These are the four functions for the extra credit problem to Homework 3 # # They are listed without explanation or comment because commenting them # might give away the answer to the extra credit problem # def f1(x): return 2 * sqrt((-abs(abs(x)-1)) * abs(3 - abs(x))/((abs(x)-1)*(3-abs(x)))) * \ (1 + abs(abs(x)-3)/(abs(x)-3))*sqrt(1-(x/7)**2)+(5+0.97*(abs(x-0.5)+abs(x+0.5))-\ 3*(abs(x-0.75)+abs(x+0.75)))*(1+abs(1-abs(x))/(1-abs(x))) def f2(x): return (-3) * sqrt(1-(x/7)**2) * sqrt(abs(abs(x)-4)/(abs(x)-4)) def f3(x): return abs(x/2) - 0.0913722*x**2 - 3 + sqrt(1-(abs(abs(x)-2)-1)**2) def f4(x): return (2.71052 + 1.5 - 0.5*abs(x) - 1.35526 * sqrt(4-(abs(x)-1)**2)) *\ sqrt(abs(abs(x)-1)/(abs(x)-1))+0.9