Path: news.mathworks.com!not-for-mail
From: "Ashwin Balaji" <ashwinb1@umbc.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Warning: Explicit integral could not be found.
Date: Tue, 5 Jul 2011 01:35:09 +0000 (UTC)
Organization: UMBC
Lines: 41
Message-ID: <iutpod$rhd$1@newscl01ah.mathworks.com>
References: <iuo7gj$oi7$1@newscl01ah.mathworks.com> <iuogbp$fih$1@newscl01ah.mathworks.com> <iup1om$qeb$1@newscl01ah.mathworks.com> <iur7aa$b19$1@newscl01ah.mathworks.com>
Reply-To: "Ashwin Balaji" <ashwinb1@umbc.edu>
NNTP-Posting-Host: www-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1309829709 28205 172.30.248.48 (5 Jul 2011 01:35:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 5 Jul 2011 01:35:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2933743
Xref: news.mathworks.com comp.soft-sys.matlab:734861

"Roger Stafford" wrote in message <iur7aa$b19$1@newscl01ah.mathworks.com>...
> "Ashwin Balaji" <ashwinb1@umbc.edu> wrote in message <iup1om$qeb$1@newscl01ah.mathworks.com>...
> > > > I need to Integrate the below function, but when I use the int(fun,R,1,2) command in Matlab it returns to me with an error saying "Explicit integral could not be found".
> > > > 
> > > > (2*R^-9) + (A*R^-11) / ((A+R^2)^2)
> > > > 
> > > > I am integrating over the limits [1,2] with respect to R and A is a constant. Could you please help and guide me through this problem. How do we obtain solutions to such Integrals using Matlab. I would come across many more similar integrals in my work which I would need to solve, so please guide me through the solution for these kind of problems.
> > > > I need the answer for this integral to be in terms of constant A. So that further apply my conditions I could solve for A
> > > > 
> > Whats the way to solve these kind of integrals..??
> > -Ashwin
> - - - - - - - - - -
>   Could you please show us exactly how you called on 'int'?  Give all the details of how you defined the function 'fun'.  To make 'int' work you need to have declared both R and A as symbolic objects with the 'syms' declaration.  I have the feeling that your version of 'int' really should be able to give a solution to the function you have described if it is dealt with properly.
------------------------------
Below is the exact code that I used.

>> syms A R
>> Eqn1 = [(2*R^-9) + (A*R^-11)] / [((A+R^2)^2)]
 
Eqn1 =
 
(A/R^11 + 2/R^9)/(R^2 + A)^2
 
>> pretty(Eqn1)
 
   A    2 
  --- + -- 
   11    9 
  R     R 
  --------- 
    2     2 
  (R  + A)
>> int(Eqn1,R,1,2)
Warning: Explicit integral could not be found.  
 
ans =
 
piecewise([A = 1, log(64/25) - 8913/10240], [A <> 1, int(2/(R^9*(R^2 + A)^2), R = 1..2) + int(A/(R^11*(R^2 + A)^2), R = 1..2)])
 

Please correct me if I am wrong. I am still getting the same error. Even if I use A=B^2, its the same. Is there a way to address this integral.