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

Home > Just Math > Calculus
Exponential integration (Posted on 2025-05-16) Difficulty: 3 of 5
Compute

2
∫ ex(x+√(x2-1)) dx
1

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution numerical solution Comment 1 of 1
clearvars
est1=0; est2 = 0;
 
dx= (.00000001);
for x= (1):dx:2+dx/2         % doesn't really do 2+dx/2;
  f=exp(x*(x+sqrt(x^2-1)));  % the extra just guards 
  if x>1                     % against rounding error that might
    est2=est2+f*dx;          % prevent 2 from being done
  end
  if x<2-dx/3  
    est1=est1+f*dx; 
  end
end
est1
est2
(est1+est2)/2
fun = @(x) exp(x.*(x+sqrt(x.^2-1)));
integral(fun,1,2)

Produces the left- and right-side Riemann sums, the average of those two and the results of the integral function built in to Matlab.

The left and right hand sums are

est1 =
           232.33110438164
est2 =
           232.331121797335
          
These are the lower and upper bounds on the correct answer as the curve is concave up over the range given.

The average of those is
          
ans =
          232.331113089488
          
and Matlab's integral function gives
          
ans =
          232.331113089477
          
Wolfram Alpha gives only

integral_1^2 e^(x (x + sqrt(-1 + x^2))) dx = 232.331

without an option to ask for more digits.

Edited on May 16, 2025, 1:27 pm
  Posted by Charlie on 2025-05-16 13:26:33

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


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

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