Warning: Explicit integral could not be found

3 views (last 30 days)
A1=2940.543833;A2=177754.3553;B2=108.2941462;R12=0.967452952;S12=0.001155217;
syms z L;
f_l=(exp(-2*B2*z)-2*R12*exp(-2*B2*L)*cos(S12+2*A2*(L-z))+R12^2*exp(-2*B2*L)*exp(-2*B2*(L-z)))/(1-2*R12^2*exp(-2*B2*L)*cos(2*S12+2*A2*L)+R12^4*exp(-4*B2*L));
f_m=exp(-2*B2*z);
f_ml=f_l^2-2*f_l*f_m+f_m^2;
g_ml=int(f_ml,z,0,L)
I tried to integrate f_ml,which is a function of z and L, from 0 to L,but MATLAB keeps saying ''Warning: Explicit integral could not be found.'' and it displays the integral just by substituting the values of the constants as... ans = int((1/exp((952565383735793*z)/4398046511104) -.........
Is there any way of solving this problem? Thanks

Accepted Answer

Walter Roberson
Walter Roberson on 10 Aug 2013
-(4/3) * (R12^4 * (B2^2 + A2^2) * A2 * (-(3/8) * exp(6 * B2 * L) + (-(3/16) * R12^4 + L * B2 * R12^2 + 3/8) * exp(2 * B2 * L) + (3/16) * R12^4 * exp(-2 * B2 * L)) * cos(2 * S12 + 2 * A2 * L) - (1/2) * R12^2 * (B2^2 + A2^2) * A2 * ((L * B2 * R12^2 + 1/8 - (3/8) * R12^4) * exp(4 * B2 * L) - (1/8) * exp(8 * B2 * L) + (3/8) * R12^4) * cos(4 * S12 + 4 * A2 * L) + (1/16) * R12^4 * A2 * (B2^2 + A2^2) * ( - exp(6 * B2 * L) + exp(2 * B2 * L)) * cos(6 * S12 + 6 * A2 * L) + (1/16) * B2 * (B2^2 + A2^2) * (R12^4 * exp(4 * B2 * L) + exp(8 * B2 * L)) * sin(2 * S12 + 4 * A2 * L) + (1/2) * R12 * B2^2 * A2 * ((R12^2 + 1/2) * exp(6 * B2 * L) + R12^4 * exp(2 * B2 * L)) * cos(3 * S12 + 2 * A2 * L) - (1/2) * ((R12^4 + R12^2) * exp(4 * B2 * L) + (1/2) * exp(8 * B2 * L)) * R12 * B2^2 * A2 * cos(4 * A2 * L + 3 * S12) + (1/2) * ((-R12^2 + 1/2) * exp(6 * B2 * L) + R12^4 * exp(2 * B2 * L)) * R12 * B2 * A2^2 * sin(3 * S12 + 2 * A2 * L) - (1/2) * R12 * ((R12^4 - R12^2) * exp(4 * B2 * L) + (1/2) * exp(8 * B2 * L)) * B2 * A2^2 * sin(4 * A2 * L + 3 * S12) + (1/16) * exp(6 * B2 * L) * B2 * R12^2 * (B2^2 + A2^2) * sin(4 * S12 + 2 * A2 * L) - (1/16) * exp(6 * B2 * L) * B2 * R12^2 * (B2^2 + A2^2) * sin(4 * S12 + 6 * A2 * L) - (1/4) * R12^3 * B2^2 * A2 * cos(5 * S12 + 4 * A2 * L) * exp(4 * B2 * L) + (1/4) * R12^3 * B2^2 * A2 * cos(6 * A2 * L + 5 * S12) * exp(6 * B2 * L) - (1/4) * R12^3 * A2^2 * B2 * sin(5 * S12 + 4 * A2 * L) * exp(4 * B2 * L) + (1/4) * R12^3 * A2^2 * B2 * sin(6 * A2 * L + 5 * S12) * exp(6 * B2 * L) + (1/4) * ((4 * R12^2 + 2) * exp(6 * B2 * L) + R12^4 * exp(2 * B2 * L) * (R12^2 + 3)) * R12 * B2^2 * A2 * cos(S12 + 2 * A2 * L) + (1/4) * ((4 * R12^2 - 2) * exp(6 * B2 * L) + R12^4 * exp(2 * B2 * L) * (-3 + R12^2)) * R12 * B2 * A2^2 * sin(S12 + 2 * A2 * L) - (1/2) * ((1/8) * R12^2 * B2 * (B2^2 + A2^2) * sin(2 * S12) + A2 * ((2 * R12 * B2^2 + (3/2) * B2^2 * R12^3) * cos(S12) - (3/2) * R12 * B2 * A2 * (R12^2 - 4/3) * sin(S12) + (B2^2 + A2^2) * (-(1/2) * R12^4 + 3/16 + L * B2 * R12^2))) * R12^2 * exp(4 * B2 * L) - (1/8) * sin(2 * A2 * L) * B2 * R12^2 * (B2^2 + A2^2) * exp(6 * B2 * L) + (-(1/16) * B2 * (B2^2 + A2^2) * sin(2 * S12) + (1/4) * (-2 * R12 * B2^2 * cos(S12) + 2 * A2 * R12 * sin(S12) * B2 + (B2 * L + (3/8) * R12^2) * (B2^2 + A2^2)) * A2) * exp(8 * B2 * L) - (1/4) * ((1/8) * R12^4 * (B2^2 + A2^2) * exp(-4 * B2 * L) + R12 * B2^2 * cos(S12) + A2 * R12 * sin(S12) * B2 + (L * B2 * R12^2 + 1 - (1/8) * R12^4) * (B2^2 + A2^2)) * R12^6 * A2) * R12^2 / ((R12^2 * (R12^8 * exp(2 * B2 * L) + 3 * R12^4 * exp(6 * B2 * L) + exp(10 * B2 * L)) * cos(2 * S12 + 2 * A2 * L) + (-R12^4 * exp(8 * B2 * L) - R12^8 * exp(4 * B2 * L)) * cos(4 * S12 + 4 * A2 * L) - (3/2) * R12^8 * exp(4 * B2 * L) - (1/6) * exp(12 * B2 * L) - (3/2) * R12^4 * exp(8 * B2 * L) - (1/6) * R12^12 + (1/3) * R12^6 * exp(6 * B2 * L) * cos(6 * S12 + 6 * A2 * L)) * B2 * (B2^2 + A2^2) * A2)
Note: If you substitute in the constants that you show, then the expression becomes very very sensitive to the exact value of L when you are near L = 0, especially in the slightly negative L range. This instability continues even if you do symbolic calculations with 256 digits precision.
  1 Comment
ephrem wedaje
ephrem wedaje on 10 Aug 2013
Thank you so much for your answer!It really helps. I've been using MuPAD Toolbox for the computation.Is that because of the limitations in computation of MuPAD Toolbox?

Sign in to comment.

More Answers (1)

Andrei Bobrov
Andrei Bobrov on 10 Aug 2013
Edited: Andrei Bobrov on 10 Aug 2013
using Maple and Maple Toolbox.
>> A1=2940.543833;A2=177754.3553;B2=108.2941462;R12=0.967452952;S12=0.001155217;
syms z L;
f_l=(exp(-2*B2*z)-2*R12*exp(-2*B2*L)*cos(S12+2*A2*(L-z))+R12^2*exp(-2*B2*L)*exp(-2*B2*(L-z)))/(1-2*R12^2*exp(-2*B2*L)*cos(2*S12+2*A2*L)+R12^4*exp(-4*B2*L));
f_m=exp(-2*B2*z);
f_ml=f_l^2-2*f_l*f_m+f_m^2;
g_ml=int(f_ml,z,0,L)
g_ml =
-61 113
-0.4110305614 10 (-0.5540235203 10 %7
112 113
+ 0.9439721270 10 exp(-1732.706339 L) + 0.3366259895 10 %9
113 113 2
+ 0.1230043441 10 %5 - 0.9840270603 10 %5 %1
108 2 113
- 0.8116307330 10 %5 %4 + 0.2460056286 10 %5 %2
111 114
- 0.1296899888 10 %5 %6 + 0.1151269526 10 %3 %1
111 113 2
+ 0.1992325618 10 %7 %6 + 0.1219924354 10 %7 %1
108 2 113
- 0.1685643519 10 %7 %4 - 0.5461477238 10 %8 %1
111 113 2
+ 0.1296601498 10 %8 %4 + 0.8620400096 10 %9 %1
108 2 113
+ 0.4601676693 10 %9 %4 + 0.2155088520 10 %9 %2
110
- 0.9958450458 10 %9 %6
113
- 0.6051312119 10 exp(-1516.118047 L) %1
111 116
+ 0.1398118214 10 exp(-1516.118047 L) %4 + 0.1994825956 10 L %7
115 116
+ 0.8737645712 10 L %9 - 0.1138559151 10 %5 L
111 113
- 0.3780251374 10 %3 %4 - 0.4615131279 10 %7 %2
111 111
+ 0.1063968037 10 %8 %2 %4 + 0.2127947433 10 %8 %6 %1
108 110
- 0.4916490849 10 %8 %6 %4 + 0.4477214664 10 %7 %1 %4
111 113
- 0.3983380183 10 %9 %1 %4 - 0.4605048852 10 %8 %2 %1
111 111
- 0.2223946996 10 %3 %2 %4 - 0.1828185525 10 %3 %6 %1
108 111
+ 0.9584071773 10 %3 %4 %6 + 0.5786420330 10 %5 %1 %4
113 113
+ 0.4605035310 10 %3 %2 %1 + 0.8627558146 10 L %4 %8
100 97
+ 0.1246074671 10 L %3 %1 - 0.2878978410 10 L %3 %4
116 113
+ 0.1994804659 10 L %2 %7 - 0.9217794621 10 L %6 %7
116 / 54
- 0.3734165440 10 L %1 %8) / (0.2500000000 10
/
54 54 55
+ 0.9592876337 10 %7 + 0.1680731185 10 %9 + 0.1095038603 10 %5
55
- 0.1403944074 10 exp(-216.5882924 L) %1
52 55 2
+ 0.3243725895 10 exp(-216.5882924 L) %4 + 0.1752052412 10 %5 %1
49 2 54
+ 0.9352673496 10 %5 %4 + 0.4380107649 10 %5 %2
52 55
- 0.2024004333 10 %5 %6 - 0.3279728977 10 %3 %1
52 55 2
- 0.1773090302 10 %7 %6 + 0.1534852021 10 %7 %1
49 2 55
+ 0.8193230816 10 %7 %4 - 0.1077428951 10 %8 %1
52 52
+ 0.2489332911 10 %8 %4 + 0.7577610822 10 %3 %4
54 52
+ 0.3837109569 10 %7 %2 - 0.7092361207 10 %7 %1 %4
52 52
+ 0.1894382481 10 %3 %2 %4 + 0.3788785186 10 %3 %6 %1
49 52
- 0.8753753689 10 %3 %4 %6 - 0.8096017332 10 %5 %1 %4
54
- 0.8199234904 10 %3 %2 %1)
%1 := cos(355508.7106 L)
%2 := cos(711017.4212 L)
%3 := exp(-649.7648772 L)
%4 := sin(355508.7106 L)
%5 := exp(-433.1765848 L)
%6 := sin(711017.4212 L)
%7 := exp(-866.3531696 L)
%8 := exp(-1082.941462 L)
%9 := exp(-1299.529754 L)
  2 Comments
Walter Roberson
Walter Roberson on 10 Aug 2013
Yes but that has really bad accuracy problems because of the large range of values being computed over. You need to increase the Digits, and you are better off to have converted the floating point numbers to rational before doing the calculation.
ephrem wedaje
ephrem wedaje on 11 Aug 2013
I'm so grateful for your help. Even if I change the floating numbers with a rational numbers ,I haven't succeed with the previous integration yet. But it works by changing the previous definite integral with indefinite integral as..... A1=32346/11 ;A2=533263/3 ;B2=1841/17 ;R12=1189/1229 ;S12= 47/40685 ; ER=0.01; syms z L; f_l=(exp(-2*B2*z)-2*R12*exp......... f_m=exp(-2*B2*z); f_ml=f_l^2-2*f_l*f_m+f_m^2; G_ml=subs(int(f_ml,z),z,L)-subs(int(f_ml,z),z,0).....
It might be the toolbox. What toolbox did you use? I'm working on 2010a version MATLAB with a MuPAD toolbox. Infact, my ultimate goal is to solve for L. Here, also I've faced the same problem, MATLAB couldn't solve the problem, it simply displays the equation. What do you suggest me? should I use another toolbox? thanks

Sign in to comment.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!