How to solve integral within an integral with symbolic limit
Show older comments
Hi,
I want to evaluate following integral which contains another integral inside. spol, which is a function of theta,is the lower limit of internal integral. The internal integral then will be multiplied to other function and will be differentiate.
Below is my coding:
a = 2;b = 1;c = 1.2*a;d = 1.2*b;
% E and K are elliptical integrals
syms theta dSigma
spol = 2*cos(theta)^2 + sin(theta)^2/2 + (16*cos(theta)^4 - 24*cos(theta)^2 + 6*sin(theta)^2 + sin(theta)^4 + 8*cos(theta)^2*sin(theta)^2 + 9)^(1/2)/2 - 5/2;
fpol = @(w)((1-((a*cos(theta))^2/(a^2+w))-((b*sin(theta))^2/(b^2+w)))/(sqrt((a^2+w)*(b^2+w)*w)));
gap = (Po/Estar)*(((int(fpol,spol,1000000))*a*b/2)- (2*d*(K-(((a*cos(theta))^2)*(K-E)/(e^2*c^2))-b*sin(theta)*(E/(e^2*d^2)-K/(e^2*c^2)))));
dGap = diff(gap);
dWork = int((2*c*d-2*a*b)*(1-cos(2*theta))*dSigma/dGap,0,pi/2);

The result that I get still contain the variable w and theta. I am hoping to get an equation of dWork in terms of dSigma only.
4 Comments
Torsten
on 22 Jul 2015
Write out the expression you want to calculate in a mathematical notation so that we can compare with your code.
Best wishes
Torsten.
n hmz
on 22 Jul 2015
Star Strider
on 22 Jul 2015
n hmz
on 22 Jul 2015
Answers (1)
Torsten
on 22 Jul 2015
syms theta, w, ...
spol = 2*cos(theta)^2 + sin(theta)^2/2 + (16*cos(theta)^4 - 24*cos(theta)^2 + 6*sin(theta)^2 + sin(theta)^4 + 8*cos(theta)^2*sin(theta)^2 + 9)^(1/2)/2 - 5/2;
fpol=((1-((a*cos(theta))^2/(a^2+w))-((b*sin(theta))^2/(b^2+w)))/(sqrt((a^2+w)*(b^2+w)*w)));
gap = (Po/Estar)*(((int(fpol,w,spol,1000000))*a*b/2)- (2*d*(K-(((a*cos(theta))^2)*(K-E)/(e^2*c^2))-b*sin(theta)*(E/(e^2*d^2)-K/(e^2*c^2)))));
dGap = diff(gap,theta);
dWork = int((2*c*d-2*a*b)*(1-cos(2*theta))*dSigma/dGap,theta,0,pi/2);
But I don't think that you will get an analytical expression for dWork.
Best wishes
Torsten.
Categories
Find more on Modulation 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!