Solving an Improper Integral

조회 수: 70 (최근 30일)
Ahmad El Kari
Ahmad El Kari 2020년 4월 8일
답변: John D'Errico 2021년 3월 21일
Hello,
I've tried to solve the following integral as such:
syms x;
f = 1/(sqrt(exp(x)-x))
A = int(f, 1, inf)
and the answer was the function itself:
int(1/(exp(x) - x)^(1/2), x, 1, Inf)
Did I make an error because why is the answer not coming out?
Thank you.
  댓글 수: 2
darova
darova 2020년 4월 8일
Maybe it's too complicated for symbolic calculations. What about numerical solution?
syms x;
f = 1/(sqrt(exp(x)-x))
F = matlabFunction(f);
integral(F,1,inf)
2/sqrt(exp(1))
output
ans =
1.3725
ans =
1.2149
doesn't look like truth
Ameer Hamza
Ameer Hamza 2020년 4월 8일

댓글을 달려면 로그인하십시오.

답변 (2개)

Deepak Meena
Deepak Meena 2021년 3월 21일
Hi,
You did not make any mistake, To evaluate the A use vpa fucntion :
>> vpa(A)
ans =
1.3725437567734794327982409932998

John D'Errico
John D'Errico 2021년 3월 21일
Think of it like this. Do ALL problems you might pose to a computer have a solution? If so, then I might try
solve('Peace in the middle East')
To no surprise, MATLAB would have a fit if I try it, generating some randomly useless error message.
But many (even most) problems you might pose in mathematics actually have no analytical solution. It is frighteningly easy to pose such a problem. In fact, it looks like you did exactly that.
One solution, and a reason why there are numerical analysis courses taught at many schools, is to learn to use numerical methods to solve intractable problems, where no simple algebraic solution is available. Often numerical analysis is valuable even for problems where a solution exists in theory, yet it is numerically difficult to work with. But this is a probem of the first sort, where no analytical solution apparently exists. At least neither of MATLAB or Wolfram Alpha are able to offer one.
In MATLAB, you can then often tell MATLAB to look for a numerical solution. You can use vpa for that, or you can use vpaintegral.
syms x;
f = 1/(sqrt(exp(x)-x));
int(f,1,inf)
ans = 
But this will work
vpa(int(f,1,inf))
ans = 
1.3725437567734794327982409932998
Or you might do it as
vpaintegral(f,1,inf)
ans = 
1.37254

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by