I'm trying to solve this equation:
K=sqrt((R*T)/(4*pi*lambda))*integral from -inf to inf of exp(-((lambda+F*neta)/R*T-x)^2*R*T/4*lambda)/exp(x)+1 with regard to x
where, neta is an interval from 0 to 1 and the others symbols (R, T, F, lambda and pi) have constant values.
I tried to use these codes:
code 1
clear all;
close all;
clc;
F = 96485.34;
R = 8.3145;
T = 298.15;
lambda = 0.2;
neta=0:0.1:1;
pi=3.1415;
f=@(x) exp(-((lambda+F*neta)/R*T-x).^2*R*T/4*lambda)/(exp(x)+1);
Q=integral(f,-inf,inf);
k= sqrt((R*T)/(4*pi*lambda)).*Q
code 2
clear all;
close all;
clc;
F = 96485.34;
R = 8.3145;
T = 298.15;
lambda = 0.2;
neta=0:0.1:1;
pi=3.1415;
x= 0:100;
f(x)=exp(-((lambda+F*neta)/R*T-x).^2*R*T/4*lambda)/(exp(x)+1);
q=quadl('f', 0, 100);
k= sqrt((R*T)/(4*pi*lambda)).*q
but these codes return errors that I do not know to solve. Can someone help me, please?
thanks