Efficient Integration for Physics Problem | A+Bcosx Formula

In summary, the conversation discusses the integration of a function involving A, B, and cosine, which appears to be an elliptic integral. The conversation includes a solution using Mathematica, a formula from a function calculator, and a geometric approach. It is noted that the integrand is periodic with a period of 2pi and that the constant of integration can be neglected for small values of x. It is also mentioned that if A=B, the integral can be simplified.
  • #1
Phizyk
25
0
Hi,
How can I integrate this
[tex]\int_{0}^{2\pi}\frac{A+Bcosx}{\sqrt{A^{2}+B^{2}+2ABcosx}}dx[/tex]
Thanks for help.
 
Physics news on Phys.org
  • #2
isn't that an elliptic integral?
 
  • #3
is it just a coincidence that the bottom is 1 sign away from being the law of cosines?

here's the soln mathematica gives me.

for some values there is an integral where E and K are the ellipticE and ellipticK fns and the funky R and E or Z or w/e it is are Real part and Imaginary Part respectively.

[tex]

\text{If}\left[\Re\left((A-B)^2\right)>0\land
\Re\left((A+B)^2\right)>0\land
\left(\Re\left(\frac{A}{B}+\frac{B}{A}\right)\geq 2\lor
\Re\left(\frac{A}{B}+\frac{B}{A}\right)\leq -2\lor
\Im\left(\frac{A}{4 B}+\frac{B}{4 A}\right)\neq
0\right)
[/tex]
[tex]
\frac{\sqrt{(A+B)^2} E\left(-\frac{4 A
B}{(A-B)^2}\right) (A-B)^2+(A+B) \left(\sqrt{(A-B)^2} (A+B)
E\left(\frac{4 A B}{(A+B)^2}\right)+(A-B)
\left(\sqrt{(A+B)^2} K\left(-\frac{4 A
B}{(A-B)^2}\right)+\sqrt{(A-B)^2} K\left(\frac{4 A
B}{(A+B)^2}\right)\right)\right)}{A \sqrt{(A-B)^2}
\sqrt{(A+B)^2}}
[/tex]

apparently for some values there is no integral

[tex]
\text{Integrate}\left[\frac{A}{\sqrt{A^2+2 B
\cos (x) A+B^2}}+\frac{B \cos (x)}{\sqrt{A^2+2 B \cos (x)
A+B^2}},\{x,0,2 \pi \},\text{Assumptions}\to
\left(\Im\left(\frac{A}{4 B}+\frac{B}{4 A}\right)=

[/tex]
[tex]0\land
-2<\Re\left(\frac{A}{B}+\frac{B}{A}\right)<2\right)\lor
\Re\left((A-B)^2\right)\leq 0\lor \Re\left((A+B)^2\right)\leq
0\right]\right]

[/tex]
 
Last edited:
  • #4
ice109 said:
is it just a coincidence that the bottom is 1 sign away from being the law of cosines?

Probably not. Elliptic integrals often arise in applied problems where one has to integrate an inner product in the denominator. Inner products are equal to cosines.

And again, from another viewpoint, about the sign. The whole function under the integrand is periodic w. period 2pi. Add pi to x and the cosine changes sign. Of course one then integrates from pi to 3pi instead of from 0 to 2pi or whatever.

Deacon John
 
  • #5
I used to function calculator and I received:
[tex]\int{\frac{A+Bcosx}{\sqrt{A^{2}+B^{2}+2ABcosx}}}=\frac{(B^{4}-4AB^{3}+4A^{2}B^{2})x^{5}}{5(24B^{4}+96AB^{3}+144A^{2}B^{2}+96A^{3}B+24A^{4})}-\frac{B^{2}x^{3}}{3(2B^{2}+4AB+2A^{2})}+x+O(x^{7})+C[/tex]
I think what I can neglect [tex]O(x^{7})[/tex]... Is it correct?
 
  • #6
Phizyk.
Thanks for your fascinating formula. I have no way to verify it's correctness quickly. You are correct that you can neglect O(x^7), when x is small, of course. How small? Well, at least x < 1/2, but it really depends on the value of A and B and the application. Unfortunately the constant involved in the O is not given. If it is large, x has to be smaller.
The numberator in the first term is O(x^8). The numerator in the second term is O(x^3). For A and B less than one and x small, one would expect the second erm to dominate. For A and B greater than two, the first term is likely to dominate if x is not too small, say for x greater than .1. However, as x gets smaller, say x< .001, the second term can be expected to dominate for single digit values of A and B. This line of reasoning says that there is a real danger that the constant in O(x^7) is a real concern. More specifically, the constant in O(x^7) can expected to be within an order of magnitude of the constant in the first two terms. That is because this is probably a rational function approximation (see Abrahamowitz and Stegen) or something like that and that is how they work.

A remark for beginners: the constant C at the end is just the constant of integration.

Deacon John
 
  • #7
So, we can not integrate this... But if A=B, we have
[tex]\int{\frac{cos^{2}\frac{x}{2}}{|cos\frac{x}{2}|}}dx[/tex]
and it can be simple integrate...
 
  • #8
ice109 said:
is it just a coincidence that the bottom is 1 sign away from being the law of cosines?

No coincidence … it's a very simple geometric problem …

Draw a circle of radius A, centre at the origin O = (0,0).

Define P = (-B,0).

Then, for any point Q on the circle, if θ is the angle between OQ and the x-axis, and φ is the angle between PQ and the x-axis,

the integral is ∫cosφ dθ. :smile:

(and if A = B, then φ = θ/2)
 
  • #9
tiny-tim said:
No coincidence … it's a very simple geometric problem …

Draw a circle of radius A, centre at the origin O = (0,0).

Define P = (-B,0).

Then, for any point Q on the circle, if θ is the angle between OQ and the x-axis, and φ is the angle between PQ and the x-axis,

the integral is ∫cosφ dθ. :smile:

(and if A = B, then φ = θ/2)

Very nice. Thanks.
 
  • #10
This is a brilliant solution. Thanks for all...
 

What is an integral in physics?

An integral in physics is a mathematical concept used to calculate the area under a curve on a graph. It is often used to determine the displacement, velocity, or acceleration of an object over a given time period.

Why is integration important in physics?

Integration is important in physics because it allows us to analyze the motion and behavior of objects in a more precise and accurate way. It also helps us to understand the relationship between different physical quantities and how they change over time.

How do you solve an integral in a physics problem?

To solve an integral in a physics problem, you must first identify the variables and their relationships. Then, you can use the appropriate integration techniques, such as substitution or integration by parts, to solve for the desired quantity.

What are the different types of integrals used in physics?

There are several types of integrals used in physics, including definite and indefinite integrals, line integrals, surface integrals, and volume integrals. Each type is used to solve different types of problems and can be applied to various physical concepts.

How does integration relate to differentiation in physics?

Integration and differentiation are inverse operations in physics. Differentiation is used to find the rate of change of a quantity, while integration is used to find the total change over a given time period. They are both essential tools in understanding the behavior and properties of physical systems.

Similar threads

Replies
4
Views
347
Replies
2
Views
287
  • Calculus
Replies
29
Views
716
Replies
3
Views
1K
Replies
12
Views
1K
Replies
1
Views
934
  • Calculus
Replies
9
Views
806
Replies
1
Views
936
  • Calculus
Replies
1
Views
1K
Back
Top