expint function with two arguments
Hello, I would like to evaluate the integral in the picture for t_1=6, t_2=190, delta=0.0011, and kappa=2.1536. Since t_1<t_2, I expect the value of this integral to be positive. However, by using the following code, I get a negative value. In the code, I use the inbuilt expint function of Matlab. Since the denominator's power is 2, I first create a symbolic expression, expint(sym(2), sym(t)), following Matlab's tutorial (https://www.mathworks.com/help/symbolic/expint.html). I would appreciate very much if someone can help me find what is wrong with my code!
a=sym(2); b0=[0.0011; 2.1536]; % b0=[delta; kappa] bb0=sym(b0); tt1=sym(6); tt2=sym(190); a1=expint(a,bb0(1)*tt1)-expint(a,(1+bb0(2))*tt1*bb0(1)); a2=expint(a,bb0(1)*tt2)-expint(a,(1+bb0(2))*tt2*bb0(1)); x=sym(a1-a2); y=vpa(x)
I would appreciate any feedback! I find it particularly difficult since I cannot see how the inbuilt expint function is working....
1 个评论
回答(0 个)
另请参阅
类别
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!