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

Home > Just Math > Calculus
Integrate Expression Ratios (Posted on 2023-12-26) Difficulty: 3 of 5
Evaluate:
1   cos x
∫ ------------
-1 e(1/x) +1

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts Numerical integration | Comment 1 of 3
0.8414712710225863
is the result I get if I run the command:
integrate(-1,1,700)

I went to Wolfram Alpha to double check the result.  Wolfram's result was essentially the same but with the added information
that this equal sin(1).

So far, I have not found a calculus method to do this integration.

import math
def f(x):
    num = math.cos(x)
    den = math.e ** (1/x) + 1
    return num/den


def integrate(l_limit, u_limit, bins=100):
    ans = 0
    x_range = u_limit - l_limit
    delta = x_range / bins
    for n in range(bins):
        ans += f(l_limit +  delta*(n + .5)) * delta
    return ans

  Posted by Larry on 2023-12-26 13:09:51
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information