Double integral of a Log (natural)

In summary, the homework statement is trying to find the integral over the rectangle [-a,a] in u and [-b,b] in v using Mathematica, but the constants a and b are positive (and non-zero), and the variables x and y are in Reals. Different integrals are used depending on whether v or u is integrated first. Under certain conditions, the definite double integral diverges.
  • #1
Mbert
64
0

Homework Statement


I wish to find the following integral over the rectangle [-a,a] in u and [-b,b] in v using Mathematica. The constants a and b are positive (and non-zero). The variables x and y are in Reals.

[tex]A(x,y)=\int_{-a}^a{\int_{-b}^b{\log{\left[(u-x)^2+(v-y)^2\right]}{\rm d}v}{\rm d}u}[/tex]

Homework Equations



see above

The Attempt at a Solution



I find using Mathematica a different integral depending if I integrate on u or v first. I use the following code:

To integrate on v first:
Code:
Integrate[Log[(u - x)^2 + (v - y)^2], v]
(% /. v -> b) - (% /. v -> -b)
Integrate[%, u]
(% /. u -> a) - (% /. u -> -a)

To integrate on u first:
Code:
Integrate[Log[(u - x)^2 + (v - y)^2], u]
(% /. u -> a) - (% /. u -> -a)
Integrate[%, v]
(% /. v -> b) - (% /. v -> -b)

The difference between these two (definite) double integrals is:
[tex](x-y) (x+y) \left(\text{ArcTan}\left[\frac{a-x}{b-y}\right]+\text{ArcTan}\left[\frac{a+x}{b-y}\right]+\text{ArcTan}\left[\frac{b-y}{a-x}\right]+\text{ArcTan}\left[\frac{b-y}{a+x}\right]+\text{ArcTan}\left[\frac{a-x}{b+y}\right]+\text{ArcTan}\left[\frac{a+x}{b+y}\right]+\text{ArcTan}\left[\frac{b+y}{a-x}\right]+\text{ArcTan}\left[\frac{b+y}{a+x}\right]\right)[/tex]

Could someone please tell me what I am doing wrong?
 
Physics news on Phys.org
  • #2
You know, there is a relation
[tex] \arctan(\frac{1}{x}) = \frac{\pi}{2} sgn(x) - \arctan(x) [/tex]
By looking at your fractions, you will see that there is always one that is reciprocal to another. So I'm guessing that under certain conditions, you will get 0.

I'm saying under certain conditions, because I suspect the integral to diverge for -a<y<a and -b<x<b and then you can't expect to get 0 anymore, but it's just a guessing, I could be wrong, you should apply the relation and see if and when you get 0.
 
  • #3
Thank you.

Wouldn't it diverge for y=+ or - b and x=+ or - a? Why would it diverge for values in between? I think this should be defined up to the boundary and the term sgn(x) depends on which side of the boundary we are approaching the limit.
 
  • #4
Well, my idea was just that, since
[tex] \log 0 = -\infty [/tex]
the integral might diverge in case the argument of the logarithm becomes zero. And as long as [itex]-a \leq y \leq a[/itex] and [itex]-b \leq x \leq b[/itex], you have this zero in your logarithm. Anyhow, I'm not saying that it is definitely divergent. If you want to be sure, you should do the integration manually. Cheers
 
  • #5
It seems to give 2*pi inside (−b<y<b and −a<x<a) and Indeterminate on the boundary. Outside the boundary, it gives 0.
 
  • #6
Does that mean that if I am interested in the domain (−b<y<b and −a<x<a), I can just add the difference between the 2 definite double integrals (which is 2*pi*(x−y)*(x+y))? But then, if I integrate the other double integral first, the difference between them is 2*pi*(y−x)*(y+x)...

How can I make the definite double integral give the same result for (−b<y<b and −a<x<a) whether I integrate u or v first?
 
  • #7
Well, it certainly seems like there is something fishy if x,y are inside the boundary.
Can you check if you get a finite result for x,y inside the boundary?
 
  • #8
The result of both integrals inside the boundary is finite. The result inside the boundary of the difference between them is 2*pi*(x−y)*(x+y) or 2*pi*(y−x)*(y+x), depending on which is integrated first.
 
  • #9
Can you post what you got for one of the integrals?
 
  • #10
[tex]\begin{align*}A(x,y,a,b)=-12 a b &+(a-x) (b-y) \text{Log}\left[(a-x)^2+(b-y)^2\right]\\ &+(a+x) (b-y) \text{Log}\left[(a+x)^2+(b-y)^2\right]\\ &+(a-x) (b+y) \text{Log}\left[(a-x)^2+(b+y)^2\right]\\ &+(a+x) (b+y) \text{Log}\left[(a+x)^2+(b+y)^2\right]\\ &+(a-x)^2 \left(-\text{ArcTan}\left[\frac{a-x}{b-y}\right]+\text{ArcTan}\left[\frac{-a+x}{b+y}\right]\right)\\ &+(a+x)^2 \left(-\text{ArcTan}\left[\frac{a+x}{b-y}\right]-\text{ArcTan}\left[\frac{a+x}{b+y}\right]\right)\\ &-(b-y)^2 \left(\text{ArcTan}\left[\frac{b-y}{a-x}\right]+\text{ArcTan}\left[\frac{b-y}{a+x}\right]\right)\\ &-(b+y)^2 \left(\text{ArcTan}\left[\frac{b+y}{a-x}\right]+\text{ArcTan}\left[\frac{b+y}{a+x}\right]\right)\\ &+x^2\left(-\text{ArcTan}\left[\frac{a-x}{b-y}\right]-\text{ArcTan}\left[\frac{a+x}{b-y}\right]-\text{ArcTan}\left[\frac{b-y}{a-x}\right]-\text{ArcTan}\left[\frac{b-y}{a+x}\right]+\text{ArcTan}\left[\frac{-a+x}{b+y}\right]-\text{ArcTan}\left[\frac{a+x}{b+y}\right]-\text{ArcTan}\left[\frac{b+y}{a-x}\right]-\text{ArcTan}\left[\frac{b+y}{a+x}\right]\right)\end{align*}[/tex]
 
  • #11
If I integrate with respect to the other variable first, the last term is multiplied by y^2 instead of x^2.
 

Related to Double integral of a Log (natural)

1. What is a double integral of a natural logarithm?

A double integral of a natural logarithm is a type of mathematical calculation that involves taking the integral of a logarithmic function over a two-dimensional region. It is represented by the symbol ∫∫ ln(x, y) dA.

2. How is a double integral of a natural logarithm different from a regular integral?

A double integral of a natural logarithm is different from a regular integral because it involves integrating over a two-dimensional region instead of a one-dimensional interval. This means that the result of a double integral will be a number, while the result of a regular integral will be a function.

3. What types of problems can be solved using a double integral of a natural logarithm?

A double integral of a natural logarithm can be used to solve problems involving the area under a curve or the volume of a solid. It can also be used in physics and engineering to calculate moments of inertia and center of mass.

4. How is a double integral of a natural logarithm evaluated?

A double integral of a natural logarithm is evaluated using the fundamental theorem of calculus. This involves breaking down the region of integration into smaller parts and then using the properties of logarithms to simplify the integrand. The integral is then solved using standard integration techniques.

5. What are some real-world applications of a double integral of a natural logarithm?

A double integral of a natural logarithm has many practical applications. It is used in economics to model supply and demand curves, in physics to calculate the work done by a varying force, and in biology to model population growth. It can also be used in statistics to calculate probabilities and in finance to model stock prices.

Back
Top