Need a hint for calculating the integer part of

  • Thread starter holezch
  • Start date
  • Tags
    Integer
In summary: This means that the integer part of the sum is 1997 or 1998, and we need to figure out which one it is. Since the summands are strictly decreasing with increasing n, the sum is strictly decreasing with increasing n. So the sum is smaller than 1 + 1/sqrt(2) + 1/sqrt(3) + ... + 1/sqrt(1998) which is 1 + (1/sqrt(2)) * 1998 = 1 999 - 2/sqrt(2) < 1999. On the other hand, the sum is larger than 1 + 1/sqrt(2) + ... + 1/s
  • #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
 
Physics news on Phys.org
  • #2
What is a whole number part?
 
  • #3
I was thinking, that you can get a lower bound from
[tex]\int_{1}^{1000000} \frac{1}{\sqrt{x}} \, dx < \sum_{i = 1}^{1000000} \frac{1}{\sqrt{i}}[/tex]
Can't think of an appropriate upper bound estimation though.
 
  • #4
Hm, if we go for an estimation, we will have to be sure that our estimation is an integer estimate z that is z <= v or z >= v if v is the actual value and z is the closest integer? I didn't think of coming up with bounds because I thought that the answer would need some sort of precision
thanks
 
Last edited:
  • #5
dacruick said:
What is a whole number part?

the integer part
 
  • #6
anyone have any more ideas? :(
 
  • #7
holezch said:
anyone have any more ideas? :(

It's pretty much what CompuChip gestured at in post 2, though being careless about being exact. You need to bound the sum by integral estimates. Draw a bunch of rectangles representing the sum as though you were doing an upper Riemann sum of the integral of 1/sqrt(n) on the interval [1,10^6+1] with rectangles of width 1. Since it's an upper sum, the integral gives you a lower bound, right? To get an upper bound, use the function 1/sqrt(n-1). I know that goes to infinity at n=1, so you'd better use a different approximation between the first two points. Be more careful of the endpoints than CompuChip was, ok? I tried it and I THINK I got estimates close enough to get the integer part of the sum. See if you think so.
 
  • #8
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?
 
Last edited:
  • #9
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?

That sounds right. Sure, I would say you could use a calculator to find the value of the integral. Though you could do it without the calculator if you really HAD to, right? The point is just to do it without summing the whole series.
 
  • #10
sqrt(1 000 000) = 1 000
So sqrt(1 000 000 - 1) is a little (but certainly not more than 0.5) smaller (since the square root function is monotonous) and therefore
2 * sqrt(1 000 000 - 1) is just a little smaller (but certainly not more than 1) than 2 * 1000 = 2000.
So
[tex]1997 < 2 \sqrt{1000000 - 1} - 2 < 1998[/tex].
 

Related to Need a hint for calculating the integer part of

1. What is the integer part of a number?

The integer part of a number is the whole number portion of the number, without any decimal or fractional part.

2. How do you calculate the integer part of a number?

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.

3. Can you provide an example of finding the integer part of a 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.

4. Why is it important to calculate the integer part of a number?

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.

5. Are there any special cases when calculating the integer part of a number?

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.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
12
Views
895
  • Calculus and Beyond Homework Help
Replies
22
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
549
  • Calculus and Beyond Homework Help
Replies
13
Views
728
  • Calculus and Beyond Homework Help
Replies
1
Views
388
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
Replies
9
Views
770
Back
Top