All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Getting Natural With Pi (Posted on 2007-11-27)
Determine the value of the constant y, whenever:
```       y
∫(ex - 1)-0.5 dx = pi/6
ln(4/3)
```

where ln x denotes the natural logarithm of x.

 See The Solution Submitted by K Sengupta Rating: 3.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 numerical solution -- spoiler | Comment 1 of 8

DEFDBL A-Z
pi = ATN(1) * 4
h = .0000001
y0 = LOG(4 / 3)
yb = y0
CLS
x = yb
t = 0
DO
t = t + h / SQR(EXP(x) - 1)
IF t > pi / 6 THEN EXIT DO
tprev = t
x = x + h
LOOP
PRINT x - h, tprev, tprev - pi / 6
PRINT x, t, t - pi / 6

Finds that

`    y                           integral                     diff from pi/6  .6931469771900832           .5235987088310166          -6.676728229554297D-08.6931470771900844           .5235988088310281           3.32327291981409D-08`

so a good approximation for y would be .693147077190084, which is close enough to ln(2)~=.6931471805599453 to take the latter as probably being the answer. The discrepancy from .6931471805599453 is probably attributable to the coarseness of h in the Riemann sum.

 Posted by Charlie on 2007-11-27 10:43:27

 Search: Search body:
Forums (0)