problem with double integral, dblquad and quad2d
Show older comments
Hi, I have been struggling to solve an double integral problem for the last couple of weeks. I have read wide variety of questions and answers, I have tried everything I know (int, dblqad, quad2d); however no result I got. The simplfied version of my code is below. After I find the way for below problem I believe I can handle the rest.
syms epsilon eta zeta;
ne=1; me=1; K1=76*10^9; K2=150*10^9; G1=26*10^9; G2=78*10^9;
Vs=(((zeta/2)+(1/2))^ne)*((eta/2)^me);
f1=(G1.*(9.*K1+8.*G1))/(6.*(K1+2*G1));
Gasil=G1+(Vs.*(G2-G1))./(1+(1-Vs).*((G2-G1)./(G1+f1)));
Kasil=K1+(Vs.*(K2-K1))./(1+(1-Vs).*((3.*(K2-K1))./(3.*K1+4.*G1)));
Easil=(9.*Kasil.*Gasil)./(3.*Kasil+Gasil);
K11(dongu1)=(int(int(Easil,eta,-1,1),zeta,-1,1))
It is worth to note that "ne" and "me" are not constant values. I will change them between 0 and 100 to see the effect of "ne" and "me" to K11.
I would really appreciate some help, idea, thought...
Ozan
Accepted Answer
More Answers (2)
bym
on 25 Mar 2012
Use the matlabFunction() to change the symbolic equation to something dblquad can evaluate:
f = matlabFunction(Easil)
f =
@(eta,zeta)-(((26000000000.*eta.*(zeta./2+1./2))./((192.*eta.*(zeta./2+1./2))./415-799./415)-26000000000).*((333000000000.*eta.*(zeta./2+1./2))./((111.*eta.*(zeta./2+1./2))./332-277./166)-684000000000))./((111000000000.*eta.*(zeta./2+1./2))./((111.*eta.*(zeta./2+1./2))./332-277./166)+(26000000000.*eta.*(zeta./2+1./2))./((192.*eta.*(zeta./2+1./2))./415-799./415)-254000000000)
>> dblquad(f,-1,1,-1,1)
ans =
2.8366e+011
Ozan
on 27 Mar 2012
0 votes
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!