Calculus question

Pages: 12
@helios So that means they mistook log(x) for ln(x). Sorry to spoil your fun, but I really don't see this one... Can you spell it out for me? :)
Some calculators just display "E" when you try to perform an undefined operation.
closed account (zwA4jE8b)
'pi' says to 'i' "Get real. 'i' replies "be rational".

Its funnier drawn on a board.
@helios
Okay so the function yields E for negative values of the logarithm, just like these calculators.

Then for positive values, is it as simple as the ln button is labelled log?
I'm guessing not, because of this:
Hint: it has something to do with iteratively evaluating the function.

As in:
for(..; ..; ..) f(x)
?

@Creative Ha! i is such a hypocrite. Doesn't he know that he's not rational either? =P
closed account (zwA4jE8b)
if you need your calculator to evaluate negative logs
log(-1)  or ln(-1)
you need to put it into
a + bi
mode not REAL.. At least on TI 8* models
My calculator doesn't even support any complex arithmetic. My comments to helios were regarding an anecdote which I have so far consistently failed to follow =P
http://cplusplus.com/forum/lounge/45753/#msg248681 (the end of the post)
ln button is labelled log
*Sigh* *grumble*
If you read that post again, you may notice that I used the trinary operator. I thought that would make it clear that 'log' referred to the C library log(), which is the natural logarithm. Or that at least it's a random logarithm.

Okay so the function yields E for negative values of the logarithm, just like these calculators.

Then for positive values, is it as simple as the ln button is labelled log?
Don't you get it? The calculator says "E" for "error", but they interpret it as "e". They do this to try to figure out the function's shape, because they can't do a proper function analysis.

http://imageshack.us/photo/my-images/24/retardedgraph.png/
helios wrote:
The calculator says "E" for "error", but they interpret it as "e".

No, I did get that part ^^ That what this was about:
Xander314 wrote:
Okay so the function yields E for negative values of the logarithm, just like these calculators.
Maybe not so clear...

'log' referred to the C library log()

Oh, I see. Forgot it was a computer science and not maths course...

I used the trinary operator

I just put that down to your choice of notation.

*Sigh* *grumble*

Well we got there in the end ;)
Forgot it was a computer science and not maths course.
No. It's because I can't use braces notation using just ASCII characters. I tried it, but it looked more like a set. Then I though "well, it doesn't really matter what the base of the logarithm is, since no logarithm is defined for x<=0, and the base is not really the point".
n^5*(sqrt(n^p+7)-sqrt(n^p+3))...

Should never attempt to do this when I am drunk but anyways... [Edit:] I used some inappropriate language in the post, my bad; erased the bad language - didn't use [ s] [ /s] tags - you don't miss on anything. [Edit:] Added the ∑ signs where appropriate.

Well, this has a chance of converging only if
n^5*(sqrt(n^p+7)-sqrt(n^p+3)) tends to zero

which equals,

after multiplying up and down by sqrt(n^p+7)+sqrt(n^p+3)

4n^5/(sqrt(n^p+7)+sqrt(n^p+3)).

So, the whole ∑ is bounded above by
∑4n^5/n^{p/2}=∑4 n^{5-p/2}
and bounded below by
∑n^{5-p/2}
so it converges if and only if the sum ∑n^{5-p/2} converges.

In turn, the sum ∑n^x converges if and only if x<-1, so finally,
the sum converges if and only if
5-p/2<-1
if and only if
p>12.

So the answer to the test question is: the thing converges if and only if p>12.


I am sure that reading tomorrow I will be like: damn, I should never again post drunk on this forum.
Last edited on
But with p in (10;12] the series also converges.

people who give such retarted problems on exams likely don't know shit about Galois theory
Sir, I will not let you speak ill of the good people at the DM@FCEN.
Last edited on
Sorry mate I was really drunk when posting (hopefully few people read). Edited the post to remove all the nasty language.


[Edit:] I got it! The reason for the confusion is that I didn't know how to write the ∑ sign.

∑n^{5-p/2} converges for p>12, but n^{5-p/2} of course converges to zero for p>10: I hope that clarifies the confusion. At any rate, with a more (but not completely) sober head, I stay behind the statement that the answer to the problem you gave is

p>12

The appropriate link:

http://en.wikipedia.org/wiki/Convergence_tests
the Examples section.

Why does it converge in (10; 12] ? [Edit:] I think the convergence of the sum is the same as the convergence of the sum of n^{5-p/2}, as I explained (although badly) in the post.

Last edited on
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <iostream>
#include<math.h>
#include<assert.h>

void main1()
{
  long double sum=0;
  int p=11;
  int numIterations=100000000;
  for (long double i=0; i<numIterations; i++)
  { long double powerP=1;
    long double powerFive=1;
    for (int j=0; j<p; j++)
      powerP*=i;
    for (int j=0; j<5; j++)
      powerFive*=i;
    long double newSummand=powerFive* (-sqrt(3+powerP)+sqrt(7+powerP));
    assert(newSummand>=0);
    sum+=newSummand;
  }
  std::cout << "After " << numIterations << " iterations we get with long double precision approximately: " << sum << "\n";

}

void main2()
{ double sum=0;
  int p=11;
  int numIterations=100000000;
  for (double i=0; i<numIterations; i++)
  { double powerP=1;
    double powerFive=1;
    for (int j=0; j<p; j++)
      powerP*=i;
    for (int j=0; j<5; j++)
      powerFive*=i;
    double newSummand=powerFive* (-sqrt(3+powerP)+sqrt(7+powerP));
    assert(newSummand>=0);
    sum+=newSummand;
  }
  std::cout << "After " << numIterations << " iterations we get with double precision approximately: " << sum << "\n";;
}

void main3()
{ double sum=0;
  int numIterations=100000000;
  for (double i=1; i<numIterations; i++)
  { sum+=1/i;
  }
  std::cout << "After " << numIterations << " we get that the harmonic series sum with double precision approximately: " << sum << "\n";;
}

int main()
{ main1();
  main2();
  int x;
  std::cin >> x;
	return 0;
}


Output:
After 100000000 iterations we get with long double precision approximately: 20.0798
After 100000000 iterations we get with double precision approximately: 19.2266
After 100000000 we get that the harmonic series sum with double precision approximately: 18.9979

[Edit]: Processor Intel Core 2 Solo SU3500

***********************************

Hey helios, wanna make a bet that I am correct about p>12? To check it however (if one doesn't accept my proof above) one needs to find a high precision floating point library.


We can make the bet like this: whoever wins, buys a local beer and mails it to the other. We let this forum determine the details of the bet and so on.
Last edited on
It does symbolic analysis in the cases it has been taught to: it says which tests it tried, and which of them succeeded/failed.

In the case of
http://www.wolframalpha.com/input/?i=sum(n^5*(sqrt(n^11%2B7)-sqrt(n^11%2B3)))

it doesn't say which convergence tests it applied, which means to me, it wasn't able to apply any convergence test.

Do you agree with me that
sqrt(n^p+7)-sqrt(n^p+3)
equals
(sqrt(n^p+7)-sqrt(n^p+3)) * (sqrt(n^p+7)+sqrt(n^p+3)) / (sqrt(n^p+7)+sqrt(n^p+3))
equals
(sqrt(n^p+7)^2-sqrt(n^p+3)^2)/(sqrt(n^p+7)+sqrt(n^p+3))
equals
4/(sqrt(n^p+7)+sqrt(n^p+3))

?

If so, then the sum you asked to be computed equals
∑4n^5/(sqrt(n^p+7)+sqrt(n^p+3)).

Now try

http://www.wolframalpha.com/input/?i=sum%284n^5%2F%28sqrt%28n^11%2B7%29%2Bsqrt%28n^11%2B3%29%29%29


[P.S.] Once again appologies for my bad mouthing, I had an I-hate-the-world kind of being drunk.
Last edited on
Hm... You're right. I just tested it again with "try again with more time" and it did find that for p=12, the series diverges.

Do you agree with me that [...]?
To be honest, I'm not really in the mood to do any math, right now, which is why I' blindly believed WA's output. I'm giving my brain a short break after two absolutely hellish weeks.
Topic archived. No new replies allowed.
Pages: 12