explicit integral could not be found problem

1 次查看(过去 30 天)
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-30
Hey, bcoz I wanted phi1 to be in degrees.
Walter Roberson
Walter Roberson 2013-10-30
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
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 个评论
Walter Roberson
Walter Roberson 2013-10-30
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.
Nikhil
Nikhil 2013-10-30
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 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by