Problem solving integral?
显示 更早的评论
Hi all,
I want to calculate the integral of my function f(x) but I get the error of Explicit integral could not be found. My codes are:
syms x
B=0.5;
C=2;
D=1.2;
S=1;
f=2.^(-log2(1/B)*(((S-x)./C).^D));
int(f,x)
can anybody help me please with it?
Thank you in advance Sasi
回答(1 个)
Walter Roberson
2012-5-22
0 个投票
There is no closed form expression for that integral that I have been able to find. You will need to use numeric integration.
Note: using floating point powers in an integral is always a problem. Does 1.2 mean 6/5 or 12/10 or something else? The results are different depending on which representation of the power that you choose. If you use a floating point representation then the results are defined in terms of complex logs that will give complex numbers for negative arguments even in cases where we would normally find a negative real root. For example, (-8)^0.333333 is a complex number, whereas (-8)^(1/3) could be -2
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!