MATLAB求积分的数值解
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/17 13:05:36
MATLAB求积分的数值解
我的程序及运行如下:
>> syms x;
>> y=inline('0.579/((2*pi*0.3176)^0.5*x^1.5)*exp(-(x-0.579)^2/(2*0.3176*x))','x');
>> int(x*exp(-3*x)*y(x),x,0,inf)
Warning:Explicit integral could not be found.
ans =
int((81487005757734912*exp(-3*x)*exp(-(625*(x - 579/1000)^2)/(397*x)))/(198810802005279125*x^(1/2)),x == 0..Inf)
这是一个求泊松-逆高斯分布的积分,请问这个积分还有别的方法可以求出来吗?期盼!
所要求的积分如下:
我的程序及运行如下:
>> syms x;
>> y=inline('0.579/((2*pi*0.3176)^0.5*x^1.5)*exp(-(x-0.579)^2/(2*0.3176*x))','x');
>> int(x*exp(-3*x)*y(x),x,0,inf)
Warning:Explicit integral could not be found.
ans =
int((81487005757734912*exp(-3*x)*exp(-(625*(x - 579/1000)^2)/(397*x)))/(198810802005279125*x^(1/2)),x == 0..Inf)
这是一个求泊松-逆高斯分布的积分,请问这个积分还有别的方法可以求出来吗?期盼!
所要求的积分如下:
用double() 化为数值型就可以了
>> syms x
y=inline('0.579/((2*pi*0.3176)^0.5*x^1.5)*exp(-(x-0.579)^2/(2*0.3176*x))','x');
A=int(x*exp(-3*x)*y(x),x,0,inf)
double(A)
Warning: Explicit integral could not be found.
A =
int(81487005757734912/(198810802005279125*x^(1/2)*exp(3*x)*exp((625*(x - 579/1000)^2)/(397*x))), x = 0..Inf)
ans =
0.0940
>> syms x
y=inline('0.579/((2*pi*0.3176)^0.5*x^1.5)*exp(-(x-0.579)^2/(2*0.3176*x))','x');
A=int(x*exp(-3*x)*y(x),x,0,inf)
double(A)
Warning: Explicit integral could not be found.
A =
int(81487005757734912/(198810802005279125*x^(1/2)*exp(3*x)*exp((625*(x - 579/1000)^2)/(397*x))), x = 0..Inf)
ans =
0.0940