积分遇到问题了,谁能帮帮我?
积分遇到问题了,谁能帮帮我?程序如下:
clear ;clc;
syms x y z
f=(1-x.^2).^(1/2);
dfdx=diff(f);
A=int(5e13*cosh(dfdx*z/1e6),z,0,1e-7);
B=int(5e13*sinh(dfdx*z/1e6),z,0,1e-7);
C=(0.04*A-B*(A^2-B^2+0.04^2)^0.5)/(A^2-B^2);
D=dfdx*(1e-7)+1e6*sinh(C)
E=int(D,x,(-1e-4),1e-4)
F=int(E,y,(-0.008),0.008)
x1=-1:0.05:1
G=subs(F,x,x1)
运行结果:
D =
-1/10000000/(1-x^2)^(1/2)*x+1000000*sinh((1000000000000000000*(1-x^2)^(1/2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)-exp(-1/10000000000000/(1-x^2)^(1/2)*x))/x+25000000000000000000*(1-x^2)^(1/2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)+exp(-1/10000000000000/(1-x^2)^(1/2)*x)-2)/x*(625000000000000000000000000000000000000*(1-x^2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)-exp(-1/10000000000000/(1-x^2)^(1/2)*x))^2/x^2-625000000000000000000000000000000000000*(1-x^2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)+exp(-1/10000000000000/(1-x^2)^(1/2)*x)-2)^2/x^2+1/625)^(1/2))/(625000000000000000000000000000000000000*(1-x^2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)-exp(-1/10000000000000/(1-x^2)^(1/2)*x))^2/x^2-625000000000000000000000000000000000000*(1-x^2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)+exp(-1/10000000000000/(1-x^2)^(1/2)*x)-2)^2/x^2))
Warning: Explicit integral could not be found.
> In sym.int at 58
In yy at 9
E =
int(-1/10000000/(1-x^2)^(1/2)*x+1000000*sinh((1000000000000000000*(1-x^2)^(1/2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)-exp(-1/10000000000000/(1-x^2)^(1/2)*x))/x+25000000000000000000*(1-x^2)^(1/2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)+exp(-1/10000000000000/(1-x^2)^(1/2)*x)-2)/x*(625000000000000000000000000000000000000*(1-x^2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)-exp(-1/10000000000000/(1-x^2)^(1/2)*x))^2/x^2-625000000000000000000000000000000000000*(1-x^2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)+exp(-1/10000000000000/(1-x^2)^(1/2)*x)-2)^2/x^2+1/625)^(1/2))/(625000000000000000000000000000000000000*(1-x^2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)-exp(-1/10000000000000/(1-x^2)^(1/2)*x))^2/x^2-625000000000000000000000000000000000000*(1-x^2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)+exp(-1/10000000000000/(1-x^2)^(1/2)*x)-2)^2/x^2)),x = -1/10000 .. 1/10000)
F =
2/125*int(-1/10000000/(1-x^2)^(1/2)*x+1000000*sinh((1000000000000000000*(1-x^2)^(1/2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)-exp(-1/10000000000000/(1-x^2)^(1/2)*x))/x+25000000000000000000*(1-x^2)^(1/2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)+exp(-1/10000000000000/(1-x^2)^(1/2)*x)-2)/x*(625000000000000000000000000000000000000*(1-x^2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)-exp(-1/10000000000000/(1-x^2)^(1/2)*x))^2/x^2-625000000000000000000000000000000000000*(1-x^2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)+exp(-1/10000000000000/(1-x^2)^(1/2)*x)-2)^2/x^2+1/625)^(1/2))/(625000000000000000000000000000000000000*(1-x^2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)-exp(-1/10000000000000/(1-x^2)^(1/2)*x))^2/x^2-625000000000000000000000000000000000000*(1-x^2)*(exp(1/10000000000000/(1-x^2)^(1/2)*x)+exp(-1/10000000000000/(1-x^2)^(1/2)*x)-2)^2/x^2)),x = -1/10000 .. 1/10000)
x1 =
Columns 1 through 11
-1.0000 -0.9500 -0.9000 -0.8500 -0.8000 -0.7500 -0.7000 -0.6500 -0.6000 -0.5500 -0.5000
Columns 12 through 22
-0.4500 -0.4000 -0.3500 -0.3000 -0.2500 -0.2000 -0.1500 -0.1000 -0.0500 0 0.0500
Columns 23 through 33
0.1000 0.1500 0.2000 0.2500 0.3000 0.3500 0.4000 0.4500 0.5000 0.5500 0.6000
Columns 34 through 41
0.6500 0.7000 0.7500 0.8000 0.8500 0.9000 0.9500 1.0000
??? Error using ==> maple
Error, (in int) wrong number (or type) of arguments
Error in ==> sym.subs at 165
NEWf = double(sym(maple('map','F',char(sym()))));
Error in ==> yy at 12
G=subs(F,x,x1)
[ 本帖最后由 twomao 于 2007-8-28 16:59 编辑 ] 改用数值积分试试.
另: 从你贴的代码看,好象并没有y,“F=int(E,y,(-0.008),0.008)”应该有问题。
实际上,E已经是一个常数了。
回复 #2 xjzuo 的帖子
真的太谢谢你啦.我想用quad做,但是不知道怎样在inline里,将dfdx=diff(f);的结果中的乘法换为数组乘法.
我再考虑下.
再次感谢楼上朋友的指点.
:handshake
页:
[1]