h)\right] \text { Write a program to calculate the integral of } \sin ^{2}(x) \text {. } Your program should : Ask the user for the values of a, b and how many points between these values. Use the inline command in the script to evaluate sin²(x) when calculating the integral. \text { - Be tested using the information that } \int_{0}^{\pi} \sin ^{2}(x) d x=\frac{\pi}{2} The error function, erf(z), is used in solving the heat equation. It is given by : \operatorname{erf}(z)=\frac{2}{\sqrt{\pi}} \int_{0}^{z} e^{-x^{2}} d x Write a program which will calculate the value of the erf(z), adapted from your trapezium integrationprogram above. You can test you program using the information that erf(1) = 1.
Fig: 1
Fig: 2
Fig: 3
Fig: 4
Fig: 5
Fig: 6
Fig: 7
Fig: 8
Fig: 9
Fig: 10
Fig: 11