/* a function to find the root of */ #include double f(double x) { double pi; pi = acos(-1.0); return x*sin(pi*x)-exp(-x); }