View Full Version : another integration :)
grav
2008-Jan-28, 05:55 AM
Can anybody find the integration for
Int [dx / (a + x^2)^(3/2)] * sqrt[ (1 - b x / sqrt(a + x^2) ) / (1 + b x / sqrt(a + x^2) ) ] for -x to x, where 'a' and 'b' are constants?
I need it immensely. The integration of just Int dx / (a + x^2)^(3/2) is 2 (x/a) / sqrt(a + x^2) and I have found by running this through small increments on the computer that the larger integration above approximates [(x/a) / sqrt(a + x^2)] * (2 + 3b^2 x / a), but I would like something more precise if possible. Thanks in advance.
clop
2008-Jan-28, 06:41 AM
I tried entering
1/((a+x^2)^(3/2)*Sqrt[(1-bx/Sqrt[a+x^2]) / (1+bx/Sqrt[a+x^2])])
at http://integrals.wolfram.com/index.jsp
and got
Mathematica could not find a formula for your integral. Most likely this means that no formula exists.
clop
grav
2008-Jan-28, 06:59 AM
I tried entering
1/((a+x^2)^(3/2)*Sqrt[(1-bx/Sqrt[a+x^2]) / (1+bx/Sqrt[a+x^2])])
at http://integrals.wolfram.com/index.jsp
and got
Mathematica could not find a formula for your integral. Most likely this means that no formula exists.
clopThanks. I tried that route also. They're great for this sort of thing.
tusenfem
2008-Jan-28, 08:24 AM
Can anybody find the integration for
Int dx / (a + x^2)^(3/2) * sqrt[ (1 - b x / sqrt(a + x^2) ) / (1 + b x / sqrt(a + x^2) ) ] for -x to x, where 'a' and 'b' are constants?
I need it immensely. The integration of just Int dx / (a + x^2)^(3/2) is 2 (x/a) / sqrt(a + x^2) and I have found by running this through small increments on the computer that the larger integration above approximates [(x/a) / sqrt(a + x^2)] * (2 + 3b^2 x / a), but I would like something more precise if possible. Thanks in advance.
question: is everything under the divide or not?
Int dx (a + x2)-3/2 * sqrt[ (1 - b x / sqrt(a + x^2) ) / (1 + b x / sqrt(a + x^2) ) ]
or
Int dx {(a + x2)3/2 * sqrt[ (1 - b x / sqrt(a + x^2) ) / (1 + b x / sqrt(a + x^2) ) ] }-1
It is kind of hard to see
you might want to do a substitution, assuming sqrt(a+x^2) = S
dS = - (a+x^2)^(-3/2) x dx
don't know if that helps
grav
2008-Jan-28, 01:33 PM
question: is everything under the divide or not?
Int dx (a + x2)-3/2 * sqrt[ (1 - b x / sqrt(a + x^2) ) / (1 + b x / sqrt(a + x^2) ) ]
or
Int dx {(a + x2)3/2 * sqrt[ (1 - b x / sqrt(a + x^2) ) / (1 + b x / sqrt(a + x^2) ) ] }-1
It is kind of hard to see
you might want to do a substitution, assuming sqrt(a+x^2) = S
dS = - (a+x^2)^(-3/2) x dx
don't know if that helpsOh, sorry. It's the first one you've got there. I changed the OP accordingly to avoid further confusion.
grav
2008-Jan-28, 09:21 PM
Okay, thanks everybody. I think I've got it now. I realized I could just take the integration for the sum of symmetrical points along -x and x and then run the new integration from zero to x to get
Int [dx / (a + x^2)^(3/2)] * sqrt[ (1 - b x / sqrt(a + x^2) ) / (1 + b x / sqrt(a + x^2) ) ]
+ [dx / (a + (-x)^2)^(3/2)] * sqrt[ (1 - b (-x) / sqrt(a + (-x)^2) ) / (1 + b (-x) / sqrt(a + (-x)^2) ) ]
= Int [dx / (a + x^2)^(3/2)] * [ sqrt[ (1 - b x / sqrt(a + x^2) ) / (1 + b x / sqrt(a + x^2) ) ] + sqrt[ ( 1 + b x / sqrt(a + x^2) ) / (1 - b x / sqrt(a + x^2) ) ] ]
= Int [dx / (a + x^2)^(3/2)] * [ [ (1 - b x / sqrt(a + x^2) ) + ( 1 + b x / sqrt(a + x^2) ) ] / sqrt[ (1 - b x / sqrt(a + x^2) ) (1 + b x / sqrt(a + x^2) ) ] ]
= Int [dx / (a + x^2)^(3/2)] * [2 / sqrt[1 - b^2 x^2 / (a + x^2)] ]
= 2 Int [dx / (a + x^2)] / sqrt[a + x^2 - b^2 x^2]
= 2 Int [dx / (a + x^2)] / sqrt[a + (1 - b^2) x^2], where b is constant, so 1 - b^2 is also constant, so we will make c = constant = 1 - b^2
= 2 Int [dx / (a + x^2)] / sqrt(a + c x^2)
Wolfram says the integration of this is
2 atan (x sqrt[(1 - c) / (a + c x^2)] ) / [ a sqrt(1 - c) ]
(although I haven't checked it against my computer results yet)
Since c = 1 - b^2, this then becomes
2 atan (x b / sqrt[a + (1 - b^2) x^2] ) / (a b)
grav
2008-Jan-28, 09:42 PM
Well, I checked that last formula against my computer results and it works out very nicely indeed. I'm good to go. Thanks again, everybody. :)
Nowhere Man
2008-Jan-28, 11:10 PM
Now I remember why I hated, hated, HATED calcuseless...
Fred
grav
2008-Jan-30, 02:53 AM
Okay, I'm stuck again. Now I need the integration for
Int dx atan[ sqrt(a - x^2) / sqrt(b + x^2) ] / (c + x^2) , where a, b, and c are constants.
Help please. :confused:
grav
2008-Jan-30, 02:11 PM
If it helps, and I'm sure it will, in the result of the integration above, we will have a-x^2=0, so that might help to eliminate some rough parts of the resulting formula.
grav
2008-Feb-06, 10:02 PM
Well, I have tried to find the integration above with a few attempts at using other forms of atan, asin, and acos instead, and by expanding atan into an infinite series. I've also tried running off about fifty possible integrations that might be used in conjunction with the formula Iuv' + Iu'v = uv, as well as tearing the calculus rules inside out and upside down in order to find the derivatives that should be used with this as well, but all to no avail so far. I just keep coming up with other forms of integrations that are even rougher. I must get this. Any suggestions? Are there any other tricks I could use?
Another "simple" integration I could use to find this with is Int x atan(x/c)/[sqrt(a-x^2)*sqrt(b+x^2)].
hhEb09'1
2008-Feb-07, 07:44 AM
Another "simple" integration I could use to find this with is Int x atan(x/c)/[sqrt(a-x^2)*sqrt(b+x^2)].I just want to say, this makes my day :)
Keep up the good work grav!
grav
2008-Feb-07, 08:46 PM
Another "simple" integration I could use to find this with is Int x atan(x/c)/[sqrt(a-x^2)*sqrt(b+x^2)].
I just want to say, this makes my day :)
Keep up the good work grav!
Thanks, hh. You'll notice I can now say I found a "simple" integration these days, as compared to a simple "integration" :), thanks to you and Richard.
Of course, that integration should really be Int x atan(x/sqrt(c))/[sqrt(c)*sqrt(a-x^2)*sqrt(b+x^2)], as I'm sure you know, but I was trying to make things easier on the reader. If the integration for Int atan(x/c)/[sqrt(a-x^2)*sqrt(b+x^2)] were found, all I would have to do then, since 'c' is a constant, would be to replace any c's in the result with sqrt(c), and then divide the entire thing by sqrt(c) to get my answer.
That is the only result I have achieved so far that looks like it may be simpler than the original, but all I've been doing so far, it seems, is replacing one form of integration with another. I got them by using the formulas you posted in what I now refer to as "the calculus thread". I started that one with
I uv' = uv - I u'v
u = atan(sqrt(a-x^2)/sqrt(b+x^2))
v' = 1/(c+x^2)
v = atan(x/sqrt(c))/sqrt(c)
u = F(G(x)) with the chain rule
F(x) = atan(x) , G(x) = sqrt(a-x^2)/sqrt(b+x^2)
F'(x) = 1/(1+x^2)
G(x) = F2(x)G2(x) with the product rule
F2(x) = sqrt(a-x^2) , G2(x) = 1/sqrt(b+x^2)
F'2(x) = -x / sqrt(a-x^2) , G'2(x) = -x / sqrt(b+x^2)^3
G'(x) = F'2(x)G2(x) + F2(x)G'2(x)
= [-x / sqrt(a-x^2)][1/sqrt(b+x^2)] + [sqrt(a-x^2)][-x / sqrt(b+x^2)^3]
= [-x(b+x^2) - x(a-x^2)] / [sqrt(a-x^2)*sqrt(b+x^2)^3]
= -x(a+b) / [sqrt(a-x^2)*sqrt(b+x^2)^3]
u' = F'(G(x))G'(x)
= [1 / (1 + (a-x^2)/(b+x^2))][-x(a+b) / [sqrt(a-x^2)*sqrt(b+x^2)^3]
= [(b+x^2) / (a+b)][-x(a+b) / [sqrt(a-x^2)*sqrt(b+x^2)^3]
= -x / [sqrt(a-x^2)*sqrt(b+x^2)]
and finally, I uv' = uv - I u'v, so
I atan(sqrt(a-x^2)/sqrt(b+x^2)) / (c+x^2)
= atan(sqrt(a-x^2)/sqrt(b+x^2))* atan(x/sqrt(c)) / sqrt(c)
+ I x atan(x/sqrt(c)) / [sqrt(c)*sqrt(a-x^2)*sqrt(b+x^2)]
I have actually worked out some final results for the integrations, however, but they involve ellipticals, as well as complex numbers due to the sqrt(a-x^2) part. It looks like this is all I'm going to keep getting for this. I could probably work through one or the other, but I'm not sure about both. I'll need help. You seem to know a thing or two about working through complex numbers. Learning the ellipticals would probably help with that gravity along the plane of a disk thing I still want to get too, though. I guess I'll start over and work through it some more and just try to find whatever result looks like it might be the easiest to work with, whether elliptical or complex or both, and go from there. I'll post it as soon as I have something feasible.
grav
2008-Feb-09, 04:33 PM
I think I thought I had worked out some not so threatening looking integrations with ellipticals and complex numbers, but the thing is, even after I do that for v, integrating form I uv' to uv - I u'v, I still would have to multiply that by the derivative of the rest of the original formula, u' in I u'v, and then take the integration of that to get my result. So I would have to find some simple (yeah, right) integration involving ellipticals and complex numbers, then integrate that again along with the other derivative, before I can even begin to try to reduce it back down. Um, no. It's not going to happen.
The alternative is to take the expanded infinite series for atan and work through the results of that one by one. I do get results when I do that, again involving ellipticals and complex numbers for each term, of course, but somehow the idea of working through an infinite series of a few different kinds of ellipticals, which themselves become infinite series, so its like an infinite series to the fourth power or something, with complex numbers to boot, doesn't quite get it for me either, and I don't guess I should expect anyone else to help me work through such a monster.
I may have some other tricks up my sleeve, though. I'll keep working on it.
grav
2008-Feb-09, 06:16 PM
Well, I didded it. :dance: I started back with the result of the integration in post #6, 2 atan (x b / sqrt[a+ (1 - b^2) x^2]) / (a b) . After replacing the values for the constants and working through it for the next dimension, I get the next integration I posted, Int dx atan[sqrt(a-x^2) / sqrt(b+x^2)] / (c+x^2) . The thing there is that it was reduced from atan / (c+x^2) , which became atan[b sqrt(a-x^2) / sqrt(a + c - b^2(a-x^2))] / (c+x^2) = atan[ sqrt(a-x^2) / sqrt((a+c)/b^2 - a + x^2)] / (c+x^2) , at which point I just made b' = (a+c)/b^2 - a , which then gives atan[sqrt(a-x^2) / sqrt(b' + x^2)] / (c+x^2) , which is what I've since been trying to work through.
Keeping the original integration wouldn't fare much better either, though, except for one thing. The constant 'b' here is a constant that remains constant throughout the entire integration in all three dimensions. It retains a constant numerical value that is something less than say, 1/(10^5), very small (I probably should have mentioned that before). So if we were to take the first few terms of atan, leaving b in the numerator, we would get
atan(x) = x - x^3/3 + x^5/5 - ...
= b sqrt(a-x^2) / sqrt(c + x^2 + (1-b^2)(a-x^2))
- [b sqrt(a-x^2) / sqrt(c + x^2 + (1-b^2)(a-x^2))]^3/3
+ [b sqrt(a-x^2) / sqrt(c + x^2 + (1-b^2)(a-x^2))]^5/5
- ...
Now here one can see that the b falls out with b, b^3, b^5, etc. Also, 'a' involves the radius of a sphere while c involves the distance of an object from that sphere, so the rest of atan is less than 1. So if we just take the first term for atan in this instance, and drop the rest of the terms, with b less than 1/(10^5), then the second term would only contribute about 1/(10^10) as much as the first anyway, so the margin of error for the integration would be very small indeed, by only about one part in 10^10, and the third term only one part in 10^20, so using just the first term is plenty good enough for my purposes.
That much in itself doesn't still quite get it, though. But if we were to take the part of the square root in the denominator of atan we had above, leaving b in the numerator, and work through it like so,
sqrt(c + x^2 + (1 - b^2)(a - x^2))
= sqrt(c + a - b^2(a - x^2))
= sqrt(a+c) * sqrt(1 - b^2(a-x^2)/(a+c))
we can now let the square root itself fall out, since b is very small, to
= sqrt(a+c) * (1 - b^2(a-x^2) / [2(a+c)])
Since b is about 1/(10^5) and (a-x^2) / [2(a+c)] is also less than 1 (a and c are both squares and positive) , the margin of error for this will also be less than 1 part in about 10^10, only about doubling the previous margin of error.
So the new integration, then, to a margin of error of at least less than one part in a billion or so for b=1/(10^5), is now
[b]Int dx sqrt(a-x^2) /[(c+x^2) (2(a+c) - b^2(a-x^2)) ]
which gives a nice and neat integration of
atan[x sqrt(a+c) / (sqrt(c) sqrt(a-x^2))] / [(2-b^2) sqrt(c) sqrt(a+c)] + atan[x sqrt(2) sqrt(a+c) / (sqrt(a-x^2) sqrt(-a b^2 +2a +2c))] / [(b^2-2) sqrt(-ab^2/2 + a + c) sqrt(a+c)]
Well, nice and neat in the fact that it doesn't involve ellipticals and such. Okay, we're on our way. Only one more dimension to account for. :)
grav
2008-Feb-09, 09:27 PM
Uh oh. I just realized that since I am trying to find for an integration for gravity to the second order, something along the lines of 1 + 3 b^2 greater than classical gravity, the second order there will pretty much exactly match my margin of error. So I will have to start over with what I just did in the last post and bring atan and the square root out to the second term each to compensate for what I need for this. Geez. Fun, fun. :wall:
clop
2008-Feb-09, 10:37 PM
Yeah, I didn't want to say anything.
grav
2008-Feb-10, 12:23 AM
Yeah, I didn't want to say anything.
Feel free. I can use all the help I can get. :)
grav
2008-Feb-10, 09:41 PM
Okay, I tried to bring the square root out to three terms, but then I couldn't get the integration anymore. I attempted it various ways, but I finally did find a way to do that though, using the Euler series for atan, which would put the square root in the numerator instead of the denominator, where I would then have to bring atan out to four or five terms terms for Euler, because it only falls with b instead of b^2, and then do the integrations separately for each order of atan and the square root, then add them all together.
I will probably still do it that way later to check my results, although it will probably be long and drawn out, but I realized something when I was thinking about what the the margin of error would be for the Euler series between four and five terms. That is that what I had for the square root in the first place was plenty. The first and second terms will bring it out to the order of 1 and b^2, the third to b^4. But all I need for now is something on what I expect to be the order of 1 + 3b^2, so the first two terms for that are enough. The third term would still only vary by a margin of error of b^2 from the second term of what I'm expecting, or b^4 overall. Thank goodness. So it is only the atan that needs to be brought to the second term. That will give it a degree of 1 and b^2 also, varying only by the next term of b^4. In other words, I'm looking for a result that I expect to be of two orders that vary by b^2 from each other, so I need two orders of atan and the square root, each of which also vary by b^2 for each order, so the difference for each on the third order is my margin of error, that of a difference of b^2 from the second order.
grav
2008-Feb-11, 05:38 PM
Okay, so here we go. I find that the square root must be extended first, before the atan. We can't cube the square root for the second term of atan and then extend only the square rooted part that is left, or at least I haven't been able to and receive a result. So the integration becomes
Int dx sqrt(a-x^2) * 2 sqrt(a+c) / (2(a+c) - b^2 (a-x^2)) / (c+x^2) for the first term of atan
- Int dx b^2 sqrt(a-x^2)^3 * 8 sqrt(a+c)^3 / (2(a+c) - b^2 (a-x^2))^3 / (c+x^2) / 3 for the second.
Those two give some semi-tough looking integrations, full of atans and algebra, except for the fact that a-x^2 = 0 in the result, which luckily cancels out most of the second integration and makes all of the atan's = +/- pi/2, depending upon the value of x. Also, it turns out that the whole thing becomes factored by +/- pi/2, and the rest of the result is all constants, so when finding for x = r and x = -r, it becomes just the constants multiplied by 2( pi / 2), only doubling the value of pi/2 times the constants. This is understandable because the dimension I am finding for this time is symmetrical in both directions to the object and the body we are finding for. My only fear so far was that the first order might drop off, leaving just the second order, which would then become my first order, and my margin of error, in which case I would have to start over and extend atan and the square root further, but so far this can't happen with a symmetrical dimension that just multiplies by 2 for the integration.
The result of the entire integration reduces to
[2 (pi/2) / (2-b^2)] [1/sqrt(c) - 1/sqrt(a+c-ab^2/2) + (b^2 / 12(2-b^2)^2) (-16/sqrt(c) + (3a^2 (b^2+8)^2 + 80ac(2-b^2) + 64c^2)/ (4 (a+c-ab^2/2)^(5/2)))]
= [pi / (2-b^2)] [(1 - 4b^2 / 3(2-b^2)^2) / sqrt(c) - 1/sqrt(a+c-ab^2/2) + a^2 b^4 / (16 sqrt(a+c-ab^2/2)^5) + (3a^2 (2-b^2)^2 + 10ac(a-b^2) +8c^2) b^2 / (6 (2-b^2)^2 sqrt(a+c-ab^2/2)^5)]
= [pi / (2-b^2)] [(1 - 4b^2 / 3(2-b^2)^2) / sqrt(c) - 1/sqrt(a+c-ab^2/2) + a^2 b^4 / (16 sqrt(a+c-ab^2/2)^5) + (a (2-b^2) + 2c)(3a (2-b^2) +4c) b^2 / (6 (2-b^2)^2 sqrt(a+c-ab^2/2)^5)]
grav
2008-Feb-11, 06:29 PM
I brought out the constants in the above integration and separated it into four parts. The first two give simple results for the final dimension. The last two are pretty long, but include nothing except regular algebra and log. I can work with that. Nothing seems to reduce too much, though, except for a square root in log where r^2 - x^2 = 0 for the last integration, so the rest comes out to an even square, so can be brought out from the square root. I don't know if it should be a + or - result, though, so I'll have to try it both ways and see which one gives me a result for precession that matches what it should be. Also, this last dimension is along the same axis as that of the body and object, so it's entirely possible that the first order might cancel out along it. But if the result is a match for precession, I'll be confident that it hasn't. If it has, I'll try extending atan using Euler for that second integration to bring it out further.
What I guess I'll do at this point is to write the entire result for all four parts of the last integration into a program where I can put in the values for b, R, and r, and find for x = r minus x = -r to find my answers for this. I have worked out the vectors, way before I even started these integrations, for an object moving tangent to a body, as in a circular orbit, and also for a spinning body. It took as long to do that as this did. It turns out that the integration for each is the same, the one we just performed, and only a constant value for b for each is necessary. It will provide an additional gravity on the object toward the body in each case, regardless of which way the object is moving or the body is spinning. The only difference will occur if the object is moving and the body spinning at the same time, in which case we can still use this same integration to find the result for that as well, where we would have just b = b1 - b2 for the object moving in the same direction the body is spinning and b = b1 + b2 if they are moving in opposite directions. If I'm lucky, it may provide solutions for precession, MOND, and galaxy rotation speeds. For galaxy rotation along a disk, I would perform the same integration using the same tricks and approximations, but for two dimensions only, so it might even be simpler now than what I've been trying to do for that for a while now. I wanted to find for gravitational lensing and binary star orbital decay, but the value for b would be too great to use for lensing with the approximation found with the stipulation that b is very small, and I might need to know the rate of rotation of the stars to find their precise rate of decay, I'm not sure yet. I will post in ATM when I am done.
mugaliens
2008-Feb-11, 06:29 PM
Now I remember why I hated, hated, HATED calcuseless...
Fred
HA! Good one!
I cracked myself up over trying to pronounce calcuseless! It's not easy...
grav
2008-Feb-12, 05:20 AM
Well, I've worked out that last integration and all, but there's something I don't understand. The log in the result has a negative value, giving a complex result. At first I thought the results from the four separate integrations might cancel each other out, but I've finally worked it out in such a way that there is only algebra and one log present. I don't see how I'm getting a complex result when there's nothing that I can see in the integration itself that would warrant it. Does anyone know why that would be? It may be some kind of strange fluke thing, determined by the type of integration itself or something. I'll see if I can work it out another way.
Oh, yeah, from my last post, the main reason I wouldn't be able to use this for the decay of binary star systems, actually, is that the vectors would also be different. I couldn't just find the extra gravity toward a body, since that would only precess an otherwise stable orbit. I would have to find the amount of acceleration of gravity in the line of motion of the orbitting object, and then simulate that progression to observe the amount of decay. Even if I work out the vectors, the amount of decay would be too small for the simulation to pick up over any decent increments of time. I've already tried. I may try again in the future, though.
grav
2008-Feb-12, 10:06 PM
Well, I've worked out that last integration and all, but there's something I don't understand. The log in the result has a negative value, giving a complex result. At first I thought the results from the four separate integrations might cancel each other out, but I've finally worked it out in such a way that there is only algebra and one log present. I don't see how I'm getting a complex result when there's nothing that I can see in the integration itself that would warrant it. Does anyone know why that would be? It may be some kind of strange fluke thing, determined by the type of integration itself or something. I'll see if I can work it out another way.Okay, things are really getting weird. I've noticed that the negative value in the log not only makes the result complex, but that it also reduces to a unit of length within it. I could see if the units cancelled out within a function like that, as they usually do, leaving only a numerical value, but how do you find the log of a meter? There is nothing wrong with the integration, but no matter how I rearranged it, it would give me the same log to contend with, 99 percent of the time. But I finally lucked out. I simply left the integration the same and changed b^2/2 to 1/a. The strange thing about that is, if I left the 1/2 part and made 1/a = b^2, or made a = b^2, or used any variables much higher than a (a, b, and c work out), then I would get the same log in the result every time. But with a=2/b^2, suddenly I get atan instead, with only a numerical value within it. Of course, that's a good thing though, that I was finally able to get something like that. Oh, but I forgot to mention, I had to make the integration complex for it to work out that way as well, by switching all of the signs within the square rooted part to the opposite value. Um, yes, I did quite a bit of experimenting to get this. I'm glad that messing around with how the integration is input in slightly different ways will give me different results sometimes, so that I can find the one I need, which is kind of nifty, but it is also a tad bit confusing.
Anyway, as I said, I finally did get a result, one that involves atan instead of log, involving just a numerical value (I've noticed that their expanded series are almost identical). I then have to multiply the whole result by i, though, since I reversed the signs in the square root, but multiplying the integration by i resolves that, making it real again, and i is a constant, so can be multiplied back in after the fact. The part within atan also becomes complex in the result, but I figure i atan(ix) expands out to i [ix - (ix)^3/3 + (ix)^5/5 - ...] = i [ix - ix^3/3 + ix^5/5 - ...] = i^2 [x - x^3/3 + x^5/5 - ...] = -atan(x) .
So I've finally got the third integration, again. I've worked it out this time so that the final integration can be carried to three orders of b^2 as well. That way, even if the first order drops off along the final dimension, which lies along the line between the body and the object, I will still have the other two, so my margin of error is still safe. I guess so far everything is finally as it should be. I'll write the result into a program now and see what it gives me.
grav
2008-Feb-13, 02:17 PM
Okay, now I'm just getting frustrated. Below I have a couple of simple versions of examples of what I have been trying to do. In those, x=-r to r, r=radius of sun, s= distance from sun, b= very small numerical constant, a=2/b^2. Most of the ways I try to do it, I get log like that in the first view. One will notice the negative units of length contained within it, which becomes complex when worked out. The second view is for the only way I have been able to receive atan so far, containing only numerical units, by making the square root part complex and using some small variable for 2/b^2 only, but the first part of that contains a multiple of a^6, then a^5, then a^4, and so on. Since 'a' is so large, where a=2/b^2, then only the first couple of parts are significant. But I've run this thing through a couple of times, and written it into the computer as well, and it gives me a result that is about a^3 times too large. When I run the integration itself for small dx in a program, though, I get what I'm supposed to, which is very different from the result shown below. There's nothing in the integration itself that should cause this, as far as I can see, but that's what the result gives. Why? What's going on here?
grav
2008-Feb-14, 05:07 AM
Well, I still don't understand those results, but I think I may have come up with a couple of ways to "trick" the Integrator. First of all, if I want to get the units of length out of log, then I just divide all of the variables that include length by R, to get a numerical ratio instead, whereby the integration has no choice but to give me a numerical value in any function involved. I used to do that for my calculations anyway; I guess I need to get back in the habit. So R becomes just 1, r becomes r/R, and I find x from -r/R to r/R. Simple, really, now that I've finally thought about doing it that way, after all this time. :doh:
The other thing I've been getting is results that are way too high for some reason or another, on the order of a^3 or b^6, probably because of the way the integration is performed with b so small. I've noticed that some formulas for the infinite series of various functions depend upon whether what is being found for is greater or lesser than 1, most applied for greater than 1, or less than -1, but won't work out otherwise. b is much less than 1, but greater than zero, and so I figure the integration is probably using a different integration than what I need for this. I want to keep this from happening, at least where b is involved, and it seems to have been resolved so far by using the variable g = 1 - b^2/2 or g = 2 - b^2 instead. That way, even if g is brought up to many powers, it still won't amount to much, so the integration should basically just apply to the rest of the variables that I'm trying to find for.
grav
2008-Feb-14, 05:10 PM
Aargh. I forgot about the negative value in the log thing, giving me a complex value for the result. Even after I use the couple of tricks mentioned above, I've still got to contend with that. Obviously, then, the integration is using a different formula than what I need for it. Something for when the original value for some part of it is higher or lower than something like 1 when mine is the other way around. I'm so so close, yet so far away. I've got all of the vectors worked out, and the first two integrations, the second to two terms, since it is symmetrical, and the third and final integration worked out to three terms, in case the first drops off along that one, and I've even got the first order of the third integration done; I just need what is left of it, and it is for the smaller terms, on the second and third orders. Apparently, it's not going to give me that last little bit with any of the ways I've been doing it with log or atan, since it seems to be using something different than what I need for that, so I'll have to find some other way through the last leg.
grav
2008-Feb-16, 04:31 AM
After trying about every trick I could conjure up, and beginning again and again from the start, applying everything I could think of, I finally had to pull out my trump card, and I think I've finally completely got it now. I didn't want to do what I did unless I absolutely had to, because I thought it would severely limit my range for b, but it turns out it's not quite as bad as I had thought it would be, but could still be better.
First, though, I want to make a couple of corrections to my earlier posts. For one, that second trick I had, where I used g = 2 - b^2 instead of b to attempt to get rid of the large results I was getting in terms of 1/b^3 for some reason. Well, the Integrator tricked me back. It just used sqrt(2 - g) in place of b, which of course amounts to the same thing as I originally had. The second correction is where I said that atan(x) = x - x^3 + x^5/5 - x^7/7 + ... , so i atan(ix) is equal to i (ix - (ix)^3/3 + (ix)^5/5 - (ix)^7/7 + ... ) = i (ix - ix^3/3 + ix^5/5 - ix^7/7 + ... ) = i^2 (x - x^3/3 + x^5/5 - x^7/7 + ... ) = - atan(x) . That should have been i atan(ix) = i (ix - (ix)^3/3 + (ix)^5/5 - (ix)^7/7 + ... ) = i^2 x - (i^4 x^3)/3 + (i^6 x^5)/5 - (i^8 x^7)/7 + ... = -x -x^3/3 - x^5/5 - x^7/7 - ... , which only appears to work for -1<x<1, though. Anything else gives some other real number plus (pi/2)i .
So back to the trump. I've attempted everything else in the book, really, my book at least. That last little bit was doing its darnest to mess me up, with the square root in the denominator, and I used the same methods for it that I used before, but they weren't working for me this time. I realized that even though I was trying to bring this last integration out to three terms in case the first one dropped off, I already had it to the first order, so I only needed to bring the square root out to two terms for the rest of it, since I was starting with the second term to begin with at that point, but it still wasn't cooperating. I went back and tried various other ways from the very beginning with the first integration up, but it was still a no-go.
So I finally decided to go with the ratio of r to R in the square root. I already had the stipulation that b was very small. The thing there is that b doesn't actually have to be extremely small if my result is to the order of b^2 as expected, because it will still be to that order regardless of what b is, but if b is 1/10^5, then I will get about an extra ten digits past the actual value I need, and if it is b = 1/10^2, for instance, I will get only four extra digits between the result and the margin of error. So the smaller b is, the better.
With the extra stipulation that r/R is very small, I figured that would limit me too much. But as long as r/R is smaller than b^2, then it is all the same ballgame, with the same margin of error for b^2. Now, for an orbitting object, we would have b = v/c, and it just so happens that for an orbitting object, 1/R is directly proportional to v^2, regardless of R. So r/R will always be directly proportional to b^2 regardless of the distance. So that works out very nicely. The only question remaining, then, is whether r/R is less than b^2 = (v/c)^2. Well, we have
GM = v^2 R
GM / (R c^2)= (v/c)^2
GM (r/R) / (r c^2) = (v/c)^2
r/R = (v/c)^2 [(r c^2) / GM]
and so if we want r/R < (v/c)^2 , then we would have to have (r c^2) / GM < 1 . The problem with that is that this won't happen unless the gravitating body is pretty much a black hole. Isn't that just the breaks? It would have been nice if it had been the other way around, using the inverse of that, and worked for everything except black holes, but let's not make things too easy on ol' grav now, shall we? I almost feel like gravity, relativity, mathematics, and the universe in general are conspiring against me at this point (don't we all sometimes?) :lol: .
Anyway, it will still work out as long as r/R is small. For our sun, (r c^2) / GM = 4.72*10^5, so we will always lose about five digits or so there for b^2, but if we were to use something like b = 1/10^5, we can still get the extra ten digits minus the five or six for our margin of error, which still leaves a margin of error of around four digits past the second order. I'm not happy with that, but I've finally managed to work out the integration this way, giving me pure algebra for the result, no functions whatsoever, so that's a plus. I'll spend a little more time trying to improve on the margin of error if I can, and then program in the result, once and for all.
grav
2008-Feb-16, 05:25 AM
Anyway, it will still work out as long as r/R is small. For our sun, (r c^2) / GM = 4.72*10^5, so we will always lose about five digits or so there for b^2, but if we were to use something like b = 1/10^5, we can still get the extra ten digits minus the five or six for our margin of error, which still leaves a margin of error of around four digits past the second order. I'm not happy with that, but I've finally managed to work out the integration this way, giving me pure algebra for the result, no functions whatsoever, so that's a plus. I'll spend a little more time trying to improve on the margin of error if I can, and then program in the result, once and for all.
Oh wait. I just realized that since I have already found this integration to the first order very precisely, all I am using the approximation with r/R now is with the second and third orders. That means that the last part is already on the order of b^2 to begin with, and all I'm doing now is finding for two more orders of r/R instead of b^2 for the rest. So with b=1/10^5, say, and losing about 1/10^5 of b^2, leaving 1/10^5 for each order with r/R, we still have a margin of error for the last part of around b^2*(r/R)^2 = 1/10^20, so it is still about ten digits past what we need for the second order of b^2. Hooray. :) Even with r/R = 1/10^2, we would have b^2*(r/R)^2 = (1/10^7)(1/10^4) = 1/10^11, which is still four digits past what we need for b^2 = (r/R) / 10^5 = 1/10^7 for the second order. So basically, although I'll have to keep going over it to make absolutely sure, the b^2 for the second order gives us what we need to begin with, and (r/R)^2 gives us the margin of error past that, which is just as good as what I was originally trying to do. Cool.
grav
2008-Feb-16, 07:14 AM
Um, yeah. Me again. :) I just thought I'd mention that I've been going over what I did to get that last bit some more and thinking about what I'm losing in the margin of error. Basically, I just lose what I lop off of the end of some set of factors, and the ratio of that to the first factor becomes my margin of error. For that last bit, I had R^2 - 2Rx + r^2 - (r^2-x^2) b^2/2 I was working with and only cut off the (r^2-x^2) b^2/2 to get my answer. If I had kept only the R^2 of that, I would be off by the next factor, which is r/R smaller, where x = -r to r, and that would become my margin of error there. If I kept the first two, the next term is (r/R)^2 smaller than the largest, so (r/R)^2 would become my margin of error. As it is, I kept all of the first three, so I only lost (r^2-x^2) b^2/2 at the end, which is b^2 (r/R)^2 smaller than the first, so that would become my margin of error for the last bit. Except that the last bit of the integration is already of the second order, being a multiple of b^2 for that, so my margin of error for that now becomes b^4 (r/R)^2, which is actually (r/R)^2 better than I even intended for the whole thing to be, so I'm definitely good to go. Of course, I've already found the second integration to b^4, though, and I have to go by the greatest difference, so b^4 is still my margin of error overall.
grav
2008-Feb-20, 03:22 AM
Slight oversight. I had everything brought out to a margin of error of b^4(r/R)^2, or so I thought. The first integration was exact, the second integration turned out to be brought out to b^4(r/R)^2, the first order of the last integration was exact from the second, and the last bit was also brought to b^4(r/R)^2 for the margin of error. Sounds good, right, since I was only trying to find it to b^4? Well, the last integration dropped not one, but two terms of (r/R), starting with r in the first part and falling to r^3/R^2 for the result, where ((4pi/3)GD) (r^3/R^2) = GM/R^2 for the acceleration. But that still makes the margin of error b^4, right? Well, since I am finding for the acceleration, which is GM/R^2 = (GM/r^2) (r/R)^2, then it is already on the order of (r/R)^2 in the first place, so it basically just cancels my margin of error out completely, since r/R = b^2 * constant. Tough break.
But not to worry. I have found another neat version for an approximation of the square root here (http://mathworld.wolfram.com/SquareRootAlgorithms.html). I couldn't get the second integration with the square root and the atan to work out for more than two terms with the infinite series of sqrt(1-x) = 1 - x/2 - x/8 - ... , but sqrt(n) = (1 + 3n)/(3+n) in the link works out very nicely, with a margin of error on the order of b^8(r/R)^4, about four orders better than before, which is great. I'll start again using that. That Euler series for atan, by the way, wouldn't have worked out I realized, because I would be reversing the denominator and numerator, which helps with the integration itself, but it puts b in the atan on the bottom, making the value very large instead of small so I couldn't use the infinite series for atan in the same way unless I at least cut the value drastically, with something like atan(x/y) = 2 atan[x/(sqrt(x^2+y^2)+y)], to make it less than one inside the atan once more, but barely. But that makes it complicated again and if I only wanted to inverse the atan, I could just use atan(1/x) = pi/2 - atan(x) to start with. Anyway, I don't need that anymore.
grav
2008-Feb-21, 11:50 PM
Oh... my... goodness. I can't believe I missed this, especially after all this time. Well, I had the integration brought out to about b^8(r/d)^4 using that algorithm for the square root, which is wonderful, but I was still wading through about four pages of calculations for that last integration when I finally said to myself, "There's still got to be a better way". So I just stared at that integration for atan a minute and noticed that the numerator is the same thing that's in the square root in the denominator, only squared. I figured I could reduce that somewhat with
Int atan[b sqrt(a-x^2) / sqrt(a + c - b^2 (a-x^2))] / (c+x^2)
= Int atan[1 / sqrt((a+c)/(b^2 (a-x^2)) - 1)] / (c+x^2)
atan(z) can tranform into other trig functions like asin and acos with something along the lines of sqrt(z^2+1). I eventually saw that would work out for what is in the denominator, although it would have to have be in the numerator to work out. Um, okay. So let's see.
atan(z) = pi/2 - atan(1/z) for z>0
atan(z) = acos[1 / sqrt(z^2+1)] for z>0
So
Int atan[1 / sqrt((a+c)/(b^2 (a-x^2)) - 1)] / (c+x^2)
= Int (pi/2 - atan[sqrt((a+c)/(b^2 (a-x^2)) - 1)]) / (c+x^2)
= Int (pi/2 - acos[1 / sqrt((a+c)/(b^2 (a-x^2)))]) / (c+x^2)
= Int (pi/2 - acos[b sqrt(a-x^2) / sqrt(a+c)]) / (c+x^2)
It's like magic. It's practically the same thing, but the extra mess in the square root in the denominator that's been giving me so much trouble is gone! And it turns out that the infinite series for acos is in exactly the same form as atan, but just with different coefficients. I still can't get the integration of that directly, but I can do the same thing I've been trying to do for atan. However, now the integrations for each of the terms are so simple that it appears that I can carry out the margin of error as far as I need it to go, each with nice simple one line calculations instead of full pagers. Carrying it out far enough, I'm even starting to find the pattern in the results which may even mean that I will eventually be able to work out the exact result for this after all, if I keep at it.
hhEb09'1
2008-Feb-22, 03:40 AM
if I keep at itAs if you wouldn't :)
BTW, I posted to the old four color map theorem thread, thought you'd be interested.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.