Unable to integrate a function using integral and vpaintegral

3 views (last 30 days)
Hi,
I am trying to integrate the function from [0 inf]. I have used integral and vpaintegral nonetheless it gives a NaN.
theta = 6.3 *pi/180;
f = @(x) 1+cosh(2.*theta.*x)./sinh(2*pi.*x) .* tanh ((pi - theta).*x) ;
m = integral(f, 0, inf);

Accepted Answer

Torsten
Torsten on 15 Sep 2022
syms x
theta = 6.3*pi/180;
f = (1+cosh(2*theta*x))/sinh(2*pi*x)*tanh((pi-theta)*x);
vpaintegral(f,x,0,Inf)
ans = 
0.310368

More Answers (0)

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!