Currently attempting to do a numerical integration using the Trap rule.
Original integral was
between 0 and infinity.
With some subsitution and what not, have got it to
cos(x^2), which obviously is a fresnel integral.
My code currently looks like this, but it will only complete 1 iteration. I cannot work out why it will only complete 1 loop and give a totally wrong answer.
Thanks in advance guys!
printf("\nInput Upper Limit Value (Larger is More Accurate):");
printf("The following is the answer to the integral cos(x)/sqrt(x): ");
printf("Accuracy is %lf",accuracy);