explicit integral could not be found problem

Hello all,
I want to solve for definite integral. It is little complicated. I was unable to write it over here that is why I have attached pdf file along with this. It just contains 3 equations.
The matlab code for this is as follows:
clear all;
pd=0.015; dr=0.0614;
phi1=acosd(pd/(2*dr));
epsi=0.5*(1-pd/(2*dr));
syms theta;
f=(1/(2*pi))*(1-(0.5/epsi)*(1-cos(theta)))^(1.5)*cos(theta);
answer=int(f,theta,-phi1,phi1);
When I run the code I am getting following output:
Warning: Explicit integral could not be found.
>> answer
answer =
int((5734161139222659*cos(theta)*((614*cos(theta))/539 - 75/539)^(3/2))/36028797018963968, theta = -5839466350469371/70368744177664..5839466350469371/70368744177664)
I have no clue how to debug this. Can somebody please help me how to solve this integral problem using MATLAB. For integral please refer to pdf file.
Thanks in advance
Nikhil

댓글 수: 5

Nikhil
Nikhil 2013년 10월 29일
integral equation is in the pdf file
Nikhil
Nikhil 2013년 10월 29일
in case if der is problem with pdf file, I am writing equations over here ε= 1/2(1-pd/(2*dr))
θ_1=cos^(-1)(pd/(2*dr))
Jr=1/((2*pi)) * integration -θ_1 to θ_1 of f(theta)
where f(θ)=[1-(1/(2*ε) )*(1-cos(θ))]^1.5 ×cosθ Where, pd=0.015, dr=0.0614 I want to solve for Jr
Why did you use acosd instead of acos in defining phi1 ?
Nikhil
Nikhil 2013년 10월 30일
Hey, bcoz I wanted phi1 to be in degrees.
No you don't. You use phi1 as your bounds on the integral, where it becomes your theta variable, but you take cos() of theta not cosd(theta), so theta must be in radians so phi1 should be in radians.

댓글을 달려면 로그인하십시오.

 채택된 답변

Walter Roberson
Walter Roberson 2013년 10월 30일

0 개 추천

syms theta
pd = 15/1000; %symbolics are easier to get right when rationals are used
dr = 614/10000;
epsilon = 1/2*(1-pd/(2*dr));
theta1 = acos(pd/(2*dr));
T = (1-(1-cos(theta))/(2*epsilon))^(3/2)*cos(theta);
f = simplify( 1/(2*pi) * int(T, theta, -theta1, theta1) );
Using Maple, the result I get is
(1/127414210)*(2273226*3377^(1/2)*elliptice((2/77)*sin((1/2)*acos(75/614))*3377^(1/2), (7/614)*3377^(1/2))-1320813*3377^(1/2)*ellipticf((2/77)*sin((1/2)*acos(75/614))*3377^(1/2), (7/614)*3377^(1/2))+(1228*sin((3/2)*acos(75/614))-1828*sin((1/2)*acos(75/614)))*(617562121+636557746*cos(2*acos(75/614)))^(1/2)+2273226*(-(440271/757742)*elliptick((7/614)*3377^(1/2))+elliptice((7/614)*3377^(1/2)))*3377^(1/2))/pi
Which is approximately
0.218945210999261

댓글 수: 5

Nikhil
Nikhil 2013년 10월 30일
Hey, thanks a lot for your analysis. But I want to solve this problem using Matlab. Because this code is a part of larger code. Hence I want to get this logic run using Matlab. Can you tell me how to solve this using Matlab? Thanks in advance
You can use the double command to get the answer in numeric form:
pd = sym('15/1000');
dr = sym('614/10000');
epsilon = 1/2*(1-pd/(2*dr));
theta1 = acos(pd/(2*dr));
T = (1-(1-cos(theta))/(2*epsilon))^(3/2)*cos(theta);
f = simplify( 1/(2*pi) * int(T, theta, -theta1, theta1) ); % so far just like Walter's answer
f2 = double(f)
f2 =
0.2189
All I mean is you can use the answer for subsequent numeric calculations, even though it is not explicit like the Maple answer.
Alan Weiss
MATLAB mathematical toolbox documentation
Ah, right. Should probably sym() the 1/2 and the 3/2 as well, and maybe the pi too.
Nikhil, I do not have the Symbolic Toolbox, so I cannot report the exact form of the answer that MATLAB would give. Sometimes I am able to figure out the MuPAD commands from the documentation, but I cannot always predict the MuPAD output.
Hey Alan and Walter, Thanks a lot for your help. Alan, when I run your code, i.e. when I run the code mentioned below, then I am getting an following error:
syms theta;
pd = sym('15/1000');
dr = sym('614/10000');
epsilon = 1/2*(1-pd/(2*dr));
theta1 = acos(pd/(2*dr));
T = (1-(1-cos(theta))/(2*epsilon))^(3/2)*cos(theta);
f = simplify( 1/(2*pi) * int(T, theta, -theta1, theta1) ); % so far just like Walter's answer
f2 = double(f)
Error: Warning: Explicit integral could not be found. >> f
f =
(47389761481179*11^(1/2)*int(cos(theta)*(614*cos(theta) - 75)^(3/2), theta = -acos(75/614)..acos(75/614)))/12357877377504641024
??? Error using ==> mupadmex Error in MuPAD command: DOUBLE cannot convert the input expression into a double array.
If the input expression contains a symbolic variable, use the VPA function instead.
Error in ==> sym.sym>sym.double at 936 Xstr = mupadmex('symobj::double', S.s, 0);
So in all I am getting these two errors, after running this code. Do I need to have certain tool box to solve for these, because I am just using student version? Thanks in advance,
Nikhil

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

질문:

2013년 10월 29일

댓글:

2013년 10월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by