## shahzadjalbani Group Title integrate sin (x^2) form 0 to pi 2 years ago 2 years ago

$\int\limits_{0}^{\pi} \sin x ^{2} dx$

2. hba Group Title

akbar jatoi jalbani

3. eliassaab Group Title

You cannot do that in closed from.

4. eliassaab Group Title

You can do it numerically.

5. ProgramGuru Group Title

first substitute x^2=z then 2xdx=dz putting x=sqrt(z) it will be dx=dz/(2sqrt(z)) changing limits and integrating by parts should give you the answer

6. sami-21 Group Title

the best option is to go for numerical integration f(x)=sin(x^2) using simpson's rule with n=4 h=(pi-0)/4=pi/4 f(0)=sin(0)=0 f(pi/4)=sin(pi/4^2)=0.5784 f(pi/2)=sin(pi/2^2)=0.6242 f(3pi/4)=sin(3pi/4^2)=-0.668 f(pi)=sin(pi^2)=-0.4303 using sinpsons rule h/3(f(0)+4f(pi/4)+2f(pi/2)+4f(3pi/4)+f(pi)) put all the above values =0.12044

7. ProgramGuru Group Title

@sami-21 Can you please explain to me what is simpson's rule?

8. cherylim23 Group Title

Sami-21, just wondering, why does other sources suggest that the answer is 0.77265 instead?

9. sami-21 Group Title

yeah sure it is a technique for numerical integration the basic formula for this rule is as follows $\int\limits_{a}^{b}f(x)=h/3(f0(x)+4f1(x)+2f2(x)+4f3(x)+2f4(x)+...fn(x))$ where h is the size of the interval and given by h=(b-a)/n where n is the no of subintervals (no of rectangles that gets added) just evaluate the function at the respective points the point with odd subscripts is multiplied by 4 and that with even subscripts is multiplied by 2 you can see this in the above formula you can visit the following also for detail http://en.wikipedia.org/wiki/Simpson's_rule

10. ProgramGuru Group Title

@sami-21 Big thanks man!!

11. sami-21 Group Title

@cherylim23 yes correct answer is 0.77265 .it is a numerical technique there is always eror associated with numerical techniques we go for numerical technique when we do not have analytical solution ..the same answer can be achieved by simpson rule with n=20 or more you can go there at the following site and can compute the result with different size http://nastyaccident.com/calculators/calculus/simpsonsRule

12. mukushla Group Title

here is a very nice integral and possible to solve analytically ; if u r interested $\large \int\limits_{0}^{\infty} \sin x^2 \ dx$

13. sami-21 Group Title

yes i can do this !!!!!!

14. sami-21 Group Title

taylor series about a=0 for sin|(x) is $sin(x)=x-x^3/3!+x^5/5!-x^7/7!+...$ replace x by x^2 i the above $sin(x^2)=x^2-x^6/3!+x^{10}/5!-x^{14}/7!+...$ now you can integrate both sides and you will get the result because you will have just to integrate polynomial

15. mukushla Group Title

yes thats right it will give a series for u but not the exact answer here is my solution ; It worths watching! :)

16. sami-21 Group Title

yup i got this in BS grewall Highier Engineering Mathematics thanks i think fourier integral also works here

17. mukushla Group Title

yes fourier will work also....