wu :: forums « wu :: forums - integration » Welcome, Guest. Please Login or Register. Sep 18th, 2018, 8:58am RIDDLES SITE WRITE MATH! Home Help Search Members Login Register
 wu :: forums    riddles    hard (Moderators: Icarus, Grimbal, SMQ, Eigenray, william wu, ThudnBlunder, towr)    integration « Previous topic | Next topic »
 Pages: 1 Reply Notify of replies Send Topic Print
 Author Topic: integration  (Read 7779 times)
MonicaMath
Newbie

Gender:
Posts: 43
 integration   « on: Mar 23rd, 2010, 1:37pm » Quote Modify

hello...
could anyone help me finding the integral of
(1)   [ (sin(pi x/2)) / (x^2 - 4) ]^2
and
(2)  [ (sin(pi x/2)) / (x (x^2 - 4)) ]^2

 IP Logged
Obob
Senior Riddler

Gender:
Posts: 489
 Re: integration   « Reply #1 on: Mar 23rd, 2010, 1:47pm » Quote Modify

I very much doubt either of those functions have antiderivatives in elementary functions.  You could try to ask about particular definite integrals:  for instance, the integral of the first one over the whole real line is pi^2/16; the integral of the second one over the whole real line is 3 pi^2/64.  (This is thanks to mathematica).  The way to do it by hand is probably via complex analysis, which I'm a bit rusty on.
 IP Logged
MonicaMath
Newbie

Gender:
Posts: 43
 Re: integration   « Reply #2 on: Mar 23rd, 2010, 2:57pm » Quote Modify

I know that we can evaluate the integral using mathematica or Matlab, but is there any way to do this using some identities, formulas,...etc ?
 IP Logged
Obob
Senior Riddler

Gender:
Posts: 489
 Re: integration   « Reply #3 on: Mar 23rd, 2010, 4:39pm » Quote Modify

Do you mean evaluate the integral over the whole line?

Since the functions don't have elementary antiderivatives, it's not possible to evaluate them using the fundamental theorem of calculus.

There won't be simple "formulas" to use.  I think you need to use complex analysis; the main tool you need is the residue theorem, but you'll also need to do some real work in the form of error estimates.  You should look up a book on complex analysis and find the chapter on evaluating real integrals to see what's involved.

As a warm-up, finding the integral of sin(x)/x as x goes from -infty to infty via complex analysis is a good problem.  (There are other clever ways to evaluate this integral, but the complex analysis method is probably the easiest)
 IP Logged
ThudnBlunder
wu::riddles Moderator
Uberpuzzler

The dewdrop slides into the shining Sea

Gender:
Posts: 4489
 Re: integration   « Reply #4 on: Mar 25th, 2010, 10:47am » Quote Modify

on Mar 23rd, 2010, 1:37pm, MonicaMath wrote:
 hello... could anyone help me finding the integral of   (1)   [(sin(pi x/2))  / (x^2 - 4) ]^2 and (2)  [ (sin(pi x/2)) / (x (x^2 - 4)) ]^2

Where did you get these integrals?
Are you sure it's not sin(n/2))?
It is more common and the integrand would be integrable in terms of sine and log.
 IP Logged

THE MEEK SHALL INHERIT THE EARTH.....................................................................er, if that's all right with the rest of you.
Obob
Senior Riddler

Gender:
Posts: 489
 Re: integration   « Reply #5 on: Mar 25th, 2010, 11:13am » Quote Modify

I doubt it's sin(n pi/2);  for the integral to be finite, we need sin(pi x/2) = 0 when x = +-2.
 « Last Edit: Mar 25th, 2010, 11:28am by Obob » IP Logged
ThudnBlunder
wu::riddles Moderator
Uberpuzzler

The dewdrop slides into the shining Sea

Gender:
Posts: 4489
 Re: integration   « Reply #6 on: Mar 25th, 2010, 11:28am » Quote Modify

on Mar 25th, 2010, 11:13am, Obob wrote:
 I doubt it's sin(n pi/2);  for the integral to be finite, we need sin(pi x/2) = 0 when x = +-2.

Sorry, ignore my suggestion.
 IP Logged

THE MEEK SHALL INHERIT THE EARTH.....................................................................er, if that's all right with the rest of you.
MonicaMath
Newbie

Gender:
Posts: 43
 Re: integration   « Reply #7 on: Mar 25th, 2010, 12:20pm » Quote Modify

OK, this integral is the standard deviation of the fourier transform of the function
g(x) = {  (cos(x))^2   , -pi/2<=x<=pi/2
0      ,   otherwise
}
which is given by:
sigma^2= integral { (s - mean)^2 |g^(s)|^2 ds}

(where g^(s) =Fourier transform of g )

/ in fact I don't know what the integral bounds should be ??!! /

 « Last Edit: Mar 25th, 2010, 12:22pm by MonicaMath » IP Logged
Obob
Senior Riddler

Gender:
Posts: 489
 Re: integration   « Reply #8 on: Mar 25th, 2010, 4:16pm » Quote Modify

What do you mean by the standard deviation of a function whose domain is the entire real line?  As far as I know, you can't think of the function as being a random variable without choosing a probability distribution on the real line;  on the other hand, you can't think of the function as giving a probability distribution because this function (the Fourier transform of the function in your previous post) is sometimes negative.  Admittedly I don't know much about stats, but we should make sure that we're doing something that makes sense.
 IP Logged
MonicaMath
Newbie

Gender:
Posts: 43
 Re: integration   « Reply #9 on: Mar 25th, 2010, 7:39pm » Quote Modify

sorry, I mean the standard deviation of the distribution defined by p(x)=|g(x)|^2 / ||g||^2

which is defined to be
sigma^2= integral { (s - mean)^2 |g^(s)|^2 ds} /  ||g^(s)||^2

and I found that the mean=0;
mean = integral{ s  |g^(s)|^2 ds} / ||g^(s)||^2
(integration is over [-pi/2, pi/2 ] )

where all norms are the L2-norm

So, my problem now on how to calculate
(1)  integral [ (sin(pi x/2)) / (x^2 - 4) ]^2  over the real line
and
(2) integral [ (sin(pi x/2)) / (x (x^2 - 4)) ]^2 over the real line
??

without using Matlab or mathematica or complex integration ??!

 « Last Edit: Mar 25th, 2010, 8:20pm by MonicaMath » IP Logged
Obob
Senior Riddler

Gender:
Posts: 489
 Re: integration   « Reply #10 on: Mar 25th, 2010, 9:12pm » Quote Modify

OK, that clears things up a bit.  When you say integration is over [-pi/2,pi/2], I think you mean over the whole real line, though.  The only time you integrate over [-pi/2,pi/2] is when finding the Fourier transform, because the function is supported on that interval.  But the Fourier transform is supported on the whole line.

Having thought about the problem more (and in light of where it comes from) I think complex analysis is the wrong way to go.  Instead, we should think of it as trying to calculate L^2 norms of functions.  The first integral, for example, can be found as the L^2 norm of sin(pi x/2)/(x^2-4).  If we want to find the L^2 norm of this function, we can find the L^2 norm of its Fourier transform instead:  the Fourier transform is an isometery of L^2 by the Plancherel theorem.  I haven't computed the Fourier transform by hand, but Mathematica suggests it shouldn't be too difficult to compute:  it says that the Fourier transform of sin(pi x/2)/(x^2-4) is

1/2 i sqrt(Pi/2) sin(2t) restricted to [-pi/2,pi/2]

(make sure to take complex absolute values in the L^2 norm computation, instead of just squaring).  It might be easier to start with this function and compute the inverse Fourier transform, which should be sin(pi x/2)/(x^2-4).  The L^2 norm squared of this function is pi^2/16.

Similarly, the function sin (pi x/2)/(x(x^2-4)) has Fourier transform given by the function -1/2 sqrt(pi/2) cos(t)^2 restricted to [-pi/2,pi/2].  Again the L^2 norm squared computation is easy: it's 3 pi^2/64.
 « Last Edit: Mar 26th, 2010, 12:04pm by Obob » IP Logged
MonicaMath
Newbie

Gender:
Posts: 43
 Re: integration   « Reply #11 on: Mar 26th, 2010, 7:38am » Quote Modify

Thank you ... I think this would work ....
 IP Logged
Obob
Senior Riddler

Gender:
Posts: 489
 Re: integration   « Reply #12 on: Mar 26th, 2010, 9:57am » Quote Modify

In retrospect, there is an even better way to think of this problem.

Go back to the function g(t) = cos(t)^2 on [-pi/2,pi/2].  Since g is even, its Fourier transform h(s) = g^(s) is also even.  This shows that the mean of the distribution p(s) = |h(s)|^2/||h||^2 is zero.

Now for the standard deviation, we need to evaluate the L^2 norm of h and the integral of s^2 |h(s)|^2 ds.  For the L^2 norm of h, by Plancherel this is the same thing as the L^2 norm of g.  On the other hand,

integral( s^2 |h(s)|^2 ds) = integral(|s h(s)|^2 ds)

is the L^2 norm squared of sh(s).  But recalling that h(s) = g^(s), we are finding the L^2 norm squared of sg^(s).  However, recall that multiplication by s after the Fourier transform corresponds to differentiation by t before the transform: precisely,

sg^(s) = -i(g'(t))^,

so the L^2 norm of sg^(s) equals the L^2 norm of g'(t).  Succinctly, then, we have

sigma = ||g'||/||g|| = 2/sqrt(3),

where the integrals in this last equality could all be done elementarily.

Note that this last formula can be used to find the standard deviation of the distribution corresponding to the Fourier transform of any even function g without ever even having to compute said Fourier transform.

 « Last Edit: Mar 26th, 2010, 10:12am by Obob » IP Logged
Obob
Senior Riddler

Gender:
Posts: 489
 Re: integration   « Reply #13 on: Mar 26th, 2010, 12:03pm » Quote Modify

And finally, for a more elementary way:

Let's find the integral of (sin(pi x/2)/(x^2-4))^2.

We can write

1/(x^2-4)^2 = 1/(16(x-2)^2)+1/(16(x+2)^2)+1/(32(x+2))-1/(32(x-2)),

and from here we need to calculate four separate integrals.  Two of them are easy:  the integrals with 32(x+2) and 32(x-2) in the denominator are both zero, since for instance the function f(x) = sin(pi x/2)/(x-2) satisfies f(2+x) = -f(2-x);  f isn't odd, but if we translate the axis so the origin is at 2, then f is odd.

The other two integrals are slightly trickier.  For the integral of sin(pi x/2)^2/(16(x-2)^2), we make a substitution x = u + 2 and find that it is equivalent to find the integral of sin(pi u/2)^2/(16u^2).  Next substituting u = 2v/pi, we are left with

pi/32 * integral(sin(v)^2/v^2 dv)

Now we integrate by parts:

a = sin(v)^2
da = 2sin(v)cos(v)dv = sin(2v)dv
db = dv/v^2
b = -1/v

-sin(v)^2/v|_{-infty}^infty + integral(sin(2v)/v dv).

The first term vanishes, and we are left with

integral(sin(2v)/v dv).  Changing variables to v = w/2, we have

integral(sin(w)/w dw) over the whole line.

At this point, there are a number of standard techniques for showing this integral is pi.  Thus the integral of

sin(pi x/2)^2/(16(x-2)^2)

is pi^2/32.  Similarly, we can do the remaining term and get the same answer.  We conclude the integral of

(sin(pi x/2)/(x^2-4))^2

is pi^2/16.

Similar techniques can handle the other integral.
 « Last Edit: Mar 26th, 2010, 1:11pm by Obob » IP Logged
SWF
Uberpuzzler

Posts: 879
 Re: integration   « Reply #14 on: Jun 2nd, 2010, 8:49pm » Quote Modify

sin(pi*x/2)^2= (1-cos(pi*x))/2 = Real part of 1-exp(i*pi*x)

Integrate the function f(z)= (1-exp(i*pi*z))/2/(z-2)^2/(z+2)^2 dz around the contour along the axis from -inf to +inf (taking infinitesmal semi circular detours above the x axis to miss the singularities at z=-2 and z=+2), and then close the path by by taking a large (approaching R=infinity) semicircular arc back to the starting point.  The value of this integral must be zero, as the contour contains no poles.

The value of the large semi circular integral is zero.  The real part of the portion of the integral along the x axis is what we want to evalute, and it must equal the sum of the integrals around the small semicircular arcs around z=-2 and z=+2 (moving counter clockwise).

To evalute the semicircular integral around +2: the arc has radius r, and z=2+r*exp(i*theta) on this arc (which runs from theta=0 to theta=pi). By Taylor series, for small r, 1-exp(i*pi*z) approaches -i*pi*r*exp(i*theta).  The dz term equals i*r*exp(i*theta) d(theta).  Denominator in integrand is 2*r^2*exp(2*i*theta)*16.  This leaves the integral of pi/32*d(theta) from 0 to pi, which equals pi^2/32. Same thing is obtained for z=-2, meaning the integral we are looking for has value pi^2/16.

The second integral is done the same way except there is third singular point at z=0.  The integrals of this around z=+2 and z=-2 are both pi^2/128, and around z=0 is pi^2/32, giving a total of 3*pi^2/64.
 IP Logged
ThudnBlunder
wu::riddles Moderator
Uberpuzzler

The dewdrop slides into the shining Sea

Gender:
Posts: 4489
 Re: integration   « Reply #15 on: Jun 3rd, 2010, 8:01am » Quote Modify

Nice to see you back, SWF.

As we are on the subject, prove analytically that between 0 and 2 (a2sin2t + b2cos2t).dt [4{ab + (a - b)2}]

 « Last Edit: Jun 3rd, 2010, 8:20am by ThudnBlunder » IP Logged

THE MEEK SHALL INHERIT THE EARTH.....................................................................er, if that's all right with the rest of you.
SWF
Uberpuzzler

Posts: 879
 Re: integration   « Reply #16 on: Jun 6th, 2010, 4:40pm » Quote Modify

Thanks for noticing my absence. I kind of forgot about this site for a while and didn't have much time to work on riddles (still don't).

An analytical solution to the integral inequality seems like more work than a geometrical one. The integral is the formula for perimeter of an ellipse. Since a circle is the shape having the largest ratio of area to perimeter, for a plane figure the perimeter must be greater than or equal to sqrt(4*pi*area).

Ellipse has area pi*a*b, so this integral is greater than sqrt(4*pi^2*a*b).

Cutting the ellipse into 4 identical curves, the four pieces can be placed so their endpoints lie on the corners of a square having side sqrt(a*a+b*b). This figure has the same perimeter as the original ellipse, but a larger area: pi*a*b + (a-b)^2. Since this figure must have a lower area to perimeter ratio than a circle, the desired inequality is obtained. The inequality could be improved by arranging segments of the ellipse into an even more circle-like shape.
 IP Logged
 Pages: 1 Reply Notify of replies Send Topic Print

 Forum Jump: ----------------------------- riddles -----------------------------  - easy   - medium => hard   - what am i   - what happened   - microsoft   - cs   - putnam exam (pure math)   - suggestions, help, and FAQ   - general problem-solving / chatting / whatever ----------------------------- general -----------------------------  - guestbook   - truth   - complex analysis   - wanted   - psychology   - chinese « Previous topic | Next topic »