Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

We just want b and c to be non-zero. Maybe something like Boole[b!=0 AND c!=0], or define the integrand as a piecewise function taking 0 whenever b or c are 0.

**LearnMathsFree: Videos on various topics.New: Integration Problem | Adding FractionsPopular: Continued Fractions | Metric Spaces | Duality**

**Online**

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Just not zero?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

Yes, b,c non-zero is the only restriction on b,c in this case.

**LearnMathsFree: Videos on various topics.New: Integration Problem | Adding FractionsPopular: Continued Fractions | Metric Spaces | Duality**

**Online**

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

I remember this, there is also the restriction of b ≠ x and c ≠ y

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

That may be necessary. If the Bessel functions are too difficult it is possible to replace them with cosines.

**LearnMathsFree: Videos on various topics.New: Integration Problem | Adding FractionsPopular: Continued Fractions | Metric Spaces | Duality**

**Online**

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Do you have one to see?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

The first term in the asymptotic expansion of is:

so we can write the expression as looking like:

ignoring all the constants.

Unfortunately Mathematica has a lot of trouble just trying to evaluate this integral for given b,c, so the sum looks hopeless.

*Last edited by zetafunc (2016-11-25 10:06:42)*

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

**Online**

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

What did you use to get that asymptotic form for the Bessel function?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

I looked it up in my supervisor's copy of Gradshteyn and Ryzhik. There is a version involving sin as well

Unfortunately, neither version is workable. I cannot even compute the integral over [1,2], putting b = c = 10, say.

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

**Online**

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Can you post the commands? My typing skills are notoriously bad.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

Here is what the integral looks like in Mathematica over [1,2]*[1,2], not including the sum and putting the values b = c = 100 in.

```
Integrate[(Cos[Sqrt[x^2 + y^2] - 3*Pi/4]*
Cos[Sqrt[(100 - x)^2 + (100 - y)^2]])/((((x^2 + y^2)^(3/
4)))*((100 - x)^2 + (100 - y)^2)^(3/4)), {x, 1, 2}, {y, 1,
2}]
```

I've been running that all day and have not got anything though.

*Last edited by zetafunc (2016-11-26 09:02:02)*

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

**Online**

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Okay, thanks for posting that.

You can get a quick answer for this.

```
NIntegrate[
NIntegrate[(
Cos[Sqrt[x^2 + y^2] - (3 \[Pi])/4] Cos[
Sqrt[(100 - x)^2 + (100 - y)^2]])/((x^2 + y^2)^(
3/4) ((100 - x)^2 + (100 - y)^2)^(3/4)), {x, 1, 5}], {y, 1, 5}]
```

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

How long did it take you to get something with that?

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

**Online**

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

A couple of seconds.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Okay, try this instead:

```
NIntegrate[(Cos[Sqrt[x^2 + y^2] - 3*\[Pi]/4]*
Cos[Sqrt[(100 - x)^2 + (100 - y)^2]])/((((x^2 + y^2)^(3/
4)))*((100 - x)^2 + (100 - y)^2)^(3/4)), {x, 1, 5}, {y, 1,
5}]
```

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

Thanks, this works very well. The question is how to get this to combine this with the sum. Going to try and see what NSum does.

EDIT: Sorry, didn't notice your post just now. I managed to get your original code (with the nested NIntegrates) to work after closing Mathematica fully.

*Last edited by zetafunc (2016-11-26 09:38:02)*

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

**Online**

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

That is going to be another problem, could get very ugly.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

It looks like Mathematica struggles more with values very close to b,c = 0.

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

**Online**

```
NIntegrate[
NIntegrate[(Cos[Sqrt[x^2 + y^2] - (3 \[Pi])/4] Cos[
Sqrt[(1 - x)^2 + (1 - y)^2]])/((x^2 + y^2)^(3/
4) ((1 - x)^2 + (1 - y)^2)^(3/4)), {x, 1, 1000}], {y, 1,
1000}]
```

produced 1.13796 in 89.72 seconds.

And here is what happens when trying a sum over one variable.

```
NSum[NIntegrate[
NIntegrate[(Cos[Sqrt[x^2 + y^2] - (3 \[Pi])/4] Cos[
Sqrt[(b - x)^2 + (10 - y)^2]])/((x^2 + y^2)^(3/
4) ((b - x)^2 + (10 - y)^2)^(3/4)), {x, 1, 1000}], {y, 1,
1000}], {b, 10, 12}]
```

produced 0.655201 in about 50 seconds. And that is with just 1 variable summed over 3 terms.

Currently running a double NSum with a double NIntegrate and that is producing lots and lots of errors, several of which include the words "catastrophic loss of precision".

EDIT:

```
NSum[NSum[
NIntegrate[
NIntegrate[(Cos[Sqrt[x^2 + y^2] - (3 \[Pi])/4] Cos[
Sqrt[(b - x)^2 + (c - y)^2]])/((x^2 + y^2)^(3/
4) ((b - x)^2 + (c - y)^2)^(3/4)), {x, 1, 10}], {y, 1,
10}], {b, 1, 10}], {c, 1, 10}]
```

produced 3.05475*10^16 in about 395 seconds.

*Last edited by zetafunc (2016-11-26 09:50:53)*

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

**Online**

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

For values that cause forms like /0 there will be big problems.

My revised post only uses one NIntegrate and gets faster results.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

```
NSum[NIntegrate[(Cos[Sqrt[x^2 + y^2] - 3*\[Pi]/4]*
Cos[Sqrt[(b - x)^2 + (c - y)^2]])/((((x^2 + y^2)^(3/
4)))*((b - x)^2 + (c - y)^2)^(3/4)), {x, 1, 10}, {y, 1,
10}], {b, 1, 10}, {c, 1, 10}]
```

works a lot better and yielded 4.02468 in 16 seconds, surprisingly.

```
NSum[NIntegrate[(Cos[Sqrt[x^2 + y^2] - 3*\[Pi]/4]*
Cos[Sqrt[(b - x)^2 + (c - y)^2]])/((((x^2 + y^2)^(3/
4)))*((b - x)^2 + (c - y)^2)^(3/4)), {x, 1, 50}, {y, 1,
50}], {b, 1, 20}, {c, 1, 20}]
```

produced 3.72777 in 45.49 seconds.

```
NSum[NIntegrate[(Cos[Sqrt[x^2 + y^2] - 3*\[Pi]/4]*
Cos[Sqrt[(b - x)^2 + (c - y)^2]])/((((x^2 + y^2)^(3/
4)))*((b - x)^2 + (c - y)^2)^(3/4)), {x, 1, 500}, {y, 1,
500}], {b, 1, 20}, {c, 1, 20}]
```

produced 4.23585 in 198.92 seconds.

*Last edited by zetafunc (2016-11-26 10:02:02)*

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

**Online**

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

It might be alternating.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

It does seem that way, especially when varying rho. And that would make sense (this is how the remainder behaves in the Gauss circle problem).

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

**Online**

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Alternating series have the Leibniz property and they can be bounded.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

Leibniz property?

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

**Online**