Solving an Improper Integral
106 ビュー (過去 30 日間)
Ahmad El Kari 2020 年 4 月 8 日
回答済み: John D'Errico 2021 年 3 月 21 日
I've tried to solve the following integral as such:
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?
Ameer Hamza 2020 年 4 月 8 日
The solution given by MATLAB is correct: https://www.wolframalpha.com/input/?i=integrate+1%2F%28sqrt%28exp%28x%29-x%29%29+from+1+to+infinity. It is definitely not .
回答 (2 件)
Deepak Meena 2021 年 3 月 21 日
You did not make any mistake, To evaluate the A use vpa fucntion :
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.
f = 1/(sqrt(exp(x)-x));
But this will work
Or you might do it as
Find more on Mathematics and Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!