Trouble with symbolic integrals

5 次查看(过去 30 天)
syms x;
f = exp((x^2-1)/2)/(1-x^2)^0.5;
int(f,-1,1)
%% Matlab does not solve that integral
% The output is:
% ans =
% int(exp(x^2/2 - 1/2)/(1 - x^2)^(1/2), x, -1, 1)

回答(1 个)

Star Strider
Star Strider 2021-10-22
Since the desired result is numeric, use vpaintegral
syms x;
f = exp((x^2-1)/2)/(1-x^2)^0.5;
int_f = vpaintegral(f,-1,1)
int_f = 
2.48505
.

类别

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