- #1
holezch
- 251
- 0
Homework Statement
Calculate the integer part ( whole number part ) of
1 + 1/sqrt ( 2 ) + 1 / sqrt ( 3 ) + 1 / sqrt ( 4 ) + 1 / sqrt ( 5 ) + ... + 1 / sqrt ( 1 000 000 )
Any hints? Thanks, I'd appreciate the help
dacruick said:What is a whole number part?
holezch said:anyone have any more ideas? :(
holezch said:thanks, I got the answer to be 1998 and I believe that it is correct :)
I initially used 1 to a million for both end points, on 1/sqrt ( x ) and 1 / sqrt ( x - 1 ) integrals, but then I couldn't integrate 1 / sqrt ( x - 1 ) with that end point, so I started from 2 instead of 1. 1/ sqrt ( 1 ) = 1 which is an integer anyway, so I could exclude that from my approximation.
Then I got
2sqrt(million ) - 2*sqrt ( 2 ) < original sum < 2*sqrt( million -1 ) - 2. Then showed that the difference between both bounds is < 1 but > 0 , which means they are closer than adjacent integers ( which means if the original sum is in between that, I will indeed get the integer part by finding the integer part of either bound ). Well, I found the integer part of either bound and added the 1 back in of course
I had to use a calculator though :S, to calculate 2*sqrt( 1 000 000 - 1 ) - 2 , is that still fair game?
The integer part of a number is the whole number portion of the number, without any decimal or fractional part.
To calculate the integer part of a number, you can use the floor function, which rounds the number down to the nearest integer, or the trunc function, which simply removes the decimal portion of the number. Alternatively, you can use the modulo operator to find the remainder after dividing by 1, which will be the integer part of the number.
Sure, if we have the number 3.75, the integer part would be 3. This can be found by using any of the methods mentioned above. Using the floor function, we get floor(3.75) = 3. Using the trunc function, we get trunc(3.75) = 3. And using the modulo operator, we get 3.75 % 1 = 0.75, so the integer part is 3.
Calculating the integer part of a number can be useful in many mathematical and scientific calculations, where whole numbers are needed. It can also help with rounding and truncating values in data analysis and programming.
Yes, when dealing with negative numbers, some methods may give different results. For example, using the floor function on -3.75 would give -4, while using the trunc function would give -3. It is important to understand the differences and choose the appropriate method based on the desired outcome.