integration

조회 수: 3 (최근 30일)
Edward
Edward 2012년 5월 25일
please can someone help me to solve this problem: I want to integrate this function:
exp(0.5*(1-((l-hm)/(2*H))-exp(-((l-hm)/(2*H)))))
I make this program:
hm=400;
H=50;
syms l;
H0=int(exp(0.5*(1-((l-hm)/(2*H))-exp(-((l-hm)/(2*H))))),l,hm,700)
but the answer is:
100*2^(1/2)*pi^(1/2)*exp(1)^(1/2)*(erf(2^(1/2)/2) - erf(2^(1/2)/(2*exp(3/2))))
how to get the right answer???

답변 (3개)

Alexander
Alexander 2012년 5월 25일
Why do you think that the answer is incorrect? If you just want a number, use double on the result:
>> double(H0)
ans =
209.1673
Or use INTEGRAL as Mike Hosea suggests.
  댓글 수: 2
Mike Hosea
Mike Hosea 2012년 5월 25일
:lol: I didn't even bother with the symbolic attempt and completely misinterpreted the question. I'm blaming this on Walter. :)
Walter Roberson
Walter Roberson 2012년 5월 25일
It's a fair cop, gov!

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


Mike Hosea
Mike Hosea 2012년 5월 25일
I never quite know what to say when questions like this come up. There's nothing wrong with wanting to do integrals analytically, to be sure, and some times there are legitimate reasons, I guess, but I wonder what people need the analytical answer for. This problem is really no problem for INTEGRAL (or QUADGK)
>> integral(@(l)exp(0.5*(1-((l-hm)/(2*H))-exp(-((l-hm)/(2*H))))),hm,700)
ans =
2.091673274741571e+02
>> 100*2^(1/2)*pi^(1/2)*exp(1)^(1/2)*(erf(2^(1/2)/2) - erf(2^(1/2)/(2*exp(3/2))))
ans =
2.091673274741571e+02

Walter Roberson
Walter Roberson 2012년 5월 25일
MuPAD is not able to complete that integral. (Maple is not able to do it either.)
Perhaps there is an appropriate change of variables, but I have not been able to locate one.
  댓글 수: 7
Christopher Creutzig
Christopher Creutzig 2012년 5월 25일
If it helps to get some confidence in the result: To get integrals.com to integrate the expression (indefinitely), substitute x=exp(-l/200). http://integrals.wolfram.com/index.jsp?expr=-200*exp%285%2F2+-+%281%2F2%29*x^2*exp%284%29%29&random=false
Alexander
Alexander 2012년 5월 25일
Okay, that explains my confusion.

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by