필터 지우기
필터 지우기

solving definite integrals exponential

조회 수: 2 (최근 30일)
Bradley Johnson
Bradley Johnson 2020년 2월 10일
답변: Jyothis Gireesh 2020년 2월 13일
im trying to integrate e^(x/2) from -2 to 10 and cant get it to actually solve the integral function instead i get the answer : 2*exp(-1)*(exp(6) - 1).
I entered :
syms x;
f = exp(x./2);
A = int(f, -2,10)
  댓글 수: 1
Walter Roberson
Walter Roberson 2020년 2월 10일
What is wrong with that answer from your viewpoint?

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

채택된 답변

Jyothis Gireesh
Jyothis Gireesh 2020년 2월 13일
I am assuming that you want to know the reason behind the solution being an analytic expression instead of a numeric answer. According to the documentation on symbolic integral function “int()”, it returns a symbolic expression as output.
To get a numeric answer, you may use the “vpa” function in MATLAB. This function evaluates the symbolic input to 32 significant digits (by default). In addition, it also provides the provision to limit the number of significant digits by taking a second input argument. In this case, the expression evaluates to
vpa(A)
ans =
296.09055932281032219904011254078
Please refer to the following documentation link on “vpa” for any further clarifications.

추가 답변 (0개)

카테고리

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