Trouble with symbolic integrals

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)

Answers (1)

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
.

Categories

Community Treasure Hunt

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

Start Hunting!