+ 2
How to find Sum = √(2+√(2+√(2+... ) n times?
algorithm
5 Respuestas
+ 13
//another method to tackle this (convert this to quadratic expression code)
x = sum
x^2 = 2 + x(n-1) ::::> x^2 +x (1-n)-2
solve this quadratic for each value of n (n is no. of times root we have taken or no. of times 2 is written)
if x tends to infinite .. then x^2 = 2 + x
x = 2 , -1 (-1rejected) therefore 2 is answer
//sometimes basic math helps u
//hope it helps ☺
+ 5
* Create a variable to keep track of the current sum
* Use a for loop that runs n times
* Add 2 to the sum, then square root the whole sum
+ 5
Ah yes. I editted my original comment.
Adding 2, then square rooting everything is what you need. That will approach 2 as n gets larger.
+ 1
There must be a common long root for the whole expression.
is it the same thing as √2 + √2?
+ 1
Oh thank you very much, you really helped me